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

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

[复制链接]
发表于 2006-5-24 02:10:29 | 显示全部楼层 |阅读模式
汗,真是不知道怎么写,同学找了个哥哥,3个小时就搞定了,我编了3天,还有100多个错,可怕啊
: ~2 k* Y" w6 V% g; j有没有高手帮我哦,周5就要交了,我的邮箱是[email protected],谢谢啦
- P9 X' v; S8 T$ z) fRequirements:  
) U3 d# i! D2 |2 R, B4 z, ?3 eConsider the three Java Classes: Borrow, RepayCalc and RepayCalcMenu, available from the  
3 o" I! z# f% K' d, n7 h4 eAssignment 2 page on Vista.  # @$ d+ k2 T( Q
  
$ ~2 @( x- E8 l& r! z* a4 GYou are required to perform the following tasks:  
2 }# }; S, `1 [  - V/ c& G! c  L4 n1 }' J
The RepayCalcMenu class: (Total maximum 20 marks available)  * @& ~2 Z: b: ~" R0 M" j9 A

$ x* r' k0 j) {6 f$ K7 q- S      1.   Provide a basic text-based interface to a Repayment Calculator for the Megalodon  
3 K7 n, k6 R9 a; W* Z& p7 W4 [           Finance Company so that it can be used by the Megalodon staff members to  # y. `. v8 d" A) r
           determine repayment options for their clients.  5 T* l; B' e- c3 f
. Z+ Y  G5 g  a! W* O% B
           The staff must be able to:  
6 X% }$ y! m) Y% \; D' H0 r* B3 d7 T  E* }8 x. c
           *    Log on to the ‘system’ using their user name and a Personal Identification  * o- J+ o0 H" ~# K
                Number (PIN), which a four digit number **.   ' X& |* r* r* b

6 f6 q8 b/ ~$ o8 q' |  I: H                   *    The user should not be able to use the ‘system’ until they have provided the  ! P& I) O2 |" e7 G/ V4 O
                        correct user name and PIN combination. You should give them a second or  ' I+ z5 F3 h4 p$ W8 h7 X0 G
                        third chance to get it right before shutting the ‘system’ down.   
) g" T/ W# X* d5 ~+ Z3 N
) {) \& P/ T. _1 `& a  2 Y) T5 O" m: w8 D
                  , f2 Z* C! q6 F$ A7 i  u
                ** You must use the user names and passwords provided in your individual  3 M2 V3 a/ j6 j, V5 D( V

5 `5 W1 u) z  \+ w" s( ^7 B" t3 ?                data available from the Assignment 2 page on Vista (see requirement 5 below).  
5 z& w: l5 T1 P6 s$ ?                The user names and passwords should be included in your code, and the output  
8 D' p. ]8 {3 t4 _* u2 K" y: h: g# Q                to the screen should prompt the user with the user names and passwords (for  & l+ T' I. X' t% Q% \9 h& n# F. [" W6 t
* k1 m+ W) A  R! Q3 W$ ~
                marking purposes).  0 Q9 b# |8 h; N
! O" m# |3 v! O, M/ \" L+ n0 d+ K+ [
                  
( T/ A. m# y* O+ D' ]' g            
3 `* P& P' W+ \*    The interface should provide a menu so that the staff can:  
1 q$ E0 D0 [1 d- K1 N- g3 F* y1 E: c# I2 E+ X
                -    Perform a Repayment calculation  
' ~* m- g. v$ S1 x: n1 o
9 }, {) y8 M( o( J( b( r& j                -    Print out to the screen the Repayment details  $ Z# p2 ~9 g; E# o5 |" @" c1 \
' {" R/ s9 e2 |) F1 n/ v7 A
                -     Change one, two, or all of the values for the current calculation  
1 I1 ^6 a! o2 e5 W
4 K2 P1 \. S. j9 e. N5 Q: S8 H% `                -     Start a new calculation   / e) p$ r* I: H/ z% b9 V3 x
$ I4 v" i2 k" r: C% G; j
                -    Leave the program.  
- p$ k) H$ J! ?( }2 [: UThe RepayCalc class: (Total maximum 10 marks available)  ; P( O; V. @# F4 s( K+ p' O$ a

/ F) V& F/ m3 J! O/ B. a     2.    Provide a method to accept three input values from the user:   " b7 ?+ {4 C: n) i1 }- V" _

$ t# _; H7 o+ A/ _                -     the Amount to be Borrowed (to 2 decimal places, for example, 10550.00)  ) i5 z) v- D: z/ W. a% N
) l' o/ Z6 p: s. S8 O7 V' @8 {
                -     the Annual Interest Rate (to 2 decimal places, for example, 9.75)  7 |; F6 I: H5 u) O" p9 J

. R+ L. `* h) ]0 [                -     the Period of Repayment (in whole Years, that is, no fractions of a year)  
$ \# b, w+ g% s/ h2 Y9 E  ^! |! O# v! L
      3.   Provide a method to print out to the screen the three input values (accepted in  
/ x& o, Z5 K* s' K6 B           requirement 2), plus the repayment calculations:  + a. Y6 Q! x$ B% V( l! U2 p

0 y2 H7 e9 j1 U7 b                -     the Weekly repayments  + G- i2 f. E& H

$ e3 D2 Y( ^5 q: v( @  O: q                -     the Total repayment amount (Amount borrowed + Interest)  
/ j( L! f" c- m- r; F% ?5 u0 b  l8 C6 X7 z# b& X9 S
  : J3 H" q) H: n3 v% ^6 S6 e
/ u/ N  b; D9 {5 ~* }- R9 b
The Borrow class: (Total maximum 40 marks available)   
" i) X- m  g2 s; D/ c+ P0 s4 C: w
7 I6 \6 W9 z4 F+ L$ c" B     4.    Provide methods to perform the following tasks:  / R; p* ?; v2 C' o$ a0 `- r

6 Y& c0 U1 j2 @" j3 ^9 l' T5 {# t                -     to calculate the weekly repayments ***  
" K$ f% R, d4 l# z, `5 ^* h2 X% V; c- H
                -     to calculate the total repayment amount  $ [4 D, Q. F+ n" W2 h2 [9 F
$ w3 V9 Z  W) e% O
                -     to return the amount borrowed  $ n5 o: T1 ^' G# a; Q. u. _+ ^

% r1 I! O+ Q' H0 Z0 a7 G" O$ W                -     to return the borrowing period in years  
2 [* _" E7 Q8 n0 R" Q* p3 X; O+ w& ~4 a$ o) q" j% b
                -     to return the borrowing period in weeks  " A) X* n% `- |. T/ n6 W
, ]$ |3 h) U# f$ H+ I- k
                -     to return the annual interest rate  1 J$ @4 @" i2 z4 ]% J# L( C/ z' m" F
! |& U9 T& k" `; x
                -     to return the weekly repayments  6 L0 k) Z8 ]( g+ Z. ^3 j! j
' U1 q( V& O' P, `2 r
                -     to return the total repayment amount   
1 p8 e9 v: b$ l& N4 D2 C3 ^+ r2 M' k( ~: m4 v4 z1 |: ]/ ~7 b
                -     to reset the loan amount  ! d: l" ]8 n4 U  W
) w" l/ U" e) u# j% L# D
                -     to reset the annual interest rate  
  U# t' `& P& O5 Y! `' q% F: R0 ?! ]1 D
                -     to reset the loan period (in years)   ; d9 l/ G5 ]2 Y3 j( U1 u, a% D
9 p  @+ k/ o8 e! W7 ?! m
       5 i4 D% [0 d: ?, |4 T$ n
7 e) ]8 t) b+ O! i
               ! ]8 T) V4 ~3 @1 H5 E
       & u$ L/ S" n4 S1 b
              *** Use a simple interest calculation (not compound) formula, for example:   
* o$ J) p1 Q+ u       8 Y3 A" I. b: Z. M  L! X* k1 X
             weeklyRepayment = (borrowedAmount * 1 + (annualInterestRate *  
& Y9 j, e; {/ t             numberOfYears )) / numberOfPayments;  
9 ~- J9 D( ^2 M/ Q5 B$ g: W' Q* I1 v1 n4 U9 d5 x
         
5 @' W1 j* H" l
1 t1 B, J. M; `       : A0 j% c# v- Y7 }
1 {  l9 A4 _7 E! `  w) O& a" R
Individual Data (Maximum 10 marks available)  
# B) g8 R: K: r2 B( e- R/ D7 i' M" ]
      5.   You will be given two Megalodon staff member user names and passwords, plus a set  
; ]) n- y7 y  f6 E1 I) ^1 A9 x           of data for each staff member to use to calculate repayment details. You will need to  
% T( b3 _! k! `7 I# K. i3 x7 E           log onto the BSA104 Assignment 2 page on Vista to generate your individual data  1 h) j% f& q" Y; w) ~, d. |
           and instructions for this requirement. You will need to use your University of  0 e; O( m: v' D" H  v6 G0 @
           Tasmania (UTas) student number.  
% G5 b9 {5 O8 R" b             9 N0 j) {7 i( x. @

1 r$ e/ U% A& o! Q7 w* M- R% C                                                        Page 2 of 5  
$ s3 D0 A& ]- w; J4 G4 ~7 u( Z. Z5 x7 H
For requirement 5 use the following data:
! W7 w: R9 ~/ k0 o& p3 i
1 A, J6 C2 \( m( U# Data Set 1:; c( H4 t' [- B  X6 g7 G, A
! a! {* K6 P+ x# L
User name: JordanM
5 a1 \; [9 W! ]) ~5 ^' R% i0 f- xPassword:  Ferrari2 k5 F( ?" H' ~. L+ e
Borrowed: $ 749.95
1 m9 |: @  s0 h( BInterest:    15.0 %) a( }$ [% i. S% }
Years:      4
  C9 t. u+ X5 q' `1 m0 W: H4 J+ O& n. @: p; ?; I( O- J
# Data Set 2:
5 z8 f' C) `  V$ W) q' ~+ J3 B4 r8 ?0 e% g! ~
User name: KimZ4 y! W, Y6 e3 N- Y7 k& s0 E3 J* p
Password:  DimSim8 P4 f* B: ?, C' U2 K
Borrowed: $ 150500.25+ g& V; L( h! h
Interest:    5.5 %4 e! Z- o* g/ \7 p" O
Years:      7
' P$ K8 H' u. Y% |2 O: R7 @- A  K, q* L
+ v: g- Q  H7 n- {5 U, @- H[ 本帖最后由 wwwsnailcom 于 2006-5-24 02:15 AM 编辑 ]
 楼主| 发表于 2006-5-24 10:52:42 | 显示全部楼层
怎么也没有里我啊,高手来呀
回复

使用道具 举报

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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-25 06:53 , Processed in 0.055833 second(s), 4 queries , Redis On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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