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

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

[复制链接]
发表于 2006-5-24 02:10:29 | 显示全部楼层 |阅读模式
汗,真是不知道怎么写,同学找了个哥哥,3个小时就搞定了,我编了3天,还有100多个错,可怕啊5 Q! V  g0 Z: R6 \/ U: d
有没有高手帮我哦,周5就要交了,我的邮箱是[email protected],谢谢啦! x( k5 N" l0 w7 }- j# X$ p; g
Requirements:  3 @4 O; [# D4 A" l! H/ I
Consider the three Java Classes: Borrow, RepayCalc and RepayCalcMenu, available from the  5 U' {- Y: X5 U1 M
Assignment 2 page on Vista.  $ w& t. p5 r, H! _
  & e7 H5 Y4 u7 t4 s! d# L" n
You are required to perform the following tasks:  ) [# f/ N& R, C- \- B, Z
  
! S) ?4 U5 }1 P1 O4 eThe RepayCalcMenu class: (Total maximum 20 marks available)  # b" K  R% @8 m" w
+ m( g1 v( T2 T% F* d3 S! o: d
      1.   Provide a basic text-based interface to a Repayment Calculator for the Megalodon  
9 l) m  i& b" H# F8 Z$ e# X           Finance Company so that it can be used by the Megalodon staff members to  
# r! f6 Q" k1 M& o3 R           determine repayment options for their clients.  9 D8 Q7 K4 d% D+ b5 U8 X. G( W  s

5 `: t0 D( k" e' ^, M           The staff must be able to:  : J2 k5 B# \* S4 d; P5 H! O

# {+ b8 `1 m! r           *    Log on to the ‘system’ using their user name and a Personal Identification  % j+ F3 G6 K  R3 y( J4 w
                Number (PIN), which a four digit number **.   ) b- \) z; c# ~! W* O  q8 h

! `; U! I, g: Z                   *    The user should not be able to use the ‘system’ until they have provided the  # i! z' N' p5 }, i
                        correct user name and PIN combination. You should give them a second or  
5 f. S" O3 P/ I0 }                        third chance to get it right before shutting the ‘system’ down.   
4 f  P0 e$ n! k1 h% Z$ f4 p+ k' r
  
4 F* }" B$ ^( {6 k/ }0 q' F. u' c                  
8 {/ S8 a9 x4 n$ k, X                ** You must use the user names and passwords provided in your individual  : E. \9 S# q! t9 d6 A3 F* ]
; h! z3 B+ r3 @) d0 Y4 U: D/ h
                data available from the Assignment 2 page on Vista (see requirement 5 below).  
! G5 g( }* _* w8 c3 J5 n                The user names and passwords should be included in your code, and the output  
8 [% g1 `( ^. O0 `                to the screen should prompt the user with the user names and passwords (for  # R9 _6 ^) g# r$ w4 D' @+ X

2 I* \7 I+ o* l. C                marking purposes).  8 U8 L* i# ?( Z
8 b! E- ]2 e( V9 q7 T$ }
                  ' }  C: p5 o4 ~8 m
             / r4 a( }- P5 r8 @
*    The interface should provide a menu so that the staff can:  
* }" K1 X1 s1 x# I/ f% b8 q: i* Z/ E: [! v# Y5 J9 H5 s6 H8 n* T
                -    Perform a Repayment calculation  
" D" J5 g  Q# R: p+ l
, }7 X7 B% X+ q  H                -    Print out to the screen the Repayment details  , W/ g8 N0 ^9 ^* P
) g" @4 d8 y$ o: \3 U1 p  b
                -     Change one, two, or all of the values for the current calculation  + Q' h( E* ?: Y" _
( p' G4 L! N1 {, V  h
                -     Start a new calculation   
/ e# L  i& E# T1 n* ^# T
9 o. t  F# u- U2 |7 h) i- {                -    Leave the program.  , S, ?2 y  s4 ]/ D9 W
The RepayCalc class: (Total maximum 10 marks available)  
4 e  l$ z9 ^% ^' O  J  b( c& R- o) k1 z6 b  @5 f- {' [* m8 @
     2.    Provide a method to accept three input values from the user:   
# Q; [6 o8 Q, D. u' ^0 \' a0 i: u
                -     the Amount to be Borrowed (to 2 decimal places, for example, 10550.00)  . ^2 ]) K" s. I2 p6 C. f& ?" |# H8 L
( t8 \4 c* a/ |5 m2 d6 Y
                -     the Annual Interest Rate (to 2 decimal places, for example, 9.75)  - D3 J  Q" ]! j

8 _, [# W1 q& l# r8 k) q: l- c: J  u                -     the Period of Repayment (in whole Years, that is, no fractions of a year)  
. [0 d( E$ {( y$ T* t6 o1 P5 ^; R) Z" q' o8 y5 e3 A; U
      3.   Provide a method to print out to the screen the three input values (accepted in  
7 D$ a8 N' p* E: F6 R, L+ u* Q           requirement 2), plus the repayment calculations:  ( u8 N: O5 G7 J& U" j9 ^
; m/ ]' Z) ^& W& e
                -     the Weekly repayments  
" t% a$ D( r$ e# W  G6 l& k* U  v: C
+ o$ h0 v/ X' A2 f- q, @                -     the Total repayment amount (Amount borrowed + Interest)  
* [5 u4 ~0 H3 {- E" _
; v& r* S4 ?: D6 a4 {  
- Y" ^+ a( ~5 `8 q2 B9 U# n% S8 n0 ?4 r
The Borrow class: (Total maximum 40 marks available)   
4 ^! m/ n" M* \) w; D2 e1 X9 F' [2 ~0 p, U
     4.    Provide methods to perform the following tasks:  2 v6 h, v) k% L! w5 H: I: S6 C
6 @( k- A, h0 w5 X
                -     to calculate the weekly repayments ***  
" @  [! Y8 C0 J8 s% S$ S0 J- J, F+ @7 {% [$ q$ S8 _% e2 B% i' p. f
                -     to calculate the total repayment amount  
+ Y  f$ t7 |3 o* l9 w, D/ A/ E( Q" n( x9 T0 V4 c
                -     to return the amount borrowed  
# U1 q; H0 }1 u6 _+ ^$ `- @0 d0 u) U0 c
                -     to return the borrowing period in years  3 Z# v% g% p5 |  M# s
3 h# f" }6 R0 J2 n. \, |
                -     to return the borrowing period in weeks  1 U8 H. p# E5 p' k

! Y! y% M5 b) O" R7 X# X' R5 \                -     to return the annual interest rate  : H# M6 e1 Z* o5 D+ o

6 @6 j  D7 ?/ B5 k                -     to return the weekly repayments  ; [% m  |- B0 P" S3 W
% o3 e5 F7 j# I. ]+ H& `
                -     to return the total repayment amount   
9 _& y3 [% b, |2 i% k% d1 ^$ R1 y  s4 Y2 ?+ k/ p
                -     to reset the loan amount  
9 Y) h5 {" \2 M  e0 X0 Y0 m6 v: M2 d, ]; M% T
                -     to reset the annual interest rate  
& n6 \4 D% |* {* l8 I8 _: \
* x6 e$ m* D3 R! ^                -     to reset the loan period (in years)   $ g8 p4 s3 ~2 D, u

- s3 s$ S) J$ H1 ]4 z' C5 U7 _8 m      
) u% M% `+ L4 L& n% r! I! o
  |; o, m0 A$ ?$ H: E7 u8 r               : k$ R0 j3 c. R* c* T
      
1 n1 p3 W6 O9 B$ l; N              *** Use a simple interest calculation (not compound) formula, for example:   6 f& g" ?6 [8 R. U. k& i8 L; Q) \; X0 ~
       + g0 G. \; E! m# L9 a0 q4 o6 e
             weeklyRepayment = (borrowedAmount * 1 + (annualInterestRate *  
+ v6 Z6 Q5 o& x7 F& V& x             numberOfYears )) / numberOfPayments;  + P- g0 b5 ?8 T) j
9 O6 H! Z7 N3 h* B3 }
         
8 k0 K& N4 g) d* \+ Q: x5 v' a3 O( h. r0 Z" m
      
) ~* x$ \) |5 p1 g& e( w1 ]
# Q' b, [* ^' p+ K+ ~2 IIndividual Data (Maximum 10 marks available)  
& C. t2 u9 c/ l- U0 W# `8 K/ f; L4 n
      5.   You will be given two Megalodon staff member user names and passwords, plus a set  
( t" ^" P# i( s" j% \0 y           of data for each staff member to use to calculate repayment details. You will need to  
- W9 O7 x9 ?1 Y/ Q3 z# O' M           log onto the BSA104 Assignment 2 page on Vista to generate your individual data  + l: F% H% G! A
           and instructions for this requirement. You will need to use your University of  
4 D6 m. ~8 ^% D. s. g; J1 q% L           Tasmania (UTas) student number.  ) @: |8 l% J4 r/ v3 n
            
* q4 D, E. d* B$ a9 u# p! w# |3 a( G
- N  u/ n4 D7 ^. w6 c                                                        Page 2 of 5  ) D4 ~# {3 E5 E2 l+ L& P

8 H1 @) f+ _8 B0 N7 lFor requirement 5 use the following data:
" v, {/ O3 V2 ^" S4 C
2 }! c4 z4 X' W; P2 v1 M" l6 b# Data Set 1:2 m- k4 S) H  B* F1 S6 n, |

9 D/ q: J, h$ Y% E9 t& ~% V; I! oUser name: JordanM  W) s' X+ @5 }1 P' T/ p. u3 ]- U
Password:  Ferrari# y% Z6 `6 W4 P' F* V: w
Borrowed: $ 749.95. S! S( C% q/ Z2 b! ^
Interest:    15.0 %4 u3 y& t; G  o* {( C, `* N
Years:      4
/ O1 q: H  d: `0 z9 A- @8 ?( r$ q) U- X/ T. n
# Data Set 2:
4 q! A* {" t! q" C( \- N7 f/ N& S4 K& m% k: ^( O' R
User name: KimZ: s% b0 n& E. j. E
Password:  DimSim; I1 r3 p% J4 A; q& J
Borrowed: $ 150500.250 f7 W, }# c# g! r! M7 Q" f# Q
Interest:    5.5 %
; k, u5 Q0 f9 S$ T/ n! @Years:      7
0 b4 R0 T: s# l, D2 g( v. C
# l. L4 i) t1 d" b[ 本帖最后由 wwwsnailcom 于 2006-5-24 02:15 AM 编辑 ]
 楼主| 发表于 2006-5-24 10:52:42 | 显示全部楼层
怎么也没有里我啊,高手来呀
回复

使用道具 举报

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

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-11-25 00:23 , Processed in 0.010099 second(s), 4 queries , Redis On.

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

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