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

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

[复制链接]
发表于 2006-5-24 02:10:29 | 显示全部楼层 |阅读模式
汗,真是不知道怎么写,同学找了个哥哥,3个小时就搞定了,我编了3天,还有100多个错,可怕啊
7 V9 L) ^( k' ~2 r! v0 G" M5 V有没有高手帮我哦,周5就要交了,我的邮箱是[email protected],谢谢啦2 k' h4 i: z% Q$ `2 A  Z+ c( u
Requirements:  7 j" W. V; C- i- N
Consider the three Java Classes: Borrow, RepayCalc and RepayCalcMenu, available from the  
8 d: U6 ^- _% W1 FAssignment 2 page on Vista.  ( X- N' G6 ?' [1 I. U
  $ I# c$ }  L& w, S3 O7 ~  {% @
You are required to perform the following tasks:  
; z* T+ M5 }- X: b/ w$ p7 C  
* y% A* I7 L2 Y) k$ xThe RepayCalcMenu class: (Total maximum 20 marks available)  1 K- n3 B$ X. k0 b) v. k% z8 o; @1 n

3 C! |& w: E) w6 {* p      1.   Provide a basic text-based interface to a Repayment Calculator for the Megalodon  
& b2 t: h. |; ]& j/ Q# A           Finance Company so that it can be used by the Megalodon staff members to  
& c* Z, v* s9 Q2 b; P           determine repayment options for their clients.  
1 q3 v! p: o: ?# W5 b+ T! J2 ?* i" k
           The staff must be able to:  
6 o$ E' L  G" S6 b: \( q6 f  n3 q, ?4 e
           *    Log on to the ‘system’ using their user name and a Personal Identification  
6 G+ x3 |! O) E# k% n4 A                Number (PIN), which a four digit number **.   
6 Y8 y6 [1 c* [& v) h7 g  z& Z$ u7 D! l
                   *    The user should not be able to use the ‘system’ until they have provided the  ( g7 B; j; I: a4 E$ X, p. ]- L# m& J
                        correct user name and PIN combination. You should give them a second or  
0 d5 x1 S" I7 |; v8 E" X                        third chance to get it right before shutting the ‘system’ down.   
  @9 q" H" m3 l
! j; w' [7 [% X! s( S$ E' A/ Q3 K  ' P+ }0 W0 V9 v3 [' o) P
                  ! ?! E: m; j8 s8 x/ m# W0 }
                ** You must use the user names and passwords provided in your individual  
7 s+ F: F' c4 G
# \7 w" s: c. R8 m  C+ e0 q                data available from the Assignment 2 page on Vista (see requirement 5 below).  & b' G4 y5 R' l# N9 L+ G! w
                The user names and passwords should be included in your code, and the output  " G" p6 R' U3 F; S8 N( U) b! S
                to the screen should prompt the user with the user names and passwords (for  4 v) z3 W" r8 L' n4 s- P

3 g! A, K6 {* f. L- i                marking purposes).  
# |: X6 X4 y$ u! [& v" B
) p6 b. M$ [3 t' r. s9 d                  5 t2 Y$ X' u# r. S5 U
             : L' s8 W, |3 T) A3 w, P1 X
*    The interface should provide a menu so that the staff can:  % z! O! C8 C7 J( G
% C' V; R5 ~- H9 r6 @4 [
                -    Perform a Repayment calculation  
- ~0 A( @0 }. x5 s! O; w" f: w0 Z1 ?
                -    Print out to the screen the Repayment details  
" S6 [; ]9 o1 v( u
9 W# F! u% ?7 W: R; A; B( ^                -     Change one, two, or all of the values for the current calculation  0 O; }" Y2 ^4 j8 w; c1 H: B

$ T9 _+ h* i" c% }                -     Start a new calculation   
) F  a$ c3 N( W3 c# l
( r2 [( M+ A+ j$ R) O, ^1 z                -    Leave the program.  4 b' Z/ V! F' [  v7 P
The RepayCalc class: (Total maximum 10 marks available)  - f; s1 ~7 [( N* O
1 v9 j' t6 n1 g& u  ~# O) w, z
     2.    Provide a method to accept three input values from the user:   
1 S* a- q& [0 y5 [5 Q
% Q. Z) L- I. ~: p5 N4 s7 ]                -     the Amount to be Borrowed (to 2 decimal places, for example, 10550.00)  & t" O7 g+ @+ O) M$ l% ~0 k$ _
0 F4 C; u- m1 N
                -     the Annual Interest Rate (to 2 decimal places, for example, 9.75)  
3 I6 i7 j; p* K3 U/ C
/ ~3 J% H4 B4 M, @) M. g                -     the Period of Repayment (in whole Years, that is, no fractions of a year)  ! X- ]/ ^( H* W1 z
9 Q" l4 j3 |  X: i5 u
      3.   Provide a method to print out to the screen the three input values (accepted in  
& H- _: x/ R5 i4 k9 \           requirement 2), plus the repayment calculations:  ! @! O; }. o& I6 E# E' |6 U# J' V

$ B6 g9 H) J9 S% Q- Z! S0 S0 H                -     the Weekly repayments  
+ g5 F# `- ~. B% z: I# E- V3 c' t" p9 @1 Q/ b6 D
                -     the Total repayment amount (Amount borrowed + Interest)  + h" u; `, X& A7 e7 S7 X2 E

$ W" `  z1 i+ Q" L: @! S  / g3 j5 ?; I" w# Q# }3 p- X) O; E2 M
; I, X8 x$ n# K+ _/ {
The Borrow class: (Total maximum 40 marks available)   ! G6 B' k0 q3 M, s8 s3 d1 s

9 J1 |5 V/ _8 Q& U$ F4 f     4.    Provide methods to perform the following tasks:  
( D. L8 j) A5 f+ C) L+ {5 w" H+ v, E3 V9 K3 S6 a. G
                -     to calculate the weekly repayments ***  
& N/ y9 e+ M+ P3 X$ A
' H& D5 j8 T! {; U) z' E                -     to calculate the total repayment amount  
5 }+ ?& N& e8 c0 @3 M( a$ a9 Q" z$ E. n. [2 T0 a! l
                -     to return the amount borrowed  5 H) r2 V& M8 k( Q

  k0 z4 w, k$ x( P7 ]                -     to return the borrowing period in years  7 C! F" c7 \% B

2 a9 W) S# i( ^  C& W# m                -     to return the borrowing period in weeks  8 @& \+ m- p  L" ]1 [# ~
  X( q( ]4 Y2 N/ O% Z
                -     to return the annual interest rate  
% A' W# l" O0 h% S4 ^6 ]  I# o( D6 F: v- A
                -     to return the weekly repayments  6 Z- r# j7 w: k0 o5 d1 v* p0 T1 ?
& Q3 H( A/ o( R6 p" a$ A3 {  G7 _; T
                -     to return the total repayment amount   
. B+ l! Z) ~: K; r8 n& t! ?! _, f2 `9 B5 w
                -     to reset the loan amount  8 x: x7 H+ o: e" ?7 X3 U7 g# W

  @8 F1 r7 r- T0 H                -     to reset the annual interest rate  
8 h* z2 Q! V& G: G: N# D3 w; S1 d1 v( r& Z
                -     to reset the loan period (in years)   
1 _- M- t, y) }5 W, g. F- p3 `
' h6 X% y! D" N       2 v: a' a# k  C  @6 F  B
% u. G' l/ ~: f
               ( s! J" ]' z4 D
      
" m# y  P9 T; m/ u9 j2 `' r5 O8 Z              *** Use a simple interest calculation (not compound) formula, for example:   
9 T- Q. w( ?" U' c       ; X6 d& x% }- I
             weeklyRepayment = (borrowedAmount * 1 + (annualInterestRate *  
' ]5 @$ Z! P* X3 R5 r7 r- Q7 ~             numberOfYears )) / numberOfPayments;  
3 |; v9 c6 E5 M1 A" ?- R
! r! G3 F* d$ ^  V" l& M         
! G, l# T# t9 G2 `; C' E
4 }( }+ h$ d7 y- u( \' N9 H      
( |! ?1 [7 I+ G. Z" E7 _5 l, L* V3 T: Q/ e. N4 L8 c
Individual Data (Maximum 10 marks available)  1 M  ~( f" _3 L7 R5 m" O7 `% L0 ~) c0 t

9 L2 P. g9 e8 s      5.   You will be given two Megalodon staff member user names and passwords, plus a set  
' b( c) t) k2 e3 H' x9 V5 q           of data for each staff member to use to calculate repayment details. You will need to  
0 Z' r7 X9 c2 K! m# a           log onto the BSA104 Assignment 2 page on Vista to generate your individual data  
- i0 T) x1 r. h! ?: F           and instructions for this requirement. You will need to use your University of  ) c3 V7 Z* A1 W  u2 x9 y: n
           Tasmania (UTas) student number.  9 E- H. U7 B  M; w+ J+ t( I0 r8 S
            
( y" v1 ~# G" M; R& f9 {/ Z. z# O( T- ?# q8 i/ E" y' m7 R
                                                        Page 2 of 5  . C" P# ?2 j* k4 V, T( B5 y
" G1 |6 \( o0 J9 @
For requirement 5 use the following data:* l( D% u6 P) o; B7 e( O
8 d# l, @* Z- u0 P" q$ J. ?
# Data Set 1:7 m7 J" E8 U2 B8 `& B1 s
  ]# c9 t! ^  ?0 O' A% e) i/ n
User name: JordanM( v. R) O3 H5 m2 J
Password:  Ferrari: b- u) s' [9 M, @; T7 ?4 N4 J
Borrowed: $ 749.95
9 |3 y& D6 d" Q; W$ u8 p/ D; WInterest:    15.0 %
' \* B2 ~# B0 N' ?9 g1 lYears:      4( P7 _8 G1 W- \2 J+ t  U: E
9 v5 C9 o) `# ~% t
# Data Set 2:
% g# s4 T3 o  q0 w& s5 W. s) K4 `5 [' k  A! O2 V
User name: KimZ( _' H4 f; d  P
Password:  DimSim
. e% n* E1 M6 ?) mBorrowed: $ 150500.25+ o! ?# z& y; J* ]5 V8 J% q$ N
Interest:    5.5 %
! S& d4 x6 l0 @) B7 y, ^0 qYears:      7( U- N! T/ b: n2 n3 c, |5 V" E

* S! U+ @$ ~. U/ r$ M" e[ 本帖最后由 wwwsnailcom 于 2006-5-24 02:15 AM 编辑 ]
 楼主| 发表于 2006-5-24 10:52:42 | 显示全部楼层
怎么也没有里我啊,高手来呀
回复

使用道具 举报

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

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-8-1 23:43 , Processed in 0.054550 second(s), 6 queries , Redis On.

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

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