找回密码
 加入华同
搜索
黄金广告位联系EMAIL:[email protected] 黄金广告[email protected]
查看: 1116|回复: 2

高手啊,有没有人可以教我做JAVA程序啊

[复制链接]
发表于 2006-5-24 02:10:29 | 显示全部楼层 |阅读模式
汗,真是不知道怎么写,同学找了个哥哥,3个小时就搞定了,我编了3天,还有100多个错,可怕啊) [! C- @6 P  r1 c2 @" R
有没有高手帮我哦,周5就要交了,我的邮箱是[email protected],谢谢啦
2 X% _# \+ A+ Z, I, WRequirements:  
( r+ [( u  ^6 H9 NConsider the three Java Classes: Borrow, RepayCalc and RepayCalcMenu, available from the  
: Z( t' [( I1 K! z" fAssignment 2 page on Vista.  2 ]/ ?, q3 F; }& p4 w9 k
  + R+ O+ q, b" {
You are required to perform the following tasks:  
% z7 E0 E9 h) r4 @  ) t2 [8 K3 v2 f2 D. Z
The RepayCalcMenu class: (Total maximum 20 marks available)  ) ]' _9 e) n& L" ^7 Z+ i! ]" k

* [9 m$ g6 R0 P; C5 Y0 |      1.   Provide a basic text-based interface to a Repayment Calculator for the Megalodon  
$ }, ~- h) [  ~4 j! N           Finance Company so that it can be used by the Megalodon staff members to  
, e' u% K$ i) E8 Z           determine repayment options for their clients.  ) V, S: s5 @4 `. w; ]6 H( K3 W( J
( @  [9 l5 L- T. k' r
           The staff must be able to:  
: A( m: S6 M! x" h& Q' A# O$ C( P! p+ X
           *    Log on to the ‘system’ using their user name and a Personal Identification  3 U, F6 c( c) y- x4 a
                Number (PIN), which a four digit number **.   
: C1 T1 |6 s' s, _. M% V) ~. e& r$ S' w3 O' Z; o. r" Y
                   *    The user should not be able to use the ‘system’ until they have provided the  
; O# R6 |( Q7 V% J" S0 c6 P                        correct user name and PIN combination. You should give them a second or  , f' y; U& _0 q/ [  v( N* R: u* m
                        third chance to get it right before shutting the ‘system’ down.   9 `' o+ y. H/ v1 ~* i. |( r
6 y7 B/ G% H  ]" f, Q
  
! H/ C/ O$ ]4 |' m3 a( _                  ! E. R% g* [, v8 r5 K0 z
                ** You must use the user names and passwords provided in your individual  
. W% t) e% a4 M: H6 u( u& H) |2 M0 q
$ w6 u2 V9 J9 ?* ~4 b                data available from the Assignment 2 page on Vista (see requirement 5 below).  
; E( N7 L' M% a! {' |                The user names and passwords should be included in your code, and the output  $ l3 C4 h! v' |  o
                to the screen should prompt the user with the user names and passwords (for  ( j" g, [+ W; M- G7 `0 M

: G# G, Q0 q6 `  _2 `                marking purposes).  
+ Q4 N6 E7 ]5 ?: T/ X! L: y1 T  J2 x6 z, T4 T: ]
                  
5 L1 c' e3 v1 q2 R' D             ' F# j  T1 P! L9 k
*    The interface should provide a menu so that the staff can:  
2 [5 y  G" I6 r1 G8 v# Q
2 N# o$ T2 p  l% x4 H# o+ b  b                -    Perform a Repayment calculation  ; v1 W4 ~4 v& m% ]6 o6 y% J3 _

* ?6 q$ ~# U3 I! Q+ j% d                -    Print out to the screen the Repayment details  
0 L# @+ B7 W9 m8 N  j# R  B: t2 n  X+ j
                -     Change one, two, or all of the values for the current calculation  7 Y( N! y; c' i5 _1 v- ~" A
8 T) t& C; J  H$ a
                -     Start a new calculation   
1 \1 z2 z" P! Q+ B  S5 f$ v: |: A& l0 ~( U, U- J. }6 X+ J
                -    Leave the program.  ( h; e2 a7 Q% o  U2 _6 Q' ]
The RepayCalc class: (Total maximum 10 marks available)  , u+ F' r+ |% D" y, O  a

  }0 b8 |/ k+ h+ H" O/ b" Y     2.    Provide a method to accept three input values from the user:   + r; H: N( C5 k/ b2 b
7 f- Q  b2 N! o5 L! P1 r) G1 j
                -     the Amount to be Borrowed (to 2 decimal places, for example, 10550.00)  
' t9 x# P+ k& e4 d, x) Q0 u, Q. i! P9 X( Y, O
                -     the Annual Interest Rate (to 2 decimal places, for example, 9.75)  
- D1 p# Z9 }8 L' d' Y! `
9 K3 |: f1 e( N) j                -     the Period of Repayment (in whole Years, that is, no fractions of a year)  
( f" s& o4 q& H9 _7 S/ x8 T
# E# F( J4 t; L' C: B$ K- o' c) F      3.   Provide a method to print out to the screen the three input values (accepted in  . ?. ~5 I& w* C
           requirement 2), plus the repayment calculations:    T; e4 _' |6 G/ n+ ^; c

0 S1 q& w7 d, L& d; x" e  _. G                -     the Weekly repayments  
6 n. ]# }" ]0 U, Z4 G2 A! n) V$ F+ y- F0 u6 V6 b
                -     the Total repayment amount (Amount borrowed + Interest)  
. L$ D1 {& R& w; h' G+ L% |6 F5 s, F1 J+ d+ V6 n
  % U  B4 B3 q1 D
" T5 a1 {9 S, M6 K- x4 i) C2 p
The Borrow class: (Total maximum 40 marks available)   9 ?: N) D5 ?' I" C- q" l* Y( M7 N
( F8 u) S, B- i; u
     4.    Provide methods to perform the following tasks:  7 D  p/ ?8 @1 |. D9 b

& `# x% Q, f+ C$ T/ v- N) I0 _                -     to calculate the weekly repayments ***  
, L$ C0 \* E" B" l7 W5 o. J9 q& T- Z3 m. C- N7 l( k  v& Q5 d) E
                -     to calculate the total repayment amount  
0 ?3 b. U( Y) r3 G  K. k2 G
2 j: R6 r/ q( v& B                -     to return the amount borrowed  
+ W* k* m4 w/ \- r2 p4 ~3 D, u/ }3 ^/ X2 {* s6 ?, Y# V
                -     to return the borrowing period in years  
" ?1 b! t# z* ^, \& @- |# w- g/ g4 l4 T  e
                -     to return the borrowing period in weeks  $ [# ]3 _1 E% B( V

/ i; h) E" z& X                -     to return the annual interest rate  & g( }" b! o  ]/ R* `& r" q$ O
  R4 u6 \% }: D/ C( j. u
                -     to return the weekly repayments  
: ^5 m5 V$ f( a( y& t: G. `# R% [- O8 M( E: }, ~4 @' Y1 S3 a
                -     to return the total repayment amount   
! D7 \  q, M1 M1 P" M. r7 t8 J+ W4 I: z& R( M/ z" \5 M! e0 s  ?
                -     to reset the loan amount  & S! w8 N4 v/ D" m4 M
% b. J& h7 O. \; @" O. _) ~" Y6 x
                -     to reset the annual interest rate  
5 @* Y& d8 S; `, Q( i# s
- U/ e. \$ V: O6 c$ i% [, B  N; O                -     to reset the loan period (in years)   4 Z0 u$ f% r9 o% H0 S: Q8 [

: C: k9 y; N, \+ e3 [% N      
) M% d- D% W: ]( v* ]5 K3 _& S4 ^4 B& W  P
               
' d/ o" J3 V$ A0 d. y! f       # A: Q. n4 ~( v! d
              *** Use a simple interest calculation (not compound) formula, for example:   ) c! _  i* m* ]+ w- c
       1 l. f$ h' C" X. m0 n; o+ P9 p, r
             weeklyRepayment = (borrowedAmount * 1 + (annualInterestRate *  
" K! e( T# |6 ]- s' K8 y             numberOfYears )) / numberOfPayments;  ' f7 h; U; ]; h! r8 @

: i+ D6 y8 E: i# x0 {  d! i          5 F9 l$ s- x% H& k. z, ]* F

6 @) n2 X- n+ X) W3 s$ X/ h* w5 b' p       3 c# Q' a4 V# p3 c
9 m; X+ K! ~/ S
Individual Data (Maximum 10 marks available)  
0 T  b) X& S$ L& q3 W$ ^$ S8 K. |/ d# t/ l& e; R  I: x
      5.   You will be given two Megalodon staff member user names and passwords, plus a set  
; H1 P, w: R, a. c; m           of data for each staff member to use to calculate repayment details. You will need to  
' I, m, O3 c0 \* y/ P" ~. Q) ]           log onto the BSA104 Assignment 2 page on Vista to generate your individual data  2 L# B2 b% V, g2 _* L8 |% R1 Y
           and instructions for this requirement. You will need to use your University of  5 d5 K3 I2 \3 ]! n. C3 P* ?. n; K
           Tasmania (UTas) student number.  
6 h) c, k+ H/ D             # Z: D& n+ n# b+ Q$ d# T
  v& [8 D+ f$ J. v
                                                        Page 2 of 5  1 x, V, a3 {+ U5 q+ X) N% j

0 X+ \+ s' L* `6 N0 d+ H# A; AFor requirement 5 use the following data:
  y0 r' M7 ~2 H5 j% Q3 q
( a  H) i/ ~0 a4 n  I# m% e, ?; [) [# Data Set 1:2 C0 A: p4 `0 O9 f3 O

1 \* x, R4 k' j: |+ M7 lUser name: JordanM
7 H4 E1 k. P2 J5 E. wPassword:  Ferrari
3 _* t7 ^* ^, ]7 M! O. s: NBorrowed: $ 749.953 W. f- a! s$ E& q8 W7 T
Interest:    15.0 %4 n8 L' l4 v; \" r; C
Years:      41 C8 R6 F+ m' N5 |  f
5 [9 ^1 p! L' ]; k$ I& A
# Data Set 2:
; x7 l! j8 P& E; h& Q' N  Z: n
- q* d" a  W9 V% ]1 t- Q$ `9 ~User name: KimZ
" L% A6 T+ c0 r5 PPassword:  DimSim& }; n$ q: _! D& ]
Borrowed: $ 150500.25
0 G' ~% j; q* w- s1 OInterest:    5.5 %4 K5 {- g8 x" t0 k) i
Years:      7
; _$ Q" Y+ z5 M  n+ H. ]7 ~
- B, C( M1 K1 H4 J2 k- J6 l, \& C[ 本帖最后由 wwwsnailcom 于 2006-5-24 02:15 AM 编辑 ]
 楼主| 发表于 2006-5-24 10:52:42 | 显示全部楼层
怎么也没有里我啊,高手来呀
回复

使用道具 举报

发表于 2006-5-24 13:01:55 | 显示全部楼层
哦 对不起 爱莫能助。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 加入华同

本版积分规则

Archiver|手机版|小黑屋|华人同志

GMT+8, 2024-5-23 14:49 , Processed in 0.110514 second(s), 5 queries , Redis On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表