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

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

[复制链接]
发表于 2006-5-24 02:10:29 | 显示全部楼层 |阅读模式
汗,真是不知道怎么写,同学找了个哥哥,3个小时就搞定了,我编了3天,还有100多个错,可怕啊
; h* y2 A: ~% t: R' R# d有没有高手帮我哦,周5就要交了,我的邮箱是[email protected],谢谢啦& \3 r  l9 i" R4 U% q
Requirements:  
2 }; ^& {8 l0 p" YConsider the three Java Classes: Borrow, RepayCalc and RepayCalcMenu, available from the  6 l0 N1 S; K) ~4 U% g* E5 i! x
Assignment 2 page on Vista.  4 ~% \0 z, h3 M, s2 q0 e! V
  
' v; H$ _: m$ |7 A9 vYou are required to perform the following tasks:  - b0 ]! x) T& G5 \0 u9 |
  
. R5 j* `4 C2 ~: o- r/ oThe RepayCalcMenu class: (Total maximum 20 marks available)  . b$ v8 {* Y* |5 I5 |2 r
& v! W- Y/ s9 C' z& z$ t
      1.   Provide a basic text-based interface to a Repayment Calculator for the Megalodon  ' N8 N( n4 @6 Q8 s8 g9 d! _1 B
           Finance Company so that it can be used by the Megalodon staff members to  ! ?6 K* ]' x, @. B: E  }
           determine repayment options for their clients.  
' J+ a5 H5 I) O: X
+ ]3 n% n5 p$ H8 _           The staff must be able to:  6 w7 U% V/ R, _" M& A2 |0 s5 y1 }

9 U: X& e+ C+ F* C: N           *    Log on to the ‘system’ using their user name and a Personal Identification  ( ~' ]% `2 D# F& K8 G" m
                Number (PIN), which a four digit number **.   
, S3 k% M: v2 R" q4 \- M, _. V1 ]- l3 s
                   *    The user should not be able to use the ‘system’ until they have provided the  
% E7 K4 m# i  w3 _0 c                        correct user name and PIN combination. You should give them a second or    U6 b. G9 B1 y8 H0 j! C1 w
                        third chance to get it right before shutting the ‘system’ down.   ( g! M& x% ?* J& w4 u& R
/ n1 N; J8 x( |, W
  ! H; L8 {$ x: g1 C
                  , _8 U3 N- |  W7 S3 a4 u4 m: P
                ** You must use the user names and passwords provided in your individual  7 M3 b% w+ _3 l3 q9 l& R
: ?: S' b6 K3 \! ]  C) k9 N
                data available from the Assignment 2 page on Vista (see requirement 5 below).  $ D* Z% N3 R3 E' H
                The user names and passwords should be included in your code, and the output  
7 o& R/ X0 H, x/ W( o; o                to the screen should prompt the user with the user names and passwords (for    T" w* M4 K& S) }

. {/ V! a1 U) n* ]& A                marking purposes).  
) m! H8 X- A7 A- q/ w0 n- y
, S% i/ u) y# F2 J& s' A5 @                  
; Q' D2 i2 ]: N3 P5 Y5 ^# f             ' \# F. H: ?* B$ z
*    The interface should provide a menu so that the staff can:  $ R1 l9 M+ |1 P$ m6 ?

8 F* ~9 J) R' c8 G: m9 B                -    Perform a Repayment calculation  
2 \% e4 u/ u/ M8 o. D+ E
% p' F5 m: Q2 k* I. w4 b! `4 v                -    Print out to the screen the Repayment details  / g1 k  o# |0 e0 p3 P0 }. N$ P, k& K
' q& J% Z( u% m$ j; Y7 h6 E& W
                -     Change one, two, or all of the values for the current calculation  
3 A' d: K8 A3 }$ {5 v; I
3 Z6 d) O/ L' A  F* i  Y                -     Start a new calculation   
9 O0 n8 D- m  m6 r$ E- ?
3 r& i: W* g4 S; u/ J! g                -    Leave the program.  
0 N7 Y* [' y, Q4 ^% y: fThe RepayCalc class: (Total maximum 10 marks available)  6 Q, j; r/ q6 I. `' B' r( _
# [7 n2 A& t! c% ?
     2.    Provide a method to accept three input values from the user:   
6 Z. C  g  l; V& F
9 p- ?) G, A7 f. I1 a& W                -     the Amount to be Borrowed (to 2 decimal places, for example, 10550.00)  
, a# ~2 J0 m; i0 Z$ \
: L' O* t! H. @$ ~0 ~) ~" X! T                -     the Annual Interest Rate (to 2 decimal places, for example, 9.75)  
1 u# [2 z5 O6 k# [+ s( r2 u
) C; \4 J) R% \                -     the Period of Repayment (in whole Years, that is, no fractions of a year)  9 m0 n: \+ c; t& F

: N2 V, x, k' E      3.   Provide a method to print out to the screen the three input values (accepted in  
  C$ [. I. S/ \. @( a1 Z           requirement 2), plus the repayment calculations:  
3 ^9 Z5 f7 U  B2 a  n! ?
# I; b5 Q: f1 f  f& a4 M                -     the Weekly repayments  " R, w6 V( i- Z: E% M) j

$ ?; D% Y0 C. s                -     the Total repayment amount (Amount borrowed + Interest)  
' y4 L$ y1 B1 o0 B. C5 C" y) \$ x$ q6 g2 E, K
  . G9 l2 e, k& T: K: `3 K* P& {
' E: M7 _# P! U
The Borrow class: (Total maximum 40 marks available)   - g. e$ k9 E! }/ R& y! P

2 M/ [4 a) o  I' C# Q& K     4.    Provide methods to perform the following tasks:  
+ v5 i* [0 D/ b. N8 i& O( d# p$ i/ C# |% C# C! ]* [
                -     to calculate the weekly repayments ***  
) d' u7 K6 x- O
( t6 j) j4 c2 J8 i8 V                -     to calculate the total repayment amount  
( T; U0 [" A0 j+ b6 Q' z; E4 d6 V1 b$ ^
                -     to return the amount borrowed  ( V# S: [% a8 o8 ~4 Q, t
' i: `1 }1 T! e8 t& W" x
                -     to return the borrowing period in years  6 x2 H2 u+ l8 G" n/ }% H
  u2 a1 y3 |# r8 Q' [6 s
                -     to return the borrowing period in weeks  ' @9 c! m5 l# Y! G* g) ~
% \% m8 B( Z& p/ Q8 M3 m* h8 Q
                -     to return the annual interest rate  
' I  G5 s$ Q# \7 [# C, k* @: ~
8 U( O- Y+ ^( [( O                -     to return the weekly repayments  8 R( v0 w( ]; v5 N4 \! _0 E
5 y9 L- z( |7 @& v- C
                -     to return the total repayment amount   
% v; r8 J$ D; i' O, G% s! h- S: ~) O) K9 A- j& E
                -     to reset the loan amount  ( w+ j1 J' A* c/ A% B% q9 ]- Z
7 y- W! q. Y7 K, a
                -     to reset the annual interest rate  
7 g2 ^: k& M6 _$ t3 A: j' H* n- d% a3 g
                -     to reset the loan period (in years)   
1 o$ P; r) o4 ~5 A. u0 X3 h9 U" R: _( i
      
4 t, s2 O+ w5 o+ q7 X9 e& E" j* D* [: [" }8 j
               0 {' g7 ?/ g+ v. C; o; H2 C
      
& U8 ~) X. D. F$ d1 m9 G              *** Use a simple interest calculation (not compound) formula, for example:   
0 a; S) `3 O$ f- m      
8 T/ |3 u; l6 X' o             weeklyRepayment = (borrowedAmount * 1 + (annualInterestRate *  ! j9 ~  ^% d2 X
             numberOfYears )) / numberOfPayments;  
  T& k8 S+ B! `0 u3 D3 s$ b& J0 X. Q7 i8 W
          , q, m) K* o* R! z" }0 e
  E7 O# l* j$ s0 h$ r1 v, P
       * K2 E$ g# _4 O( T/ T- d7 A, f

/ x/ G$ z* x8 K! cIndividual Data (Maximum 10 marks available)  % U* \4 v' l: |# z: U4 k

6 G0 l6 C# C( p# \* T" X: B" g      5.   You will be given two Megalodon staff member user names and passwords, plus a set  
4 m7 m( m! T/ t           of data for each staff member to use to calculate repayment details. You will need to  9 \2 p. [# \. u* t
           log onto the BSA104 Assignment 2 page on Vista to generate your individual data  3 @& ]: \4 n1 l' t! A0 _
           and instructions for this requirement. You will need to use your University of  # @! S8 L; U" Y8 ~
           Tasmania (UTas) student number.  
" z* p8 Y+ [. ?6 i" y            
1 A/ R; Y/ f% [" o3 e5 a8 q) w
; X9 b6 w/ O( Q0 }! u                                                        Page 2 of 5  
5 r3 p, i8 O$ _  Q: J# t1 l, K
+ U* R- X& n6 @# N+ s& f7 M, @For requirement 5 use the following data:
3 ?% {4 u: ~% z$ B2 v
+ x$ ?3 S& X  C1 g5 S( z0 j# Data Set 1:
2 i  z% \8 s% I) t
4 a$ N* m. W3 [) X) g+ ZUser name: JordanM: W% @9 n# v( Y2 R5 S/ |
Password:  Ferrari
/ Z* F& J+ p" O$ }Borrowed: $ 749.95
7 a8 Y; e  n* K1 dInterest:    15.0 %
( d; F7 E& g( W% h- W3 I+ DYears:      4& I, B. K, z$ o
0 R4 t$ o8 y3 B7 T5 ^7 `
# Data Set 2:
* K; K3 j% i6 @
- t  \- B: T/ H+ w8 c% PUser name: KimZ- t7 _) C$ M1 T( A- b6 {$ E
Password:  DimSim
* `* a, B; _  `6 L8 N8 e8 ~5 MBorrowed: $ 150500.25  L' y+ ~5 }$ j. F/ m* m* b
Interest:    5.5 %) D1 W: n# v% a5 W& c$ j9 C
Years:      7) L) @& D" e1 E8 |8 J: t3 Q' h# u

( H2 c0 ]- [( v$ g1 s[ 本帖最后由 wwwsnailcom 于 2006-5-24 02:15 AM 编辑 ]
 楼主| 发表于 2006-5-24 10:52:42 | 显示全部楼层
怎么也没有里我啊,高手来呀
回复

使用道具 举报

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

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-10-1 14:36 , Processed in 0.015934 second(s), 5 queries , Redis On.

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

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