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

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

[复制链接]
发表于 2006-5-24 02:10:29 | 显示全部楼层 |阅读模式
汗,真是不知道怎么写,同学找了个哥哥,3个小时就搞定了,我编了3天,还有100多个错,可怕啊
& a/ i" Q* u2 u8 S1 z% u8 H有没有高手帮我哦,周5就要交了,我的邮箱是[email protected],谢谢啦9 x' V2 c! T+ @" Q
Requirements:  
! V9 f- K$ E: ]; _Consider the three Java Classes: Borrow, RepayCalc and RepayCalcMenu, available from the  
/ ~8 u3 q" A8 EAssignment 2 page on Vista.  
3 S+ g' i8 t, h, l$ D( j  ) M2 j: m: f: @
You are required to perform the following tasks:  
8 H4 s" K5 r8 f2 p" Z6 A  % r" S3 e7 K) J3 h/ m" @
The RepayCalcMenu class: (Total maximum 20 marks available)  
! ?- }5 D. \9 a$ d% C+ U' V
: O5 j; [7 O! n6 Q0 S4 ?      1.   Provide a basic text-based interface to a Repayment Calculator for the Megalodon  
4 c* y. x2 y% S. d% l+ `! K4 Q$ S           Finance Company so that it can be used by the Megalodon staff members to  ) _- F. Q5 ~' w) {! b1 C# }/ G
           determine repayment options for their clients.  ( f6 s. t8 S- Z$ C% b( j. [5 u
7 Z. i+ i, G5 p: X. [
           The staff must be able to:  : s( h: w/ H7 _) o0 ]$ ?/ S

- e4 [% n+ p# L; u4 x% Y! [4 z           *    Log on to the ‘system’ using their user name and a Personal Identification  
+ u0 t& P) M  q& w8 [% H5 F                Number (PIN), which a four digit number **.   ( b2 S; O( M+ K! y- `
2 o, z8 U* P+ q7 h, V
                   *    The user should not be able to use the ‘system’ until they have provided the  
! P+ b) [) n( l                        correct user name and PIN combination. You should give them a second or  5 }$ s' u  ?: ^6 |- U
                        third chance to get it right before shutting the ‘system’ down.   
3 z6 Z1 ~8 g# A
( p; _8 I/ z7 ^$ E. ?6 G0 J  , R  c; X# J- \1 D
                  $ F! F* `; f1 j" J2 H- X8 y
                ** You must use the user names and passwords provided in your individual  
7 v. r" c3 @7 _: Z. e6 A$ y- u7 ^! ^! t7 z/ L/ ~9 |3 t- k& }
                data available from the Assignment 2 page on Vista (see requirement 5 below).  
& S* f% p  A+ j1 h& E; P+ [                The user names and passwords should be included in your code, and the output  
. f( o( L0 t; V5 @  l                to the screen should prompt the user with the user names and passwords (for  
0 n/ E' m8 g' ]& F. o* f) q  t# \, u4 v0 r& l" Q  b" U
                marking purposes).  
. q2 ?0 w2 S0 l) ^; d8 X5 }+ r' Z( v( b( C8 z
                  : @) j4 A  `6 H0 P% s
            
5 x/ r1 I1 T: @, Q* j*    The interface should provide a menu so that the staff can:  % ~( K5 q& O; A+ h6 r

! r0 _+ Y, B: D, L                -    Perform a Repayment calculation  7 u5 Q* S/ N4 T3 G

; W& ]4 P* I9 a$ N% n# p                -    Print out to the screen the Repayment details  * e, f9 r$ E( o( A- y' T

$ s4 K% O1 J1 s% r; m                -     Change one, two, or all of the values for the current calculation  
& a: Y6 K; g1 O) B) L: G/ c; S8 z$ _% b( ~
                -     Start a new calculation   
$ o" [/ d+ ~& A/ `
5 b; C9 `' W+ J: `# y) L                -    Leave the program.  " @* \* X  [6 ?; ^8 M1 J
The RepayCalc class: (Total maximum 10 marks available)  ; j$ W, Z5 G4 u* f
4 G6 [+ j( m) Q. x  @* T% ]
     2.    Provide a method to accept three input values from the user:   9 s" j: v& ]' M$ v0 h0 c% F
& S/ V; o! T, B3 d1 e6 n7 t2 U
                -     the Amount to be Borrowed (to 2 decimal places, for example, 10550.00)  
# O3 O4 Z" g$ D+ U1 a; H/ o6 X3 n/ ~: ~( o/ Z* `" N; X" c9 R
                -     the Annual Interest Rate (to 2 decimal places, for example, 9.75)  / [( u- v* d$ R$ m

1 Y+ q7 u) X/ Y2 d                -     the Period of Repayment (in whole Years, that is, no fractions of a year)  - m) {1 y, y3 b# h
' P) `5 U& A- d; F/ T6 T
      3.   Provide a method to print out to the screen the three input values (accepted in  
5 [9 m* w2 g. S           requirement 2), plus the repayment calculations:  
  `! S/ o' T4 N- J8 S) ]
4 ]* d+ e% ?; O9 |+ G5 B                -     the Weekly repayments  
, X8 l/ i$ y9 ?4 W- U# d. G
( ~+ T6 L8 H  A8 V, |- y) f- _                -     the Total repayment amount (Amount borrowed + Interest)  
6 X' B; n: j; {" o/ \* e0 z3 h; J* A: c& i
  
4 Y$ R6 X1 D& S$ L
& z5 W3 Q  C1 y2 CThe Borrow class: (Total maximum 40 marks available)   ; |' n' w: ]& Q( Z* @) l
# `. G* K& ?. G6 W3 S
     4.    Provide methods to perform the following tasks:  & I; s2 y/ Z) s  y
7 F1 m8 S  z, n) h, q
                -     to calculate the weekly repayments ***  ' P9 _, e/ G; ?- W( _2 u( h4 i

) A3 i: J" h/ L8 u; k                -     to calculate the total repayment amount  ! ]: ~- w0 A3 ^8 I! J/ q

+ u& s; ^: O# j' i                -     to return the amount borrowed  5 ?. N' m$ ]/ X6 _/ u6 o

& x$ c; |; a: \9 @9 m                -     to return the borrowing period in years  
4 A. n+ ^' d3 T  [! j5 b
4 `0 L! }6 O/ F# Q4 E( c: L. _                -     to return the borrowing period in weeks    F) s; b1 R; B. d; N

7 U; B7 W/ _8 j& J7 h                -     to return the annual interest rate  9 X  h, P) F3 e# G: s' ~, \
* `! U- i& @0 W# A
                -     to return the weekly repayments  : j, B0 [3 n. e# z8 |5 n* T' T

9 D3 t, R; F9 _                -     to return the total repayment amount   
5 A! _6 H( R/ R+ h: K% [0 F) l7 I' |  z3 \
                -     to reset the loan amount  1 g. a$ V2 b* n5 j' x7 C  N+ K$ b" Z

0 `6 ^2 v# j' E7 H/ o                -     to reset the annual interest rate  ) w; [, D) ]: T+ ~
9 h4 q* y( G6 H( O
                -     to reset the loan period (in years)   
/ k( O8 u; g, F5 o$ ^
: b8 t* n1 Z  ^: S' u6 K      
3 ~6 l( h2 T8 v6 H3 n- M
( h7 _, T+ _. C% d! U               
! U' P$ h$ R2 y6 ^8 E) `7 W      
: B9 [  \* s5 Q( r              *** Use a simple interest calculation (not compound) formula, for example:   6 M/ i/ o6 j7 y' l$ l! W  C1 h
      
4 ~6 S" b* X7 ~. _             weeklyRepayment = (borrowedAmount * 1 + (annualInterestRate *  
% D$ A' H8 k9 [9 i             numberOfYears )) / numberOfPayments;  ' S- `2 q7 B8 D

" R8 S9 ^6 V! n" j1 q: p         
  g9 x+ {# g& N2 ]! L3 x; P) Q7 ?: e& Q2 X$ W
       * I1 }$ Y& m% [( O: _5 l

9 X1 ~; g6 I' S( QIndividual Data (Maximum 10 marks available)  
. N* X/ G) t" e0 o2 M+ z
! G7 y2 a: m0 [/ P7 D      5.   You will be given two Megalodon staff member user names and passwords, plus a set  0 [3 p( M4 O0 P0 x7 x2 i& z
           of data for each staff member to use to calculate repayment details. You will need to  
4 j$ ]: G1 U3 R% ]" f9 [4 Q# j           log onto the BSA104 Assignment 2 page on Vista to generate your individual data  7 a) j" W! b) n  z$ D6 p8 Z
           and instructions for this requirement. You will need to use your University of  . t6 ]* k% ]# c3 ?
           Tasmania (UTas) student number.  2 B( ^& H6 a8 a- `+ I: r& p# \
               V" Y  B, h1 ~3 V# D+ G
8 @$ H# Z" O4 D! ]# ?6 g8 k
                                                        Page 2 of 5  , _2 p6 W% @  a! |

; z# f* @+ }& P! e% |9 T1 sFor requirement 5 use the following data:
) x4 }" Q+ A' I( M. P1 @( U
" Z4 M  ]6 q6 P! V# Data Set 1:' u7 y5 |( W$ X6 m# e. ?
* V+ S# p% N( e6 q& e7 L
User name: JordanM7 N, [( @  o" [8 R' A* m1 J( ?" O" V, |
Password:  Ferrari
0 b/ j9 [0 O3 W* h0 z8 ~6 l) ~" {) iBorrowed: $ 749.95$ L$ h9 E/ @% D7 f3 ?% \
Interest:    15.0 %6 d3 e# r3 E& h% V
Years:      4
& S2 X7 E1 |& D4 h# j  L8 r$ I/ a/ A" @/ H" }
# Data Set 2:
" w" W9 Y5 p: r- p- y0 y% X! x1 d5 [& e; g: T! r
User name: KimZ
( h) h" n" u/ j' M7 M$ _5 `8 pPassword:  DimSim
1 v5 [- ]4 B+ {" j! p7 d" bBorrowed: $ 150500.25
% M+ B3 o8 ]% Q; L# l/ e( }Interest:    5.5 %! Z, A3 W/ p" m( G2 Z8 \7 \7 D
Years:      7$ J: L7 m- g) d% Z

( X3 H$ o5 ?6 T- F( v0 a1 p[ 本帖最后由 wwwsnailcom 于 2006-5-24 02:15 AM 编辑 ]
 楼主| 发表于 2006-5-24 10:52:42 | 显示全部楼层
怎么也没有里我啊,高手来呀
回复

使用道具 举报

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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-12-16 17:27 , Processed in 0.055541 second(s), 5 queries , Redis On.

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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