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

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

[复制链接]
发表于 2006-5-24 02:10:29 | 显示全部楼层 |阅读模式
汗,真是不知道怎么写,同学找了个哥哥,3个小时就搞定了,我编了3天,还有100多个错,可怕啊
) y7 R) [, }4 R5 {有没有高手帮我哦,周5就要交了,我的邮箱是[email protected],谢谢啦
+ g4 m0 c+ }3 J% S+ d3 v! A9 XRequirements:  
% w  R3 _0 O( P. P! R2 lConsider the three Java Classes: Borrow, RepayCalc and RepayCalcMenu, available from the  7 |3 A% d2 q& T" s2 x" l
Assignment 2 page on Vista.  # r. S/ R- L9 q) ~
  & e& H' a/ O) m1 R3 y3 ?
You are required to perform the following tasks:  ' n# @$ e8 {& i3 S+ T
  3 K- {; c; g! u/ ]/ \. f7 x: ~
The RepayCalcMenu class: (Total maximum 20 marks available)  ! G$ A. _# l* S$ g

* ?% h+ U9 |" D* X" v8 X      1.   Provide a basic text-based interface to a Repayment Calculator for the Megalodon  0 c! _; l+ B( m! ~8 l8 O
           Finance Company so that it can be used by the Megalodon staff members to  
) f0 G1 L- z( O3 F7 K           determine repayment options for their clients.  
3 |# \  w7 }/ H2 o* j/ [
; {; P% d+ `. R  ~; D$ ?) w           The staff must be able to:  / O, k) E% ~. t" j: G2 d
3 \2 I( _4 Q& j
           *    Log on to the ‘system’ using their user name and a Personal Identification  
* y. e& A3 R0 k0 T" n4 ~                Number (PIN), which a four digit number **.   : ~. Y+ h5 g6 q" B6 t' q/ |
! ^/ J, L( I& \) l0 {3 r# k0 u
                   *    The user should not be able to use the ‘system’ until they have provided the  ' c: ~' L- v: T& p2 C) N
                        correct user name and PIN combination. You should give them a second or  
# O+ Y) W' b3 c: ~) ?; B! I( v                        third chance to get it right before shutting the ‘system’ down.   8 {7 a2 X) Q" N# Q' r. C7 U
( `, u3 O! Q- {8 _. C7 T. J8 a; b/ `! x
  
$ ^  x  Z' y0 V+ B$ x                  
' b) U1 y! P  e2 G1 y- h                ** You must use the user names and passwords provided in your individual  9 p0 T- @+ V0 r1 a' \( m. S* b

" D6 B: X/ z6 t, m  {                data available from the Assignment 2 page on Vista (see requirement 5 below).  
# Z! a1 v8 h' ^0 E5 g- e* T' {                The user names and passwords should be included in your code, and the output  
5 }9 J" Y# ~* {$ q% a% d! }                to the screen should prompt the user with the user names and passwords (for  : D( _& I2 o+ O3 z2 Y2 n4 q
( k# j& X( \6 V( R! Z# i$ C
                marking purposes).  # z  i2 V4 |: v4 z
- E( G& e3 S; s6 o% p/ ?4 K' W
                    s, l0 e: R/ B3 H8 l# g
             ! m& V6 X2 |, F) X- F- G6 x/ s
*    The interface should provide a menu so that the staff can:  
8 R% L0 ^/ ?7 {& B2 d
! I9 G. K4 g& u  L                -    Perform a Repayment calculation  
, {& _6 k+ y5 P  A" L, s% T4 y7 M6 p2 m1 V9 X; a' U* S: f; L# w
                -    Print out to the screen the Repayment details  * m. s0 o. p* @

* c6 Y7 ]5 [( ]0 R2 h" x                -     Change one, two, or all of the values for the current calculation  
* V& m0 d$ s8 g( v  P/ O$ y, J, g
                -     Start a new calculation   8 y# T: O  c4 C4 c+ _
- P/ F& e# I1 }4 H# Z( E
                -    Leave the program.  
7 d3 V  }+ j0 \( m8 L; g+ n- DThe RepayCalc class: (Total maximum 10 marks available)  
  y- M1 P( V+ E  V" a. H5 {: Q0 E+ C7 p3 F; @1 {, X
     2.    Provide a method to accept three input values from the user:   
+ ]+ w( K3 p# p# \' ~- X$ g5 J2 V( f/ C  x; @
                -     the Amount to be Borrowed (to 2 decimal places, for example, 10550.00)  * C7 g4 T; x; I# d9 {% i" f
$ R  u5 k: s, B! ]* |' `, ~2 ~
                -     the Annual Interest Rate (to 2 decimal places, for example, 9.75)  % ?/ g" _3 k. S8 F, f6 S5 f
' ~( x1 }) P7 G6 {5 V
                -     the Period of Repayment (in whole Years, that is, no fractions of a year)  
9 |! d5 Y4 v( [# O: g2 e9 o- w
+ S8 E1 M7 c( ?6 o2 M5 N( U      3.   Provide a method to print out to the screen the three input values (accepted in  
3 u6 _7 X: @9 k* C+ Y3 y$ r8 i. O           requirement 2), plus the repayment calculations:  
4 Q: C* _$ }2 d& o/ i2 I2 J3 F) n$ K4 O' e5 U; M
                -     the Weekly repayments  
* e& N2 w1 l1 l6 W/ J  Y4 P
$ X4 W+ U; l/ S                -     the Total repayment amount (Amount borrowed + Interest)  
$ S6 o, r5 u2 y' L) [. ?
5 y1 W) f, Y9 Q" a" W6 n5 b! `  * a$ }; X" o. `% ]2 a
7 {% ]' k6 ^1 |0 z' S* n
The Borrow class: (Total maximum 40 marks available)   ! I9 p1 I$ b( v: M. v$ P  |2 U' A
0 [3 K- u, ~# N* N8 U3 Q" m
     4.    Provide methods to perform the following tasks:  0 L+ W: G& f5 Q9 R6 S& c! ~
1 H2 u& r& B4 r# ~3 t5 N
                -     to calculate the weekly repayments ***  : m& y2 J7 G+ @2 p8 N; I& s0 ]
5 V; }$ [& R" r' Y
                -     to calculate the total repayment amount  
9 t% u8 R7 u  a- d
: a, h! ^( k4 Z; o( H' ~                -     to return the amount borrowed  
, d8 f) P0 _, Y( Z) \' f! k
" y! i: d0 o" q- d, `, A                -     to return the borrowing period in years  ( i) @3 P' Z  u' u" }+ t
+ J6 N  D$ W: d0 \
                -     to return the borrowing period in weeks  2 I1 a/ s# k& Y. _; e
. C$ x' _% k( K. r% c9 {
                -     to return the annual interest rate  
" r) p( \9 Z3 ?0 s' G
: m3 Q2 F' e! c- F& O                -     to return the weekly repayments  
% V. f5 S! Q: [; q8 D" w+ A4 S5 E) K6 y
                -     to return the total repayment amount   
  R2 \% }3 S) u0 U3 j3 P- F- Y+ r2 r" ~
8 u. d" n+ W. T$ h! P) T6 M% r, P                -     to reset the loan amount  
: i1 M/ ^+ i5 [; E" M! v" e# b
8 N- w3 {5 i3 `                -     to reset the annual interest rate  
' j6 A2 ^  g& f2 t  T" q! P# [+ p  y# K' N2 a# [
                -     to reset the loan period (in years)   
& v, k& O2 n0 M1 r" ?' T6 B& F7 G
; e, a8 Z$ R; r1 _      
' A" L0 r: o" P* N9 |% I9 f7 g; c% u2 W
               
9 G0 q3 n  ?- [( J2 `& j* b4 Y       ( r( h/ [( o8 u5 I) M% {
              *** Use a simple interest calculation (not compound) formula, for example:   
1 j3 r9 L/ ^+ p3 X) r      
% l( F. O! Q4 [/ j5 m( Z             weeklyRepayment = (borrowedAmount * 1 + (annualInterestRate *  
4 S6 P# Z# J+ m2 Y             numberOfYears )) / numberOfPayments;  
# m/ Q$ O+ c4 r, L
: k" Q$ u: A$ u1 Z' b; \6 K1 W          ' H  v7 v# F2 Z  H' s( a
" F4 T" B$ F* N. c) X9 i
       6 x, [/ |! `0 l+ P7 q& N+ \4 y6 M

. y( ^$ F8 p) DIndividual Data (Maximum 10 marks available)  
5 x" p" l" G) X) @: S, `0 }4 @: x) J& C
      5.   You will be given two Megalodon staff member user names and passwords, plus a set  ( ^8 ]$ W2 v! q
           of data for each staff member to use to calculate repayment details. You will need to  6 O  v; q5 D4 K/ e( v
           log onto the BSA104 Assignment 2 page on Vista to generate your individual data  ) ^! h/ r/ D) _0 U" D. Q
           and instructions for this requirement. You will need to use your University of  ) J! S6 `8 F7 j8 B. P" q+ ]4 g9 Z
           Tasmania (UTas) student number.  ; [0 A5 p& A6 C* a7 s
             $ C+ y* J/ B/ {) Y- N) U
$ i7 j) ^% w% ^
                                                        Page 2 of 5  
: X; _  X  u- J1 H
1 L. y* T" J0 QFor requirement 5 use the following data:
  J, ^4 u1 K, _, C7 \1 Q; w3 \
1 S% a4 y+ B5 Q" B! M' ^2 [# Data Set 1:
4 \% P: r3 Q( F8 T4 g7 S
, z) I/ F- v" L5 }7 D* K' p' eUser name: JordanM$ A! B6 C# @9 l3 O
Password:  Ferrari3 J/ V: L- l4 ~
Borrowed: $ 749.95. P8 a& |* B( b" |" c
Interest:    15.0 %! [& ?/ o' }4 X! K5 F
Years:      4
: y" k( h! T. y/ V
  g, C% v7 ~# x6 S  s0 w0 n  I1 z# Data Set 2:: ~# W; t* I! _. ]6 y2 i: `, k
% w. r5 v2 E: E4 @0 \9 S1 \7 Q' G( z! |
User name: KimZ
2 H  [+ @& Y4 U0 V/ T! @; SPassword:  DimSim
7 N  b7 z: _9 mBorrowed: $ 150500.25
, ?( T3 ~+ ~) i2 H! B2 jInterest:    5.5 %
8 F3 G7 ^" A, s2 g* Z* I: kYears:      7
+ c+ P, E3 a* j% R1 }1 r. t  z: ?. j1 d  D* F& }
[ 本帖最后由 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:38 , Processed in 0.254107 second(s), 4 queries , Redis On.

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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