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

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

[复制链接]
发表于 2006-5-24 02:10:29 | 显示全部楼层 |阅读模式
汗,真是不知道怎么写,同学找了个哥哥,3个小时就搞定了,我编了3天,还有100多个错,可怕啊. [# K5 b. L( g4 @" [2 g4 V5 Y: V
有没有高手帮我哦,周5就要交了,我的邮箱是[email protected],谢谢啦: m+ Z$ _6 [7 N0 l7 s7 U
Requirements:  % {. U5 N. s" D* O9 I1 t5 i
Consider the three Java Classes: Borrow, RepayCalc and RepayCalcMenu, available from the  
. ~& |$ w8 D) S( zAssignment 2 page on Vista.  0 Z9 C4 w9 E: J5 ~  p2 r2 _* W1 v
  / f, R4 Q& V0 ~7 }
You are required to perform the following tasks:  
1 l" x! d+ P  b; r  # p/ x6 M9 e) Z: w0 T
The RepayCalcMenu class: (Total maximum 20 marks available)  " F& N2 E& i3 c1 i6 @
. l! u8 k0 P) }) y0 Z2 J4 q2 `9 y4 d8 E( M
      1.   Provide a basic text-based interface to a Repayment Calculator for the Megalodon  % \5 l0 p8 X- ~) ?+ e
           Finance Company so that it can be used by the Megalodon staff members to  
4 N& N% G, I/ s. S           determine repayment options for their clients.  
' F1 g2 d( ]* Y" F4 p# }& {. j& m' S
           The staff must be able to:  
, [% M# B, Q3 I" l- y
" m2 G- x3 R) V  t0 u           *    Log on to the ‘system’ using their user name and a Personal Identification  * s5 b7 R$ d  t0 y! j9 a* m
                Number (PIN), which a four digit number **.   
! d* j/ L$ e$ h1 f' `1 _8 ]' s8 R6 \6 z4 e
                   *    The user should not be able to use the ‘system’ until they have provided the  ( E/ i8 Y4 \5 o( X0 n3 ]
                        correct user name and PIN combination. You should give them a second or  8 _- _: Y9 |. _; E: |4 B* r
                        third chance to get it right before shutting the ‘system’ down.   
$ ^1 @& r; ~: Z% {
& k; g9 R* M  [* W+ l" Y) O- d' X  
: D, `4 I6 Y5 O8 a: e                  
5 e, ]1 w2 h2 b0 m' p                ** You must use the user names and passwords provided in your individual  
$ f# |. {0 ?3 m) h) B5 P- v* C- m/ u9 f3 ^+ R
                data available from the Assignment 2 page on Vista (see requirement 5 below).  " O  v  G+ F0 T7 _: U6 f& Y
                The user names and passwords should be included in your code, and the output  
* L: Y" a* Y" K                to the screen should prompt the user with the user names and passwords (for  
/ h" U7 i! K( ^, U! N. i. l1 [" P  I
2 j' j% Z' }! D" A% p                marking purposes).  
. c' b/ M, G3 e" k! }# l* L
  u; m' {) s9 h$ T                  
( p& ?- c% ?  E# e             * I0 O+ |9 u6 z/ q
*    The interface should provide a menu so that the staff can:  / J2 l8 k3 {& C/ N( o! s( J* M
" l; l: Z9 _- C* N; E5 {
                -    Perform a Repayment calculation  
$ _2 N& B; P  v, ?) X  `) u6 T: T
0 c* a8 p2 i- N/ V  Z6 g                -    Print out to the screen the Repayment details  
- \/ E9 v. F- e2 @% \$ S  `' Z
1 I, a$ C' _% ~6 F- V& n, F5 ~                -     Change one, two, or all of the values for the current calculation  
7 Z' o) R0 V7 u6 p
: W" U$ j# G$ \8 N- q; n                -     Start a new calculation   
* c( W9 Z( ^, ^, V" F3 F( P3 X! L
" a# Q+ H8 U: z, ^9 }0 R                -    Leave the program.  ( u+ p' \  r! `. Y
The RepayCalc class: (Total maximum 10 marks available)  
$ D4 n, ], @. {$ {0 G: _2 j# z2 P  b' D' a0 T
     2.    Provide a method to accept three input values from the user:   $ C2 i/ S! Q! J, s( y

/ v% \+ p7 P" q. [$ s                -     the Amount to be Borrowed (to 2 decimal places, for example, 10550.00)  $ X4 r5 }1 A# H, W2 k; a
4 I" ?) ^9 w# {) ?
                -     the Annual Interest Rate (to 2 decimal places, for example, 9.75)  
0 L' [( ]5 ]1 x  y0 V+ e$ l
. K, X, H3 }; N  C                -     the Period of Repayment (in whole Years, that is, no fractions of a year)  ' V7 y( v: c% D; l, w6 ?. U
: ]# i8 W. Q+ T0 r. C
      3.   Provide a method to print out to the screen the three input values (accepted in  
7 j- Q9 f* c/ s2 l" X, i           requirement 2), plus the repayment calculations:  
# c, [* W6 B7 d( a7 c
9 G3 X' J! N# V( U                -     the Weekly repayments  
: l4 z3 J6 v2 k
1 [5 t0 M& A  L. T* A) u                -     the Total repayment amount (Amount borrowed + Interest)  ! X3 D0 J1 g/ _6 t0 ^! G. o
, R0 r' g- E3 d$ _+ [& t
  7 w. O! i1 p/ ]. A
6 f8 R6 E* H! U4 @5 W$ a
The Borrow class: (Total maximum 40 marks available)   
: [( S/ @/ {5 H( O$ E4 {
8 Z' G; q8 Z2 ^7 q     4.    Provide methods to perform the following tasks:  
: g! s. A4 Y! _) z0 F/ [. i' E
                -     to calculate the weekly repayments ***  5 G7 U/ ~. p" L2 C6 V
$ [; n, M  L  X2 Y  W
                -     to calculate the total repayment amount  + v* T  y8 X7 H
7 z) V- L& X% K& e) P; S
                -     to return the amount borrowed  ! U# H1 O$ Z# O  r2 z2 b. ^+ d

% [* x* V- J! {0 L% ~                -     to return the borrowing period in years  
8 U7 O7 p! A, B4 ^; V! i: |
& ~" ?* D% e9 e6 _                -     to return the borrowing period in weeks  ) a+ \1 t0 k' ~) G$ A  Y5 m. F, p

7 r) E; F1 H( ]4 E. ?                -     to return the annual interest rate  $ L, l2 n! @# L+ q# C. A

. ~% d0 {7 Y+ Q. P: r1 {                -     to return the weekly repayments  1 m9 j6 C; P, k/ Y; ]0 r) m, [
9 Y; Q( V6 {. p# I
                -     to return the total repayment amount   
9 x0 Y) _. x- @% I1 G4 E
+ N' h6 x3 d' A3 v& K- d3 k                -     to reset the loan amount  
6 ~1 t: M0 h$ i# x* I' U7 Z/ W! ?+ q4 J9 Q' q- l$ C
                -     to reset the annual interest rate  0 d5 I1 d7 j/ l  s# j
; t$ ?6 F9 ~' V, s
                -     to reset the loan period (in years)   
8 M7 _6 c8 h2 L
8 M6 X$ P8 Z; K5 V" }; a       0 I' z& Y+ T; d/ ~

; c3 l; f4 o$ [7 ]4 ?+ s               
9 z" M9 o: Z7 g! P3 ]. i  x       / x' j: n3 Z. F; |* }- B/ e
              *** Use a simple interest calculation (not compound) formula, for example:   ; @2 `0 X- a( S! d8 b
      
+ _. }4 M5 D9 c5 U+ R: N" k! [             weeklyRepayment = (borrowedAmount * 1 + (annualInterestRate *  0 Q4 T. U# l0 m9 Y* u
             numberOfYears )) / numberOfPayments;  
" Q7 i6 C( N: w/ C% p: c9 X) F& m; Y( l' I* Y2 ]
         
) p! e' R8 i- `8 x
6 i) d7 ~# c! Q; x       7 `( b5 l) B! }8 A3 b5 u' ~$ I

" F+ b8 f! ^2 ~: ^Individual Data (Maximum 10 marks available)  
: R; J( o8 o$ S! O9 \3 p3 s! d2 l5 ^2 r/ ]7 w& s
      5.   You will be given two Megalodon staff member user names and passwords, plus a set  
$ S( k6 C( P0 u. Z2 T5 F, v% M           of data for each staff member to use to calculate repayment details. You will need to  3 J" y- {' Q" d  f% t8 |/ w
           log onto the BSA104 Assignment 2 page on Vista to generate your individual data  
  T7 p2 {- a8 v; j3 i3 H9 x           and instructions for this requirement. You will need to use your University of  
8 F9 ]+ x) }( a) Q0 }           Tasmania (UTas) student number.  
) d  o. ^$ }& i0 o+ y. u             ' y* u1 {$ g) a0 J2 O

$ Y9 D+ _! G) ?2 z- e! f                                                        Page 2 of 5  
9 \6 f" ^. X: B( O4 _4 W( z) Y* E2 N9 e( o8 T0 W
For requirement 5 use the following data:
* r! d1 ~- k# Y1 k* q- c# P7 }( O
# Data Set 1:
% H( Z7 Q  Y( b
: B* v- u0 G: j# C7 |/ v. RUser name: JordanM
3 l! `2 U, ~/ B0 b- iPassword:  Ferrari
* p9 B$ d- B( ?Borrowed: $ 749.95: z- Y6 I. Y* t/ v( X" p
Interest:    15.0 %& s6 {# g& ^( J
Years:      4
8 N3 [, t" @" H& Z# [. }* }4 F
4 x9 n) K4 p4 @8 H& c# Data Set 2:
/ |: J( O, J. g4 t! b+ _
; u' x, c& T% \# J( T& _User name: KimZ
! V; H8 y! \# s5 ^) M- l7 u0 |! MPassword:  DimSim1 C1 C- J% m* X  v
Borrowed: $ 150500.25
8 h, B9 L( _8 u/ o, S: oInterest:    5.5 %6 }% ?3 Y' |& g# V, B' b
Years:      7% e7 e/ X: D1 q" E9 @8 U2 \5 z2 J) u

: p" l& Z6 W8 l/ o# F* p3 s; L[ 本帖最后由 wwwsnailcom 于 2006-5-24 02:15 AM 编辑 ]
 楼主| 发表于 2006-5-24 10:52:42 | 显示全部楼层
怎么也没有里我啊,高手来呀
回复

使用道具 举报

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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-2-23 20:28 , Processed in 0.075515 second(s), 4 queries , Redis On.

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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