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

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

[复制链接]
发表于 2006-5-24 02:10:29 | 显示全部楼层 |阅读模式
汗,真是不知道怎么写,同学找了个哥哥,3个小时就搞定了,我编了3天,还有100多个错,可怕啊0 u- W; m. A% Y# p+ j) T- v
有没有高手帮我哦,周5就要交了,我的邮箱是[email protected],谢谢啦2 q$ }9 F9 w# S+ y/ C  V/ n( B+ i
Requirements:  
+ H" n6 Y" M. i' @9 C1 x8 q+ IConsider the three Java Classes: Borrow, RepayCalc and RepayCalcMenu, available from the  
) f1 A; a( A3 }. H# _: X) F  K3 PAssignment 2 page on Vista.  
  D6 ?; ?+ Q; ]  
* h; d: \1 E9 zYou are required to perform the following tasks:  
9 ~& i/ I+ h+ K; V: o* I' Z  
1 i7 d( |4 d1 b0 T" k/ iThe RepayCalcMenu class: (Total maximum 20 marks available)  
( W, j$ ?! b  D- Q* l9 B! C! d3 T3 }! ?8 J8 G2 i
      1.   Provide a basic text-based interface to a Repayment Calculator for the Megalodon  
+ W9 @# z# P. m, s( Z1 V% E, @           Finance Company so that it can be used by the Megalodon staff members to  ( J6 L. Q$ r; P2 N8 ]
           determine repayment options for their clients.  ; p4 e& H: m5 N4 Z; O) p) d* N
  ?0 _3 b* d- w! s& H, V: {, r
           The staff must be able to:  
, ^" b- M7 D4 n. T. M" g: D4 t3 C7 }% d, a
           *    Log on to the ‘system’ using their user name and a Personal Identification  - e, X9 y1 `3 V" @5 N' B! S5 C& e
                Number (PIN), which a four digit number **.   
2 t. X9 ]+ {" a4 f: w7 p
0 C% U* R) \. V6 g( H3 m                   *    The user should not be able to use the ‘system’ until they have provided the  + h1 W; X; D  e0 Q, T6 Q
                        correct user name and PIN combination. You should give them a second or  
* l2 N1 ^1 ?& ~                        third chance to get it right before shutting the ‘system’ down.   8 Q& @/ X# c  P" K

3 o" |+ U5 y9 t$ ^4 e  ( C) C/ b2 Q  `7 ?, \$ c7 @$ X* |0 [
                  ! `( @; B8 {  B9 \
                ** You must use the user names and passwords provided in your individual  
" V$ t1 \0 k) q, V6 Z) I& Q# X3 e1 u# ?! ]$ j9 ~
                data available from the Assignment 2 page on Vista (see requirement 5 below).  4 ]9 X0 G8 |( [
                The user names and passwords should be included in your code, and the output  - d' N+ x  [  k( H5 G4 g
                to the screen should prompt the user with the user names and passwords (for  ) D  N0 G% T/ N
& q4 R7 J& c9 R) k( q
                marking purposes).  
: g5 P1 C, i" N! E: q$ v5 B! \5 I0 }- Z1 T& q! C) p+ P
                  & o  w. W3 g: X1 a; o) @
             . W8 h" [* v& x9 l* r7 P" R
*    The interface should provide a menu so that the staff can:  
) {' j. ^: W* d+ V
/ n: \/ _; a0 ~/ ]                -    Perform a Repayment calculation    o& z. M2 y8 N; |* G* N  r

- W! |) i3 |* z+ h0 w" V                -    Print out to the screen the Repayment details  
1 m) {5 e: \+ @$ U; E1 j. k3 r2 y' C- e+ r! x1 P2 X
                -     Change one, two, or all of the values for the current calculation  
% K; F) ?4 R1 Z4 E- Q" h$ h# U1 T& y# t
                -     Start a new calculation   
5 f) @2 @3 [2 Q0 R5 u
6 ~& v, Z1 S6 A. O                -    Leave the program.  
! @& N1 @& B# `; d: z* U3 bThe RepayCalc class: (Total maximum 10 marks available)  % ~3 l/ ?# E1 v) Z! s% \+ V# @' m

& g, O, W( M' h* F/ z" v     2.    Provide a method to accept three input values from the user:   
4 Q" W8 Z/ O: q  k2 A& V  M% U* C# U0 k+ @& O
                -     the Amount to be Borrowed (to 2 decimal places, for example, 10550.00)  
: A* z. s8 i! |( y/ N9 r8 ?2 F- T7 H& d( h6 E
                -     the Annual Interest Rate (to 2 decimal places, for example, 9.75)  
$ I6 d/ s4 w. Z. y0 O( i; v
" w: h5 v9 E6 Z- m' ^, S# e) |                -     the Period of Repayment (in whole Years, that is, no fractions of a year)  % I' P/ e5 Q% }3 _. O) F

; a: |# W2 l5 O- y* b. C; k2 T" g      3.   Provide a method to print out to the screen the three input values (accepted in  
! R- o- ^) L" u, p4 s3 y  T           requirement 2), plus the repayment calculations:  , Y! P9 o, L; {& m/ l! |
+ b4 X# C. y% W+ g
                -     the Weekly repayments  5 f# L* e" P/ j3 C

9 S* {5 o% f+ z* l* Y% Q2 O- O                -     the Total repayment amount (Amount borrowed + Interest)  3 Z) d* k7 O3 f& A0 X( ~

, q+ X( |4 d) J- G7 j' I) f7 F  3 d2 B/ y# E! _) n+ L
1 ]9 w, [& I1 u
The Borrow class: (Total maximum 40 marks available)   
2 ]3 Z) A) L7 H# j% g
% g9 _) A# V( @1 {     4.    Provide methods to perform the following tasks:  6 q$ y2 p, C9 L/ h6 R* X9 A# W! ~

8 C' ?) I, D0 y3 h* @( e                -     to calculate the weekly repayments ***  ) n) q% K( O4 M
& E% G4 c, ^9 v( `7 K
                -     to calculate the total repayment amount  : L. N4 W+ z' S& q$ l+ a
: M1 \5 \5 A3 U, Q  x% ?  ]
                -     to return the amount borrowed  ! m1 R, @3 V- n  V7 x' z! b% z9 Q6 m4 M

, M$ ~: Y* |, F; Q4 j# h                -     to return the borrowing period in years  8 a( j/ h. Z5 r) X5 ~* z( c

3 V) ]6 m) q  P5 F                -     to return the borrowing period in weeks  % F3 y, h& i1 e% V% X2 W1 z
+ g/ O  I; M; X
                -     to return the annual interest rate  
3 D6 d; \5 {! m) k( m  U- B' r" ~  O: ~
                -     to return the weekly repayments  
1 e. G% X4 a2 s3 W- g; ?6 w8 n5 m: {  U
                -     to return the total repayment amount   9 n* y4 K3 T) }& E1 s

0 H* G9 c" L' s7 i- ?# t# A) M                -     to reset the loan amount  + a* D# q: \! F

( R8 G7 V% ~; }9 O: ?5 V5 y! l                -     to reset the annual interest rate  7 s, d- L# N. v% X) u; X

% V- U" Q' x1 R0 L# G4 R7 W3 D2 s                -     to reset the loan period (in years)   + v, N9 `# A/ \$ h3 G" T

7 y7 n/ s9 H: a" ]! z) Q5 D      
6 x& E7 j8 E5 O' H8 q) K
' \# F" Z$ e. C! H- o               
# m% r- i# n& V      
5 W, [( N4 l# b$ D              *** Use a simple interest calculation (not compound) formula, for example:   
; h, l5 @, e) j+ ^      
1 B, s( m$ `; y5 d" ]6 o             weeklyRepayment = (borrowedAmount * 1 + (annualInterestRate *  
, O7 u5 {: U# Z/ Q% _             numberOfYears )) / numberOfPayments;  
; V0 Q5 B2 s8 T, m: k1 T' k' `
9 ^# r$ {% P  J4 S6 U' r4 A         
8 ?9 E$ h/ E; S: P# n$ j1 G7 t7 ~+ W- s9 i0 Q, t
      
- b) _$ c& b6 k" H2 p6 R$ W( t" a; g8 }  D- }
Individual Data (Maximum 10 marks available)  2 ?3 a* Z% T5 e3 P2 b
  e/ Q4 m( J. N2 _. B8 u& F
      5.   You will be given two Megalodon staff member user names and passwords, plus a set  ( p+ s* l7 ], y: f9 r/ @: b
           of data for each staff member to use to calculate repayment details. You will need to  - Y/ Q. K5 Q* ]
           log onto the BSA104 Assignment 2 page on Vista to generate your individual data  9 r) J; N( u) [! P2 C1 }+ K) A
           and instructions for this requirement. You will need to use your University of  
7 M! ^" m: K3 [* }  A. L! n           Tasmania (UTas) student number.  6 L2 \+ I: N' M
            
+ p2 G  ^8 ?3 U5 f! f( ?& k
) ?/ R$ N/ }8 k4 }" ?2 O/ |                                                        Page 2 of 5  , R, E, Q5 N* M/ V7 j7 u3 s# P
  E6 _" G6 T! J1 Y/ V, k3 j
For requirement 5 use the following data:* j: C: }! a2 v9 Q, ], n' [$ X- i

% ~" _( ]7 S% n6 X! R# Data Set 1:
" n# Z# B" x8 h) U7 A2 k, V( z. ~1 x5 R! Y9 D$ z
User name: JordanM
4 @+ Z, M; T; J% ^7 t% ]Password:  Ferrari5 t6 u6 x* u/ ~
Borrowed: $ 749.95
# ?% {- P: M4 NInterest:    15.0 %
9 g4 V# I' n$ F7 iYears:      43 ^. K  o% t; F* N

+ J* M& c6 T% m  d# Data Set 2:, q9 N7 f1 V3 f) ~. \
1 L* q/ c# r3 P
User name: KimZ
% R4 W* H! d* ePassword:  DimSim
, t9 a: F& C2 Q+ }Borrowed: $ 150500.25$ F- b& V# ~0 U* G
Interest:    5.5 %! M; ^2 E0 ]7 X" i* M; q
Years:      7+ c6 j: o' b5 O/ d1 Y
, E4 w9 f% d4 w" k
[ 本帖最后由 wwwsnailcom 于 2006-5-24 02:15 AM 编辑 ]
 楼主| 发表于 2006-5-24 10:52:42 | 显示全部楼层
怎么也没有里我啊,高手来呀
回复

使用道具 举报

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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-5-25 10:49 , Processed in 0.057654 second(s), 5 queries , Redis On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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