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

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

[复制链接]
发表于 2006-5-24 02:10:29 | 显示全部楼层 |阅读模式
汗,真是不知道怎么写,同学找了个哥哥,3个小时就搞定了,我编了3天,还有100多个错,可怕啊4 h" G5 d3 ~" y9 P8 p
有没有高手帮我哦,周5就要交了,我的邮箱是[email protected],谢谢啦/ ], |3 |. N( O  G6 V8 T
Requirements:  + f! |9 _/ |5 `' s
Consider the three Java Classes: Borrow, RepayCalc and RepayCalcMenu, available from the  # {9 T9 o" @, a+ q( i
Assignment 2 page on Vista.  
, H  i5 L- k4 u8 g2 l- ?, Q  
- n% N0 J3 _* a- Y5 o, X, b( MYou are required to perform the following tasks:  
5 V+ q* E3 j) F" {) \& V* V9 g  d    q: |+ u6 M  c/ t$ F2 g
The RepayCalcMenu class: (Total maximum 20 marks available)  
( n2 S8 h: ^3 L7 T- d
/ i+ a" o. B) v0 ]4 s      1.   Provide a basic text-based interface to a Repayment Calculator for the Megalodon  
. ?2 _+ Q7 Y- H           Finance Company so that it can be used by the Megalodon staff members to  3 T% P/ Z6 k, r8 r
           determine repayment options for their clients.  ' ~- \$ f( I6 k
+ x# d/ [0 M8 I  O3 ]
           The staff must be able to:  9 s6 e# i# h( u/ S

) {9 }: j" f" |  C  c% t           *    Log on to the ‘system’ using their user name and a Personal Identification  
: h1 C, _3 A  C7 B: f* H5 G2 E                Number (PIN), which a four digit number **.     v& \  [1 Q& M' Y- \. l3 [
) `1 |/ Z8 F' |/ i- d2 h+ C
                   *    The user should not be able to use the ‘system’ until they have provided the  
; m% R5 q% M2 E) V6 b* \3 S4 i                        correct user name and PIN combination. You should give them a second or  
0 R' i2 d# }) r/ j. m5 f                        third chance to get it right before shutting the ‘system’ down.   ! z' a% g  B) {2 u

- h% S' D) P6 H: w" ]  ) l5 R/ p  b" D& {4 z4 z2 i) H
                  + [! I7 v! S& Q# b$ J7 h
                ** You must use the user names and passwords provided in your individual  
" y4 M" V3 b$ P# D! N$ J
- ]* B  y1 a4 {" p9 Z& i; C% e" p                data available from the Assignment 2 page on Vista (see requirement 5 below).  9 G2 Y1 J2 a3 H" a' e
                The user names and passwords should be included in your code, and the output  4 C. T) U3 `# C2 w
                to the screen should prompt the user with the user names and passwords (for  8 x! M6 O- ?4 X; N7 m

$ \% z1 R6 b, ?0 H# M3 c                marking purposes).  
9 L2 F- h6 l- J4 h* D/ k7 c- @
% F$ ?7 b4 U& V3 ^                  $ p" D: N, ^# e% ]
            
. S7 q* y2 N. {! z8 y' d' e*    The interface should provide a menu so that the staff can:  # E7 Y# P; A3 C
( x; X, E+ b' ?
                -    Perform a Repayment calculation  
) l9 F: k( I: s7 \/ b
( ^. V9 o$ T4 I( C                -    Print out to the screen the Repayment details  , j# Q* ~! _+ h  a2 z  n& c

+ e* u3 \( @# _+ c" P6 v2 z1 L                -     Change one, two, or all of the values for the current calculation  
/ W- ?; Q) `+ i, d+ e3 P' \
1 R0 X+ L) [' F: h                -     Start a new calculation   
" `* h" p9 ^, i3 T0 F8 Z% N( O! T! Q3 R; N
                -    Leave the program.  % i; q+ m8 i, T+ o& J
The RepayCalc class: (Total maximum 10 marks available)  
0 G  u1 B9 k% ]  p1 A- L- i# o  h) A$ I% u; D6 L
     2.    Provide a method to accept three input values from the user:   7 W& M/ E6 ~. `" E6 |2 ~* L2 U
6 P# \0 x, E  O$ X( F4 J; z7 w9 v
                -     the Amount to be Borrowed (to 2 decimal places, for example, 10550.00)  2 q" `( w* m4 Z! g. j% d

% k2 r2 E4 _* b" y7 w% t, ~. }( ~. j                -     the Annual Interest Rate (to 2 decimal places, for example, 9.75)  . R2 z# w* M( `

/ s6 e) @! l! s+ O+ s: B                -     the Period of Repayment (in whole Years, that is, no fractions of a year)  " x" T. o& K. g  z. b# g. Y5 h- |: |
6 _- g$ l  s! X5 C2 O
      3.   Provide a method to print out to the screen the three input values (accepted in  
( _4 ?% n# H+ h% m  @3 {           requirement 2), plus the repayment calculations:  1 [+ E+ f! p, H' `7 E
( L" V* v! J  E, L$ C
                -     the Weekly repayments  ! Q7 B+ n. X; G0 `
5 J: O) n% `0 S( b  a
                -     the Total repayment amount (Amount borrowed + Interest)  0 T" u. Q* d8 {1 r' d

* p0 K( D+ I4 O: X3 n3 c. a' @  4 M. {; ^8 `$ d5 {! I9 l+ [7 X
0 i  p8 B1 P- A5 v- Z  j5 L/ a8 ]
The Borrow class: (Total maximum 40 marks available)   $ P) c" i8 N- I* y- e( x; m5 [: ?
. V9 u; p  L6 e1 u, ~. i4 |
     4.    Provide methods to perform the following tasks:  ! z- i% z8 V% \5 \- A
, w# E/ r. D. L9 h# ^4 k4 R
                -     to calculate the weekly repayments ***  
3 s) C0 z( V4 l0 c; @
. x/ Q0 p; Q& m+ S                -     to calculate the total repayment amount  6 w1 v$ ~1 B/ U" |7 C( y8 j

- ~5 D6 B: M2 Z# [                -     to return the amount borrowed  : A' _5 H, \% M% R) g0 R
' l6 |4 y! A- w$ g4 G0 I
                -     to return the borrowing period in years  ! Q+ l- r* |% |- E: _  ^0 g
+ b" H8 I" T2 |' c- g
                -     to return the borrowing period in weeks  
; t3 K4 d# ?, _8 D' J9 s
% k+ |" K6 b- h                -     to return the annual interest rate  4 Y% Z* ]% g7 a6 N. N
8 W' V$ F) S) r% X% J" p
                -     to return the weekly repayments  : h( G3 Q& b  l1 H/ Z9 ?+ o% n" \/ o

8 N6 X4 O  V8 ~/ C                -     to return the total repayment amount   8 b4 y& n+ ~3 Z- V
+ X# o' r# }# Q$ F
                -     to reset the loan amount  - E2 |4 ~" X# O$ p7 I

" w( b$ G& C, Y2 ^/ o. v' [: q$ B                -     to reset the annual interest rate  
: z. @5 A, c8 `" r$ H8 w- o4 S: g6 Q: ?$ N9 s5 ]/ Z6 [0 z
                -     to reset the loan period (in years)   7 H# k! ~* u6 Q

9 d! {7 R) `% l: i  @      
, B) P. l4 D0 B0 b% ~$ ?( n9 v7 _1 i8 K" Y# Q" ?
               
1 Z4 U3 z& E5 J9 m      
/ N" B: t0 P- G& P. ~              *** Use a simple interest calculation (not compound) formula, for example:   
( \0 O7 @4 B' ^$ y! p, ?7 m       - \! n, F% F4 d1 D. S
             weeklyRepayment = (borrowedAmount * 1 + (annualInterestRate *  ! C$ c* L  x" c$ L# d2 t
             numberOfYears )) / numberOfPayments;  . O! n& E& ~6 y: N& i$ z

8 ?# t  }3 B: g         
' Y  ]3 U5 d8 _# u# u) a) j: C- O4 v, {: B5 s8 A! i  Z" z
       # P. H# T: J6 A# g2 C  k! m# m
) b9 \3 M; H. o" R4 k4 V+ s5 _
Individual Data (Maximum 10 marks available)  
# ~3 c( k1 ?- z7 p9 Y% J1 y/ ]5 ^$ k6 l. X. W  r* M
      5.   You will be given two Megalodon staff member user names and passwords, plus a set  
8 L+ P1 k, I1 d9 D1 O) l4 a           of data for each staff member to use to calculate repayment details. You will need to  
/ W! j: v& O: K( A" Z           log onto the BSA104 Assignment 2 page on Vista to generate your individual data  
& t% `6 I/ [% y: ?, O! I           and instructions for this requirement. You will need to use your University of  ) Z" ]6 u2 o; Q5 o, N
           Tasmania (UTas) student number.  % K/ L8 D: V1 R: v/ e
             4 y- N$ j% J1 i7 s2 f' `1 O: D
0 n, @4 b. y( w2 p) ^6 g3 n
                                                        Page 2 of 5  
2 @' T3 W: R3 ^
4 l) ~: G: v0 N1 IFor requirement 5 use the following data:9 X$ f, W7 h5 _6 v8 z% Y) m/ [6 p+ G
! S; g, W" D6 ^6 o4 d6 w. ~
# Data Set 1:
7 e5 M/ Q' A4 J. b7 t9 }3 r6 D1 ^9 F2 P' l) T' @" t* }7 A# `7 J
User name: JordanM0 M5 C# `" h" l& y) o5 M% W1 X& @
Password:  Ferrari
+ l+ E0 c- b8 \/ L( _# b6 J0 q) tBorrowed: $ 749.95
) Y8 e  y, M' LInterest:    15.0 %
5 U# Q' ~  j( e, D. R  K& J$ GYears:      47 z, E* Z" q) c8 T+ L) F

- N, b3 u$ n# b" r8 c& Z& |: |# Data Set 2:  B. w" o. y& w+ V0 [$ k# U

& P: V8 `/ Y: X4 IUser name: KimZ  ^3 K% B! z8 h2 p2 W) @4 X' j! b" m
Password:  DimSim- l$ f) X, L9 L6 y
Borrowed: $ 150500.25, W3 X% Q* C5 B$ ~9 a/ i' B
Interest:    5.5 %" {; U3 k. G) _. H2 O
Years:      7
7 S& Z& F. @' l9 z$ u# ]
, Z9 W/ D8 c& N* _% E[ 本帖最后由 wwwsnailcom 于 2006-5-24 02:15 AM 编辑 ]
 楼主| 发表于 2006-5-24 10:52:42 | 显示全部楼层
怎么也没有里我啊,高手来呀
回复

使用道具 举报

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

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-2-5 21:36 , Processed in 0.067834 second(s), 6 queries , Redis On.

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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