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

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

[复制链接]
发表于 2006-5-24 02:10:29 | 显示全部楼层 |阅读模式
汗,真是不知道怎么写,同学找了个哥哥,3个小时就搞定了,我编了3天,还有100多个错,可怕啊
$ s* z5 a# Y) R有没有高手帮我哦,周5就要交了,我的邮箱是[email protected],谢谢啦
8 s3 q0 G7 A: |Requirements:  ) P3 @) p6 `+ B0 K0 o
Consider the three Java Classes: Borrow, RepayCalc and RepayCalcMenu, available from the  
, w' H) s  M+ `) \. ~Assignment 2 page on Vista.  * @6 n3 d+ C, m! u9 L; b  Q
  4 v9 @, U0 t, m
You are required to perform the following tasks:  ; T8 D3 ?& G# T* B" T2 R
  
( F; \) T7 h7 ~6 @1 S3 oThe RepayCalcMenu class: (Total maximum 20 marks available)  / I4 j: ^- N$ n/ C2 |3 r

8 B8 Y+ T# b; |0 `( G$ c      1.   Provide a basic text-based interface to a Repayment Calculator for the Megalodon  ' o9 s; Q: c. F5 ]6 a
           Finance Company so that it can be used by the Megalodon staff members to  
6 Q8 w6 U' U" y0 v           determine repayment options for their clients.  
# t! B& K. z: c. `/ |( @0 N2 V" x" h5 C$ L5 _# @
           The staff must be able to:  
& f* \7 H8 h  a) J: a# o' b6 r% F: p' y# k/ V
           *    Log on to the ‘system’ using their user name and a Personal Identification  & N* @0 W* ~  |5 A: ^% K
                Number (PIN), which a four digit number **.   , ~/ Y- ^" a# K; k- _0 ^" M
9 I2 {  H7 s/ i
                   *    The user should not be able to use the ‘system’ until they have provided the  
; A  k9 T+ }, a) P# o6 q1 `% `                        correct user name and PIN combination. You should give them a second or  
& c! x. o9 Z4 F! ?5 q/ A                        third chance to get it right before shutting the ‘system’ down.   + T9 Q' G6 T  o3 P
( t* ^. s, j8 f/ G  ?  u
  * f. I: f4 |, _& Q
                  * v0 P' G5 ~- T% \6 m* @+ A( X
                ** You must use the user names and passwords provided in your individual  
" S2 y8 a" W% M; y
2 ^5 Z( z0 d+ E                data available from the Assignment 2 page on Vista (see requirement 5 below).  " C3 P" S0 p3 p  I  k+ ?
                The user names and passwords should be included in your code, and the output  : k, o6 e2 O' _% I2 N2 C0 M% N* [
                to the screen should prompt the user with the user names and passwords (for  
! s% I! [" c& B, Z4 _* k* m) Z& q- r& B9 k0 Q- v& }# O2 M5 C! O
                marking purposes).  6 }; ?! d: z, ?+ ?+ O/ m$ ~

: m, _4 h( }% k* k: c$ X2 ^3 G                  
6 }" a1 K: T1 ?( z! N+ _- u            
& D' M: d; U2 z6 D" |7 s*    The interface should provide a menu so that the staff can:  ' |/ Y# u1 J' N9 G1 z3 s$ M- I

: Z) o7 Z5 n/ h* o. U                -    Perform a Repayment calculation  
% w; N. z3 P) O7 t0 w! n
0 P/ Y6 a, c, N/ {" L0 d                -    Print out to the screen the Repayment details  
3 f  f* s* r: y4 u$ }* ~9 ]& F! p1 C2 Y# i1 |
                -     Change one, two, or all of the values for the current calculation  
" e% ~, Y  e3 @& F
; X- w& q+ U- y5 v) x                -     Start a new calculation   
, z& j5 J4 V0 h3 H
5 W; @, [: [6 F% H# ?                -    Leave the program.  
+ b) g+ s2 n  J8 W% E' x' PThe RepayCalc class: (Total maximum 10 marks available)  
& g, L( _' t1 y
6 C, t9 E1 a) J$ X     2.    Provide a method to accept three input values from the user:   3 o! A# t0 {! H3 R) @- j/ [9 G
  i% |7 [$ v7 I
                -     the Amount to be Borrowed (to 2 decimal places, for example, 10550.00)  2 q0 e% S7 ~' f! k0 ?

% q8 i+ r& L, R                -     the Annual Interest Rate (to 2 decimal places, for example, 9.75)  
7 _* q; n) ]3 t  ~
1 a2 x) i/ L7 M* _8 b$ I2 H1 e' {; e' i                -     the Period of Repayment (in whole Years, that is, no fractions of a year)  
- B3 s, l; ]' q3 P9 Z$ ]+ Z5 O& w' Y1 b6 y* D
      3.   Provide a method to print out to the screen the three input values (accepted in  9 l# o$ ?' \- Z: w
           requirement 2), plus the repayment calculations:  1 L* c; H( L# D$ L8 v
! B+ C0 y) _0 M- P8 Q. d/ l- e
                -     the Weekly repayments  
  q( U* c2 t( J8 A9 `0 K' g! a3 P; R$ s3 a% I
                -     the Total repayment amount (Amount borrowed + Interest)  
9 v& g0 C% F; `* T( u7 N  x
. R0 A% H3 f8 c; W) v3 `* o  
# e" ^4 K' A( f  j8 T3 l  U/ \
4 |. ]5 T8 [+ n! SThe Borrow class: (Total maximum 40 marks available)   0 d7 h5 E$ J- \4 z& R7 ?% J

6 y# M. B2 X1 }3 B     4.    Provide methods to perform the following tasks:  + F. H) I5 i5 j, ]; `

7 u0 S- b, O9 K0 I7 v4 E6 _" D( D                -     to calculate the weekly repayments ***  
) T) j$ _7 x* F+ |2 ~% [! V. {  ?0 j& T7 l
                -     to calculate the total repayment amount  / `$ q  m8 E4 l& w8 `) g/ G
4 r# v4 j; N( s, v, n% z: M+ R
                -     to return the amount borrowed  ) y: L+ A" |6 o! ]

" n! m$ z( {' L                -     to return the borrowing period in years  
4 w: u# S9 @0 |! x  j4 _
8 z6 g: S; Z/ r! ~, o  \1 ?/ `* C                -     to return the borrowing period in weeks  7 _5 S$ G  s- ?$ d

% H% t8 s5 f) q+ w                -     to return the annual interest rate  9 s, G$ X$ R5 e

4 m6 q) E5 i& w                -     to return the weekly repayments  
* H0 i0 N. z, S% \% K' E
" O5 T; ?2 ]# c$ q/ {% c3 `                -     to return the total repayment amount   
% l3 k( ?1 I4 Y3 V9 i) A. C! f$ d: a$ O; U8 B* N7 f! Q
                -     to reset the loan amount  
& |6 _9 o8 Z6 \' h( [; T' D, v6 x# R
                -     to reset the annual interest rate  ) `8 |* D  {7 A6 I8 H; f
, {% M0 F: L6 E& p
                -     to reset the loan period (in years)   6 M- R! X  a) ~( }% q
; q- E7 {9 ], I
       * ~! k7 m# E+ e! v

+ S  [, d% W$ ^' h               & t) t) n" J9 x! `6 ?% A
      
1 n% l: c& y5 f# f9 l              *** Use a simple interest calculation (not compound) formula, for example:   ; s$ w/ e% @6 H
       ! j1 ?! v! v9 q5 }7 t$ v4 W0 ]* y
             weeklyRepayment = (borrowedAmount * 1 + (annualInterestRate *  
5 r) }, ^  O" I4 v% |. q             numberOfYears )) / numberOfPayments;    Y" P9 m; z+ [/ v5 Y

4 G7 g* Z1 j6 y4 ^4 b2 |" @* o5 g          ! _2 `7 x7 C( I, H& ~
- ?& t2 ^1 q: s$ k
       - N0 U- m& u  R

2 _: R, z1 t$ _6 X2 `3 O1 ~6 g3 A) QIndividual Data (Maximum 10 marks available)  6 U+ o* {# |" t* J4 x
) x  N2 X, P3 p7 H
      5.   You will be given two Megalodon staff member user names and passwords, plus a set  
. J" A4 ?# j' y/ s           of data for each staff member to use to calculate repayment details. You will need to  , j1 k8 j9 E6 ?3 v
           log onto the BSA104 Assignment 2 page on Vista to generate your individual data  ! v7 n1 O, P. }/ }6 F
           and instructions for this requirement. You will need to use your University of  
7 m: d( _; u; M, D           Tasmania (UTas) student number.  
3 t4 J5 ^" C2 ~7 P3 _6 h4 s/ @            
1 E6 s) Q6 g# p/ m2 m  w7 m  d- D* e) }+ g$ s6 i
                                                        Page 2 of 5  
& r0 X2 b9 i+ z! G0 h
) E; L+ A6 {) c  ^3 T$ sFor requirement 5 use the following data:
) W6 X+ j* @) n1 ^8 ?2 x! t$ d6 d5 L( ~: M# ?! E- W& H
# Data Set 1:1 ~! {2 {: {% o) M
, Y$ X6 j# z1 E  Z1 s' U/ V
User name: JordanM
( Q9 H% m  w, I: H2 MPassword:  Ferrari
: _4 V  U/ S% ^8 K8 b* F4 l4 ~Borrowed: $ 749.95- `7 B2 O0 [1 t# K
Interest:    15.0 %
4 p9 q& e" B3 V% D, }Years:      4
. X0 F7 Z  e# v, Q- N9 c2 W" A& L3 G( b3 n
# Data Set 2:
" Y/ f& X4 B) h( D' r2 q# ?4 }: ~, |& C9 Z9 G/ ^  P) c6 f/ j
User name: KimZ
) [( r- _2 N' b4 ?Password:  DimSim
( @9 F3 k  h: H4 PBorrowed: $ 150500.25
5 F8 x0 o" \) G' |( L7 E) L3 NInterest:    5.5 %; T" g% y, w1 B7 K4 q3 B3 k6 ^
Years:      74 G0 v% T1 m* J
. i9 o7 j! h2 N9 a) y3 l0 B/ w  [% ?
[ 本帖最后由 wwwsnailcom 于 2006-5-24 02:15 AM 编辑 ]
 楼主| 发表于 2006-5-24 10:52:42 | 显示全部楼层
怎么也没有里我啊,高手来呀
回复

使用道具 举报

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

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-11-1 10:58 , Processed in 0.009490 second(s), 4 queries , Redis On.

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

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