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

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

[复制链接]
发表于 2006-5-24 02:10:29 | 显示全部楼层 |阅读模式
汗,真是不知道怎么写,同学找了个哥哥,3个小时就搞定了,我编了3天,还有100多个错,可怕啊
8 _8 `) f# v& f/ L有没有高手帮我哦,周5就要交了,我的邮箱是[email protected],谢谢啦
6 }+ ~' p  G8 J6 s& JRequirements:  4 c9 O1 Y' f' @5 `% a
Consider the three Java Classes: Borrow, RepayCalc and RepayCalcMenu, available from the  
) h$ k" Q4 y# l& b- z2 i+ r. X! x! OAssignment 2 page on Vista.  ! [8 g; X, a( |! f& |/ t' s
  2 A; [( ~% F" y
You are required to perform the following tasks:  , A& M6 S. X  O7 G0 s
  1 [7 ]9 [' ?" d: j
The RepayCalcMenu class: (Total maximum 20 marks available)  4 c4 A+ K! m' ?6 R

* h  S- w. ?' y" H* R7 ?; J      1.   Provide a basic text-based interface to a Repayment Calculator for the Megalodon  / [. G; {3 I9 q& S5 [  n8 h
           Finance Company so that it can be used by the Megalodon staff members to  
2 y4 k% R) q6 N           determine repayment options for their clients.  
/ ^# w* I! E/ z5 R; z/ t. j8 q8 d0 q) W3 X/ B3 W$ a. |, X/ E
           The staff must be able to:  
' `, q3 _) e8 Z, F: Y" E" B/ Y6 q
8 {$ O0 d+ l. ?) ^, Y           *    Log on to the ‘system’ using their user name and a Personal Identification  
* u4 t# `5 P! L) m5 I; w* b                Number (PIN), which a four digit number **.   
6 a: b3 i/ |2 ^' O" M( ^; y9 z- _( ]
                   *    The user should not be able to use the ‘system’ until they have provided the  & A1 D) |; _$ z8 }+ e3 j/ b
                        correct user name and PIN combination. You should give them a second or  1 [  Q* i* }7 G
                        third chance to get it right before shutting the ‘system’ down.   % O: b; f4 I# n: ~9 d8 l& V8 ?8 x
3 N( L5 v/ w- M+ C
  
; e2 H* j3 Y. ~7 `6 `: w+ ]                  . v2 c- Q1 ?. R/ A
                ** You must use the user names and passwords provided in your individual  
5 P+ o7 n' h. @  \9 r2 [8 {
: O$ t$ X5 R( J- i+ T                data available from the Assignment 2 page on Vista (see requirement 5 below).  
6 Q+ H$ |5 z1 I" g% O: r& L9 ^                The user names and passwords should be included in your code, and the output  9 q+ _2 e! i  q
                to the screen should prompt the user with the user names and passwords (for  # A$ q4 G: r$ k6 l6 z1 z' f

- k. J% n$ v0 U; s. ~+ E                marking purposes).  
; v. N1 g6 {9 U8 w. g. L( n1 S/ A% p  a9 t
                  " p" S! u3 L4 H9 N8 N  L
             " y" H$ r3 C  [& G
*    The interface should provide a menu so that the staff can:  " W( U  W% n: j0 [1 D
6 l& r( u2 h9 b6 G: {& f( [2 _5 I
                -    Perform a Repayment calculation  . V5 w# M0 G; Z, K
& l& R" T" A: X' Q' |
                -    Print out to the screen the Repayment details  3 a$ X7 |3 c" @9 U) C* R; R8 v

; q7 g+ u0 [+ {- }# Y5 n                -     Change one, two, or all of the values for the current calculation  * F; [% M. l" s) \, m0 {4 a; o$ I

+ I6 R8 C7 M# m9 g! x% x                -     Start a new calculation   - H! y' Q" A: e5 s/ F4 R  `! T

7 `6 R' e9 o# L& x4 k7 A1 G                -    Leave the program.  
( I0 s: R- \" O4 AThe RepayCalc class: (Total maximum 10 marks available)  
; N  }$ U+ j. n) T( t  i8 t
; C3 o5 i: |* e  N/ L     2.    Provide a method to accept three input values from the user:   + y# S; {1 S) t3 Z6 h0 ^5 S  t3 H1 w
8 ~8 _. Q- @$ D2 s  l7 [: X3 n  |2 R
                -     the Amount to be Borrowed (to 2 decimal places, for example, 10550.00)  
5 h9 B3 q& y1 z+ }3 Y# w5 t% r' H- V3 w2 V0 T- \: P- O: ^! Z) ]
                -     the Annual Interest Rate (to 2 decimal places, for example, 9.75)  
9 G( N" V4 S8 e) T) l* p. R+ I) n/ Y! m
                -     the Period of Repayment (in whole Years, that is, no fractions of a year)  - \) J+ ~9 o/ S; d2 u9 ?

" _" v0 Z$ G# q- _3 v      3.   Provide a method to print out to the screen the three input values (accepted in  ! t$ @9 H. o) P( D* F/ }
           requirement 2), plus the repayment calculations:  * d( n4 E" V% H, }5 g
% A+ t% c$ [' {7 o6 @/ v! T
                -     the Weekly repayments  
/ W) B4 |7 j: D3 V! J2 W# f" K- P5 X+ T9 o2 Q
                -     the Total repayment amount (Amount borrowed + Interest)  
. \* b$ Y- q4 B/ p7 j* u
, _0 ?: W0 [2 z+ v  
! S# O3 c! ^$ u; T: d, Y  d! A0 f6 K; q
The Borrow class: (Total maximum 40 marks available)   
9 y4 u; t3 a8 n; ]( e/ |/ \
9 ~: M( t) B2 r, e% G" \# m     4.    Provide methods to perform the following tasks:  
0 C. H& ]" a' J$ L, Q& o9 D3 K; K  ]: n+ S  y% w( l
                -     to calculate the weekly repayments ***  
2 g7 V9 ]4 i8 V+ s+ g1 A
) U: R% i/ K6 s* F                -     to calculate the total repayment amount  6 y6 a4 x4 R6 |* H- O5 P7 R
9 A' X7 U* t5 s- T4 p" Z
                -     to return the amount borrowed  & |- P1 `- [1 ?6 W& l
9 K6 d4 r9 L1 m  i
                -     to return the borrowing period in years  - u  W% G$ a3 R1 l8 q- `
) J( A: [7 w9 B3 [  |
                -     to return the borrowing period in weeks  
1 J! ?: \+ T& F1 M& c* V
3 b$ s5 x2 \" g, O$ w# J                -     to return the annual interest rate  
# M4 t" G* S. \& [
: O* I, m. c9 C; S5 c3 A; \                -     to return the weekly repayments  
! r2 z) T$ {6 K* E- S* K+ H* D+ F: S( a' ^2 L  P$ n
                -     to return the total repayment amount   4 Y+ L  j3 F. n3 b

2 S+ m; i0 |; Q. c% a: H                -     to reset the loan amount  
0 s, B0 A6 n9 }, W8 |/ M& @  q, T
/ Z3 T. P5 }, K/ W. q- L$ n                -     to reset the annual interest rate  
/ Q4 M2 X; ?5 i" }8 u4 b
4 Z' G' {. Y/ g6 c                -     to reset the loan period (in years)   % y" r) O! c$ r7 W

" \6 b8 u. d! {; \/ L, J( j( u5 w5 q      
/ R6 |% Z! Q+ B" D) R- i+ r  d) \
" k: ~1 {2 C, L( m2 s4 w6 u               
8 C8 E3 r7 F9 e. j$ Z( g$ w# s' B      
# q; k6 ]: L5 m              *** Use a simple interest calculation (not compound) formula, for example:   
6 l- E6 X- w+ h; l3 ?; Z' l  ]       - }7 V6 R7 L" f7 @5 d' J
             weeklyRepayment = (borrowedAmount * 1 + (annualInterestRate *  % K, f0 t: K7 k3 G( }& r
             numberOfYears )) / numberOfPayments;  
0 y1 Y, C" K/ r9 J6 {# S8 x; P' |0 V/ e  `
         
' A. O+ w$ a4 L5 m! F5 J4 `! F& S$ P2 r1 k
      
0 Z, U: x+ x. V6 m% M8 P
0 I: ~8 l  Y  S7 K% ~1 i7 z" AIndividual Data (Maximum 10 marks available)  
8 p- }" @! {5 [0 t4 j. \" M8 G: }8 I! S- O2 f
      5.   You will be given two Megalodon staff member user names and passwords, plus a set  0 j& P9 C: e% {6 r2 @
           of data for each staff member to use to calculate repayment details. You will need to  
  P$ u& v- H9 B3 u           log onto the BSA104 Assignment 2 page on Vista to generate your individual data  
1 S  G, f/ g1 s           and instructions for this requirement. You will need to use your University of  ! Y4 o4 ]3 K. U' K: c. a
           Tasmania (UTas) student number.  
8 r5 K, s7 Q3 }# |" `0 L2 c            
2 W8 m! I5 }/ J3 ?' H+ j" [+ ?
/ {7 }9 H' P; W. b                                                        Page 2 of 5  
% ~: V2 j8 ?, J. P' k$ _; j1 T3 {0 h  e; e
For requirement 5 use the following data:" {9 H/ Y6 ?( @9 q' F
- _- f7 N  d5 N& x2 @4 g& W, J
# Data Set 1:, n+ I4 r1 g: s- x' {) S
% r: K# K! g6 J& `
User name: JordanM  L* m. ~- x0 d1 c' O
Password:  Ferrari; k/ f* w9 x+ ?; M/ q8 ^
Borrowed: $ 749.95. [* K9 G4 j5 v4 a9 X. l
Interest:    15.0 %" L) ]. U, i  N7 }# R% Q
Years:      4$ S! B/ x; m* U" E2 a1 S

$ a. F& O  a1 A" n& L6 B# Data Set 2:
6 b% {+ V0 o0 }4 X: Q2 t. u: v  M7 {+ ^0 ^& D0 o/ d! h
User name: KimZ; V# D: R6 ?3 Q: b8 q0 f8 f$ U2 g, f1 t
Password:  DimSim0 \9 U* |) @' v2 p& Q1 F
Borrowed: $ 150500.25- q0 Z5 u, [( h7 D$ z! a
Interest:    5.5 %
0 a! G5 E1 N- j: a" h4 s: tYears:      7
6 D  B$ `6 }% a* i* a3 Z4 i' m; Q* A& W! n
[ 本帖最后由 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 14:20 , Processed in 0.054846 second(s), 6 queries , Redis On.

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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