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

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

[复制链接]
发表于 2006-5-24 02:10:29 | 显示全部楼层 |阅读模式
汗,真是不知道怎么写,同学找了个哥哥,3个小时就搞定了,我编了3天,还有100多个错,可怕啊
) J! F9 M4 t+ B  k有没有高手帮我哦,周5就要交了,我的邮箱是[email protected],谢谢啦  K7 |4 \( j) `4 ?
Requirements:  
+ \  L; B3 x# ]+ P$ z- |& p% b! o3 DConsider the three Java Classes: Borrow, RepayCalc and RepayCalcMenu, available from the  
  h3 i2 \; h: M( |4 p& M4 f9 A% W$ aAssignment 2 page on Vista.  
" y! C$ w4 p+ q1 p: u1 Z5 c$ I  ( H( S0 P# ]* g
You are required to perform the following tasks:  & a% U( ?* a' C: @
  % ^2 s4 T9 T4 ], g; [
The RepayCalcMenu class: (Total maximum 20 marks available)    b7 ]/ [" m  L; c9 b

( z! R- d$ @3 a5 ]/ p      1.   Provide a basic text-based interface to a Repayment Calculator for the Megalodon  
7 @7 H7 b: k0 W           Finance Company so that it can be used by the Megalodon staff members to  9 h( \7 `9 m; K* G, j
           determine repayment options for their clients.  
4 ^  Q4 M: Z7 }# l4 `, _; q, T- ]5 G& V5 p
           The staff must be able to:  
; f% z# {- e; L& t1 ]5 g4 c
+ u$ P; ?7 o7 }           *    Log on to the ‘system’ using their user name and a Personal Identification  8 D$ p$ W+ k3 G) K( L3 C; B1 [
                Number (PIN), which a four digit number **.   
6 r- z% D/ ?* J3 ?2 Z' m) D
# z3 G' P6 Y  S: y! V, d! u: E                   *    The user should not be able to use the ‘system’ until they have provided the  . K& W- u3 a4 O5 y) m" `( Z
                        correct user name and PIN combination. You should give them a second or  + G; m  Q! E- ~% c: g- C
                        third chance to get it right before shutting the ‘system’ down.   $ ]+ \1 M- M$ Q) |- b
7 n  n* i& N4 J
  
  z  g9 K/ o* q+ R                  % o/ k* `5 o4 v. m2 ]: L, \. G
                ** You must use the user names and passwords provided in your individual  
4 x" Y2 P5 R# Q: J) t6 Z7 {5 z$ P# Q% n( E0 i# c! ]
                data available from the Assignment 2 page on Vista (see requirement 5 below).  
1 c. V  H' Z  V2 A  y" N. P) Q  {                The user names and passwords should be included in your code, and the output  
5 G! j% Y8 h$ M0 }( \, w' i1 B                to the screen should prompt the user with the user names and passwords (for  
; h2 f* _6 {8 T3 l; Q6 Q- A9 Z+ ?" o
                marking purposes).  
/ g* P, p: O4 O, q/ y4 N8 e" \* P# j& r2 Y. d
                  
. p, ~& f- A& N4 m             1 ?3 E  T/ [; A( {" z
*    The interface should provide a menu so that the staff can:  
6 R/ g$ b/ |3 W6 b1 q$ }7 ^8 q' D5 g
                -    Perform a Repayment calculation  " Z" z& e0 J; [; M* N" ?

3 W6 q, Y2 k% }" R, u                -    Print out to the screen the Repayment details  
/ c6 I+ x6 s8 b/ d
' h+ u9 e8 L5 X' C# ?                -     Change one, two, or all of the values for the current calculation  
# L, H' G' D  w
8 H5 m" e6 C( g$ `1 j9 J                -     Start a new calculation   
" U6 ?- a* d( T4 i
7 L% y& S8 D. W* ^- b                -    Leave the program.  " k8 o6 B$ e, f' a  a1 A! p5 p
The RepayCalc class: (Total maximum 10 marks available)  - w! ~* w' G1 j, z; D

' S; u4 p; X# g     2.    Provide a method to accept three input values from the user:   3 _' f/ t3 [: s; t' e- d3 R; t' L& I

: q$ w/ w) z1 U; P: ^1 t" z7 B                -     the Amount to be Borrowed (to 2 decimal places, for example, 10550.00)  . J# j- m: B; Y* s

2 k8 f8 v" \+ c) b2 e                -     the Annual Interest Rate (to 2 decimal places, for example, 9.75)  
" k7 k) |( i. i+ [+ L5 x2 ~
/ k! {  W! }& |; u1 M                -     the Period of Repayment (in whole Years, that is, no fractions of a year)  
; ~9 ]- G' y' ?# d4 a* {0 @* M
2 D1 q5 ~. ?$ x% c. l2 P      3.   Provide a method to print out to the screen the three input values (accepted in  
- l, \3 D6 E0 R4 |, A$ @           requirement 2), plus the repayment calculations:  " \  {; g1 x% |; A  o$ d) ]$ `
5 E. e/ B# }2 g! l
                -     the Weekly repayments    ]* `0 a# _! R
) y0 Z) j# s9 u
                -     the Total repayment amount (Amount borrowed + Interest)  ) e2 }0 M! X: r% D; u8 z

: v7 m! A  V$ Q: E0 O4 ^& y5 A  
- |" F* c, u8 W9 O9 W: K
9 T0 v/ ^. c! p, ?; WThe Borrow class: (Total maximum 40 marks available)   ) W, o5 a: g  p$ z# m
! ?" d( s! @0 h! u. Q% ~/ K
     4.    Provide methods to perform the following tasks:  - z! Z. y% D) T% L/ e
: A( @: f$ @/ y. l8 Q
                -     to calculate the weekly repayments ***  
( G% W" P4 b" u
4 |' p) B0 P) p5 K8 H+ `0 W                -     to calculate the total repayment amount  : x7 ^- u& h6 a

# C# B7 J8 n- @* R$ A9 b                -     to return the amount borrowed  ' B! o0 I, |: }; Z1 f" t

. i1 A+ C# U7 Q* R, f                -     to return the borrowing period in years  
1 n& x0 z( d6 w% z4 e% Z: E# I6 A* m; Q6 ]- C5 ?% r, W; V% f
                -     to return the borrowing period in weeks  
9 }, h6 G3 K( E$ D: ^# i1 O7 M* G4 v. G
                -     to return the annual interest rate  * N, t; {- o2 g1 ~5 C
3 q, _( U+ o2 z8 @/ j* }  n
                -     to return the weekly repayments  9 l, u; G) C3 l# Q7 s0 Y. o7 C. G

- T# F' [1 O# N# a" m, ]5 W5 m                -     to return the total repayment amount   
2 ~7 g, l; @+ Q) N8 u# ?$ M# h- i' J
                -     to reset the loan amount  : i/ O  F$ f# I6 L# l; o

# P9 f7 O* Y. G0 T2 L  f& [7 r                -     to reset the annual interest rate  $ \1 ]! y1 Z! u$ `
2 w! ]. m; ?9 C
                -     to reset the loan period (in years)   
1 @$ N6 I" S( }
/ I5 Q: r' R: J      
+ r6 f, L- C( p% R9 c, z4 g7 g/ t9 |7 M6 n' n9 O$ e2 Y
               
5 \; O8 W4 H' b7 t. g. H2 B      
7 y  y" @: Y  ?0 x( w( u- |              *** Use a simple interest calculation (not compound) formula, for example:   0 k5 w. g7 v3 z+ @/ T: M" m" Y
      
7 E, F  P$ ?* x7 w1 s: ]             weeklyRepayment = (borrowedAmount * 1 + (annualInterestRate *  
% Z& n7 Q( r$ ^: c             numberOfYears )) / numberOfPayments;  
; {0 L& M! c0 }5 C0 ?; I* g& b0 B3 l6 M0 m( R+ c
         
/ n7 `: H2 U" ?9 A7 o. [, q# U" s. T7 A0 i! |
       * X* V  i7 H+ q
( H# m2 U. a# U' e: f
Individual Data (Maximum 10 marks available)  . ], D$ b  h+ D* C* f, \
3 q6 O  J9 `7 M2 V2 d$ ~! W
      5.   You will be given two Megalodon staff member user names and passwords, plus a set  ( V: }; T& V, D: h8 ^5 G  q
           of data for each staff member to use to calculate repayment details. You will need to  ( K2 a& N+ \4 G7 L8 U3 t' ~
           log onto the BSA104 Assignment 2 page on Vista to generate your individual data  " f; n9 D# A2 r
           and instructions for this requirement. You will need to use your University of  ; e; Z  ]- o& }# G) s- T
           Tasmania (UTas) student number.  
4 H7 m3 G' I( _6 z' J. G- x             # A4 B* R: g7 r& C# L5 w% r
5 H0 L" ~2 M, p
                                                        Page 2 of 5  
% N1 h1 _# n- \7 ^7 W. j9 C, L6 o" i2 `3 r5 _, `
For requirement 5 use the following data:
; J$ T8 t4 p; F( Q/ p' P% k- @& E. z5 o4 z0 f6 X) F; [2 ~" }( K! g
# Data Set 1:) y! t9 j# K$ h1 ^

% r6 }2 @$ g' F* i+ J8 A8 R2 rUser name: JordanM
6 G: I- s4 Y; c5 nPassword:  Ferrari8 p% Z: E% I$ ~5 L- z5 _( l
Borrowed: $ 749.957 J0 `" p8 A: R* ?7 r
Interest:    15.0 %4 T- }4 |- v7 O& Y/ X; z
Years:      4- Z: m& [; R# U7 v& k" O
3 ?/ [7 ~6 N9 J! j
# Data Set 2:
9 ?# I  W; i) s. p3 d7 P0 V7 M. X/ j6 G% {* m" @% N
User name: KimZ$ w- S- K" N: }
Password:  DimSim
7 @( E" c. |, E( g# }6 TBorrowed: $ 150500.252 |& c+ N" h) T( r
Interest:    5.5 %# U/ S  |! |4 E  m  g9 W5 }$ S, G
Years:      7
% n; i% t) u0 t5 i3 i/ g& d9 p' J$ \5 b1 F" c
[ 本帖最后由 wwwsnailcom 于 2006-5-24 02:15 AM 编辑 ]
 楼主| 发表于 2006-5-24 10:52:42 | 显示全部楼层
怎么也没有里我啊,高手来呀
回复

使用道具 举报

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

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-8-26 06:28 , Processed in 0.056573 second(s), 4 queries , Redis On.

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

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