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

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

[复制链接]
发表于 2006-5-24 02:10:29 | 显示全部楼层 |阅读模式
汗,真是不知道怎么写,同学找了个哥哥,3个小时就搞定了,我编了3天,还有100多个错,可怕啊
, h, f- [; u; d8 K有没有高手帮我哦,周5就要交了,我的邮箱是[email protected],谢谢啦
7 ]( `! g* H; |$ IRequirements:  5 v4 R  y& n' z3 O+ T: [( M
Consider the three Java Classes: Borrow, RepayCalc and RepayCalcMenu, available from the  
8 A7 I7 |/ p( ~. @8 XAssignment 2 page on Vista.  . _+ l7 A- A2 c4 T$ i9 ?' N' q
  
! W, Z' H& o  Y9 K$ j9 N0 q+ ^You are required to perform the following tasks:  
+ s. u$ S8 S; J. i; j9 d2 q  * x- z& B3 i1 V* q+ l$ J
The RepayCalcMenu class: (Total maximum 20 marks available)  
, k$ W' B0 X  H8 P. I; m, y: G. Q# o
      1.   Provide a basic text-based interface to a Repayment Calculator for the Megalodon  8 U8 g# J  j1 N0 A3 A( n, o
           Finance Company so that it can be used by the Megalodon staff members to  
* c/ X& \& k& o# _) X           determine repayment options for their clients.  
# O4 N. s: Z7 q$ Z
5 w5 l0 p( {9 [6 Y: z           The staff must be able to:  5 L  K% @, C+ C" J1 I! l: p

& g3 g( M4 ]" F- i2 c7 S           *    Log on to the ‘system’ using their user name and a Personal Identification  
- ?3 T: }1 k) ^# t: k                Number (PIN), which a four digit number **.   
- N8 A% l; B1 J" P7 n! z. K. }+ U& U8 ?6 ~  I4 w4 l4 J' A
                   *    The user should not be able to use the ‘system’ until they have provided the  " f5 @+ S3 X: @+ a- y+ o" ]- M
                        correct user name and PIN combination. You should give them a second or  1 F% y: f+ N3 H" s6 W$ l
                        third chance to get it right before shutting the ‘system’ down.   3 J3 \, L# f5 A
. q+ r3 e/ a; C7 X
  2 B" E9 O0 D8 S' r% `& Z
                  
' V( x% g, N: M                ** You must use the user names and passwords provided in your individual  
. [4 T/ f# m4 r2 T: y
! s1 ~& s4 H2 B                data available from the Assignment 2 page on Vista (see requirement 5 below).  
* F! Q% Z! H5 a" o) v& k                The user names and passwords should be included in your code, and the output  8 \- j1 D. F8 l; D
                to the screen should prompt the user with the user names and passwords (for  % b6 V4 a! P: F1 Q, b

, p" O6 [0 H# U% M                marking purposes).  
0 v; Z# T/ K; V2 a. r6 X2 O. l
3 ^+ R1 b) N* w6 ^7 M2 {# O                  # X2 \- [) w: r+ ^
            
$ E& W& K) ?, l$ G& ]3 Z*    The interface should provide a menu so that the staff can:  / f# M7 m6 @- e# m: E& s) f( J; c

' x( B# Z( ^0 n                -    Perform a Repayment calculation  , R/ ?7 f1 ~* O+ W# c* J6 ^
6 K8 r& E' P& Q4 d! {
                -    Print out to the screen the Repayment details  
2 e9 w# G) W, Z0 ]4 @3 Q
. q4 d5 c4 x* J! v# k7 D                -     Change one, two, or all of the values for the current calculation  6 z6 w4 }/ ^8 T/ |; A' `

, ~7 R5 T- u  s/ S" \                -     Start a new calculation   
" @# N- y  h# d' h4 d8 Q. G
1 |0 {* F$ _" ~                -    Leave the program.  1 j$ Q0 g# h3 ^) b- k3 f
The RepayCalc class: (Total maximum 10 marks available)  
; M1 Z0 _4 B6 A  |* o' c. m$ C( Z; O
     2.    Provide a method to accept three input values from the user:   8 }# O' f$ q. Z- [

( G7 I; M% Y* V                -     the Amount to be Borrowed (to 2 decimal places, for example, 10550.00)  8 X: k, H' J! D' d% ~
8 W- x; |' s" l
                -     the Annual Interest Rate (to 2 decimal places, for example, 9.75)  
( l6 H) F' J  k$ K6 u# e" K
4 R6 S  ]% R# V% ?  d7 I# I                -     the Period of Repayment (in whole Years, that is, no fractions of a year)  9 s( a+ i" @, _

& T! w4 S4 I2 U9 q2 _      3.   Provide a method to print out to the screen the three input values (accepted in  0 F+ u5 Q# ~( Y9 x# L* W
           requirement 2), plus the repayment calculations:  4 c1 Y* I" @. |: d

% e# _3 P4 t! ~2 p; I                -     the Weekly repayments  / ~1 L$ l# _1 ~/ F; i; I# K/ p

# q; Y: a* u. X) ]6 Z/ @% m  K2 \7 B                -     the Total repayment amount (Amount borrowed + Interest)  
7 @! J# N7 M6 m" H/ y! j9 ]% e5 i3 x+ A8 s
  
1 B# Y, m- G3 ]: [# a! `
& U( W+ v/ W* D3 O' u. dThe Borrow class: (Total maximum 40 marks available)   # T! i5 j& R& a' O

) s6 r: d* C5 b# N4 X     4.    Provide methods to perform the following tasks:  - g: d" w9 f3 `8 x! f' u
; ~2 W( F- }- x8 }* P- M2 x7 W
                -     to calculate the weekly repayments ***  
$ A* i0 S# U) e/ l$ T4 p7 Q+ O
; N) r  j6 r- F) X$ e8 L, Y' ^" O/ W                -     to calculate the total repayment amount  # l' T( m0 B! P3 w& N9 F" _, X

" @' h* Q0 J% |1 w' F4 w                -     to return the amount borrowed    ]9 N6 f$ C  O: S! C4 Q  R
) ~+ q7 N+ M& T# a9 q% l8 s# h) ^
                -     to return the borrowing period in years  1 o, @* T) @7 F4 m3 o/ N. u' J3 A

; U% d1 C* P* s8 g& p8 B; ~  I6 P2 Y7 D                -     to return the borrowing period in weeks  
1 o6 F+ U  m# ?4 Z" x. M3 ^9 W9 j; S* N. B
                -     to return the annual interest rate  
3 }/ `5 ~) F; D3 M( @) B9 _. A( R# k1 d/ w
                -     to return the weekly repayments  
; I; k  S" ^" q+ t
  F- h: |% ]6 f% Y$ Z5 [; p4 F                -     to return the total repayment amount   1 q" l: l" k2 S
% ~: O% ^, |% E
                -     to reset the loan amount  7 E2 @) s1 b( a9 j5 H. _
0 P- ^  `9 P0 ^1 N
                -     to reset the annual interest rate  ( w( ?0 |" q' y+ o0 i
8 B) N1 S6 O* e: Z+ n+ H) u
                -     to reset the loan period (in years)   
& N- y( _6 g5 F4 U  t( k' Z0 e- q; B5 k9 i; z7 A
      
) ?5 U  X/ h+ S( t4 G7 o/ U3 f+ ^
               
: k% j- P1 Q$ }) c       2 _0 V7 p; R6 D1 t5 W
              *** Use a simple interest calculation (not compound) formula, for example:   
0 C3 e# f: T, [6 a& N0 M: B/ s! I      
; }' w# H& n% R. F             weeklyRepayment = (borrowedAmount * 1 + (annualInterestRate *  - }1 {( r. [9 [! Y6 X
             numberOfYears )) / numberOfPayments;  9 K% R. Y! i- y  n9 p; f7 n1 w
8 U- U( A; C7 |& u$ R
          % {% Y- l4 z" ]  ]8 @" e
( C8 w! j$ y+ ^) W
       & ]+ o% C# x8 d0 z7 w( H9 E5 T) B

) r: U& b3 ^+ g. eIndividual Data (Maximum 10 marks available)  ; _  p& \  ?# i. T7 L, x$ [
# Z& V) Y. B: a. D, z2 Z
      5.   You will be given two Megalodon staff member user names and passwords, plus a set  0 J7 Z) r8 y$ U; Y+ A+ }; W
           of data for each staff member to use to calculate repayment details. You will need to  
2 l2 ~5 H; U# G* r. P8 f           log onto the BSA104 Assignment 2 page on Vista to generate your individual data  
% w9 I# T7 g. q$ i- i+ V+ v7 s           and instructions for this requirement. You will need to use your University of  
* T" @( y, p1 f- h: j- F) ^! I           Tasmania (UTas) student number.  
0 \7 f& ?) @. S9 K& \             % t4 |4 g# n, f  S  k/ z6 m2 K

0 N2 n  R: O  ^" {2 V; E; `% v                                                        Page 2 of 5  2 @5 r- T% h! J5 x% a
. R8 s: \, d9 f/ P
For requirement 5 use the following data:
6 E) I, c) s0 n6 T5 t+ E  W* H8 o/ \4 L% \- o- M7 `& o. C0 r
# Data Set 1:
! }$ q4 y: c" f# u4 r* y- x3 L/ A9 y0 l. B
User name: JordanM
, k! v5 s4 o; y9 nPassword:  Ferrari
" p& N) A3 g- d' @0 LBorrowed: $ 749.952 ~4 p7 |2 f+ |; e$ q
Interest:    15.0 %' T" W& m+ |" z' E4 L
Years:      4
5 D9 }4 ~8 _9 T5 N# b. H& r/ i- }  J
: k5 o2 I  }1 q  Y- P+ p# Data Set 2:
3 B0 l* I- ]. ~* K# j8 X6 E% A# F0 n% E4 {1 y1 A8 I1 Z
User name: KimZ
# O+ k, m) u8 N! h7 l* `7 [6 ~- OPassword:  DimSim9 U* A( j% @' {+ e
Borrowed: $ 150500.25" {# Q* [/ S0 N3 A( `5 @
Interest:    5.5 %
4 l+ L0 q+ d2 @/ X& q1 w$ T- d: BYears:      7
9 J1 @* q+ k, p& D
* p! h+ q/ T' B/ P  t4 N[ 本帖最后由 wwwsnailcom 于 2006-5-24 02:15 AM 编辑 ]
 楼主| 发表于 2006-5-24 10:52:42 | 显示全部楼层
怎么也没有里我啊,高手来呀
回复

使用道具 举报

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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-10-31 15:52 , Processed in 0.057783 second(s), 5 queries , Redis On.

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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