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

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

[复制链接]
发表于 2006-5-24 02:10:29 | 显示全部楼层 |阅读模式
汗,真是不知道怎么写,同学找了个哥哥,3个小时就搞定了,我编了3天,还有100多个错,可怕啊
1 p' D4 P, t; R7 ~6 J& v有没有高手帮我哦,周5就要交了,我的邮箱是[email protected],谢谢啦( x5 S9 r' Y) c$ C/ G, G2 Y
Requirements:  
9 d4 B/ J' p8 GConsider the three Java Classes: Borrow, RepayCalc and RepayCalcMenu, available from the  , m7 f/ ~9 B9 H+ ~& O$ S2 w7 l7 V
Assignment 2 page on Vista.  - E6 X3 g# }3 \9 \" q" W. K
  
- x% L* n+ o  V, P" F* zYou are required to perform the following tasks:  
/ e' d0 H5 y" P" `/ t( k  
( F" Y; X! N; ?0 K2 RThe RepayCalcMenu class: (Total maximum 20 marks available)  
  x0 ]9 {) A( r5 _! u6 h6 y2 B; q, L* ]/ Q9 K  m
      1.   Provide a basic text-based interface to a Repayment Calculator for the Megalodon  * m( W# ?" M9 {
           Finance Company so that it can be used by the Megalodon staff members to  1 D. ?  K9 f0 \: w' [6 F0 P
           determine repayment options for their clients.  / h+ t! Y. X4 n% h

% A$ _  R5 `% M8 |6 C* z           The staff must be able to:  & }8 A5 W/ n6 U- c

# @3 E2 F1 H7 x7 F/ Y3 f           *    Log on to the ‘system’ using their user name and a Personal Identification  
$ \& T- ?* C6 w, e8 z& r' ]                Number (PIN), which a four digit number **.   
! c* s) `; {# H' U$ b/ z
! W& E3 `% Q" {% r% T0 t5 o                   *    The user should not be able to use the ‘system’ until they have provided the  . o4 i9 Y& k( S) ?' e
                        correct user name and PIN combination. You should give them a second or  " l* ~  \& k* K' v( A+ ~3 A
                        third chance to get it right before shutting the ‘system’ down.   
4 Z3 H: g; v' z& v6 l" r2 P4 l' G  z4 {9 v  E
  ' x7 a, T. @  E/ Z7 c
                  
( [. z8 k% @4 p3 {4 ]3 L                ** You must use the user names and passwords provided in your individual  7 p$ E/ x7 T/ m6 @7 S
* j1 [+ w2 Y* W& G" I
                data available from the Assignment 2 page on Vista (see requirement 5 below).  
* i3 _4 i- E; |2 O( T- n6 M! b                The user names and passwords should be included in your code, and the output  
7 i% E- n, G6 |3 [8 s  D                to the screen should prompt the user with the user names and passwords (for  1 J6 S! u3 M. n& o  j

9 i' v" x2 M2 |, Y( Z  s                marking purposes).  
/ H* s, w/ [6 Y$ o
. i4 j3 ]1 Y5 ?                  
5 G& d/ k2 z) O. y4 D/ A2 e             0 ^7 d/ T, i7 G  g# E. ^
*    The interface should provide a menu so that the staff can:  / r6 Y0 y! j! ?

$ o+ ~6 U* A7 ]% d* @, Q                -    Perform a Repayment calculation  
; \' x% B; M1 x" p' O  q( z/ }+ Z  q) |) b) K7 c' T
                -    Print out to the screen the Repayment details  , F5 E/ v/ |$ Q" W2 J

2 E, p" S2 r) e2 N5 a9 n( B                -     Change one, two, or all of the values for the current calculation  
$ Y) i5 U$ W* w" I
" d4 e0 E4 d; Q. V9 b& I0 E                -     Start a new calculation   
5 _; m) y3 ~% G8 k% l: Y
  `0 T) F4 @! A( f0 ?                -    Leave the program.  , Y4 D# T  d  a! j3 _
The RepayCalc class: (Total maximum 10 marks available)  
: k! q# j9 b7 W* S
! J- u3 C3 T2 g# _; j! o0 y     2.    Provide a method to accept three input values from the user:   
  i2 |! @$ |' F; L& b  K) [% E' }; A" u+ n! b; C
                -     the Amount to be Borrowed (to 2 decimal places, for example, 10550.00)  0 R" U$ ?9 @: k* H

: {! Z0 y' G3 l                -     the Annual Interest Rate (to 2 decimal places, for example, 9.75)  ' w, s  b5 h3 F* N# Z% h4 r
+ p7 C( M$ a" A; ^# C8 _
                -     the Period of Repayment (in whole Years, that is, no fractions of a year)  ) X! \9 d" ]; A+ x  r' M
6 O! a5 T! z, M1 ?% V! n0 Q; h
      3.   Provide a method to print out to the screen the three input values (accepted in  
: z. ]& w+ [) Q- C  `           requirement 2), plus the repayment calculations:  
* b' T& A& w9 J' m. z/ C$ L1 h+ D- F1 x) z7 i0 ~. k
                -     the Weekly repayments  
+ y& u* V( t5 _) s4 U- M9 X. h* U* t# T) A1 q/ z
                -     the Total repayment amount (Amount borrowed + Interest)  
6 Q  Z) L& n3 m( }7 q
, Q8 K& d7 g' R  
% @7 z; T5 B( m- q0 n) E4 E, p- t1 ^
0 s! Z8 U- X0 |* U' l$ ~* g" r. yThe Borrow class: (Total maximum 40 marks available)   
: ]" r% j; ~; I$ g  J- L9 P
) d1 o  a; \( q; c3 V     4.    Provide methods to perform the following tasks:  
8 @! f$ d* {- Y8 a: w0 w. S1 \
                -     to calculate the weekly repayments ***  * D- k1 O3 ^$ F: g# W" M. i) I

; D7 X/ R3 N' E                -     to calculate the total repayment amount  " @* o( ^# h1 n" F) F0 [- B) Q
! p$ y# [  a: V# w5 A, n+ O8 T
                -     to return the amount borrowed  
9 I2 v& [  q) f6 T- ~. J6 H* i9 B8 z6 U0 E; [. n0 D/ C6 Z' w# x
                -     to return the borrowing period in years  
8 |- _6 i  b/ c2 U8 X* y
9 T2 X8 K) H3 k# L                -     to return the borrowing period in weeks  
% e5 V% |5 ~0 {7 U) \8 H! H1 M, g) O, J- y4 d( R. m# K$ {4 O
                -     to return the annual interest rate  - u4 x/ b& P8 L1 S0 R/ x
: F8 t0 A  z8 p8 _! t$ ]# k; R
                -     to return the weekly repayments  
) y' N' a% Y0 v2 l6 N6 H; ]% n0 R7 H8 n2 k
                -     to return the total repayment amount   $ K3 H0 _  V9 m" _% A5 ~; }

, }0 s: ~2 U3 T6 y' I- p                -     to reset the loan amount  
( D! d5 w" d- B. U* D5 [
4 ]: U! r; J- z8 s# n) h4 I                -     to reset the annual interest rate    o1 Y4 H: Z( J2 d9 z

' n  B7 \) V2 [8 |' ~: e. _                -     to reset the loan period (in years)   
3 D2 R- J; G) [+ b
( B+ {9 f. F/ ], `      
0 g5 E' ^/ I2 o# C/ |3 i& V/ ]4 M
" O$ Z; f9 D2 l0 P; U/ M               
! w' n1 Q& f7 S: x/ f  r      
7 ^, D7 _# R# c$ k& \              *** Use a simple interest calculation (not compound) formula, for example:   9 V/ y7 n6 O+ ]8 {
      
$ {; F: j/ q3 E: [; b( S             weeklyRepayment = (borrowedAmount * 1 + (annualInterestRate *  
; u- R2 U" _; D6 _5 X) S* `: i$ G             numberOfYears )) / numberOfPayments;  
$ i3 g; C( ?" Z/ I- s' C$ r+ N) [9 u, e) c8 b
         
, r' k$ L3 \, c  X) X$ `/ Z* c4 K6 b& s
       : ?3 C. E- ^2 p5 ?% A: V# R& f

" a- _0 w! r* k& QIndividual Data (Maximum 10 marks available)  
5 N% E2 c4 z- F7 Q, |
7 W& k. ]3 {, C! H2 u. `" J      5.   You will be given two Megalodon staff member user names and passwords, plus a set  
" Q" y# f  N5 {7 m& o% B           of data for each staff member to use to calculate repayment details. You will need to  
' L% j$ t/ k# f. p' n           log onto the BSA104 Assignment 2 page on Vista to generate your individual data    u/ \: _9 n2 c5 \. Y2 X- I
           and instructions for this requirement. You will need to use your University of  2 v+ d. v9 X( J  a" l  ], ~9 k7 [9 }
           Tasmania (UTas) student number.  / K8 W* `% J& h4 X# j' u  K2 T
             5 T; z( a; X9 I+ ~/ a6 [
( R3 q$ {+ P3 f  B
                                                        Page 2 of 5  # R# x; i. @- D

, D$ P5 X) x+ P! ~For requirement 5 use the following data:$ ?( K$ L' w' w

' |) u2 c8 O" v  d" F# Data Set 1:
# x7 }; B5 Z+ I3 F# {9 }; W' V. [1 t, ]! l" V$ E, U+ a
User name: JordanM& z, ~" W1 N6 y
Password:  Ferrari# o# {$ M4 E- {
Borrowed: $ 749.95
; s9 e4 Q* m$ w" F; SInterest:    15.0 %
  N# ?/ q2 Y9 f& [" K, eYears:      4! e8 z0 \. w2 ?) v, G6 d1 h

% _! s, A+ u+ c8 s# Data Set 2:& m1 d" B# w3 J& f
2 E5 S; {* s" h+ x; x& ]+ Z8 M1 d
User name: KimZ
4 k4 U! A6 Y) `  f# T  _' IPassword:  DimSim) _$ `0 m! C2 q$ A1 E
Borrowed: $ 150500.251 B. R% ^0 n% ~# u9 k: A
Interest:    5.5 %  O# j* V- G. a; U+ Z
Years:      7* w3 m4 F. N# x1 g9 S9 T1 G

  s' _2 ^8 U& s7 d$ N! T[ 本帖最后由 wwwsnailcom 于 2006-5-24 02:15 AM 编辑 ]
 楼主| 发表于 2006-5-24 10:52:42 | 显示全部楼层
怎么也没有里我啊,高手来呀
回复

使用道具 举报

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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-7-8 00:01 , Processed in 0.054718 second(s), 5 queries , Redis On.

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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