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

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

[复制链接]
发表于 2006-5-24 02:10:29 | 显示全部楼层 |阅读模式
汗,真是不知道怎么写,同学找了个哥哥,3个小时就搞定了,我编了3天,还有100多个错,可怕啊0 C7 _5 n3 M/ b" q8 O, D, Q, _
有没有高手帮我哦,周5就要交了,我的邮箱是[email protected],谢谢啦
# C% g. q# |+ D# }' S  d2 f: XRequirements:  
2 L, I1 N: |$ c" W9 [Consider the three Java Classes: Borrow, RepayCalc and RepayCalcMenu, available from the  
, r# x1 u/ b  RAssignment 2 page on Vista.  ( \+ G( e( N1 {( w5 Z1 c: l; M
  
$ _. n( P6 s7 Z( |# \You are required to perform the following tasks:  
$ S1 S( q$ k# _! }9 K  
$ b5 S+ I1 O' Y* C9 i6 |0 FThe RepayCalcMenu class: (Total maximum 20 marks available)  
- t6 R) _" n2 H* k% |& g% g, f/ `% H  }& [* f! q
      1.   Provide a basic text-based interface to a Repayment Calculator for the Megalodon  
' W. f! Z3 }6 W9 B6 N4 |7 T           Finance Company so that it can be used by the Megalodon staff members to  ( x; z; d$ Y0 V6 G. ?; [& ]4 M
           determine repayment options for their clients.  
% Q0 W/ W! H* \+ ~1 V
; S0 U/ k6 L  s$ V4 O% a           The staff must be able to:  + k" |$ C1 u# r* _, M% H
4 I# z* X" }  `8 i
           *    Log on to the ‘system’ using their user name and a Personal Identification  
9 Z- R) Z/ C* q9 l                Number (PIN), which a four digit number **.   9 m8 [" Z7 |7 f' |( ^
" H6 ?) u, |+ v3 h: G
                   *    The user should not be able to use the ‘system’ until they have provided the  
  H1 @3 N; h0 P, I                        correct user name and PIN combination. You should give them a second or  
9 j5 V( w& B  ]- a( I- W0 i0 Z                        third chance to get it right before shutting the ‘system’ down.   
3 N/ z. f0 }0 |, @- d  }
; D- E3 X; b- }5 H4 l/ p  5 J' b! s8 c" }/ r2 f/ B
                  & A- J+ B( v+ U1 n* f2 n+ L
                ** You must use the user names and passwords provided in your individual  4 @- B1 [. _5 N- l1 Z8 S4 k
4 e4 j" F& G8 n# i3 A
                data available from the Assignment 2 page on Vista (see requirement 5 below).  
5 ]9 n  {6 w, Y                The user names and passwords should be included in your code, and the output  
% [1 Y: [7 c/ l$ k% C) ?' h9 f                to the screen should prompt the user with the user names and passwords (for    d; G- T  {0 d% g
( V- m5 `) w2 f8 H& v7 D! P5 Y' R  e, C
                marking purposes).  8 }+ K# B+ E% I; m) `+ W: O. d5 L' A

5 q4 L* M9 o4 e                  
3 d6 R. U" U4 C/ ?& E            
* f8 W; ?( P) ?. u/ Q' ~/ s4 z# b*    The interface should provide a menu so that the staff can:  , D( j: N5 I' d* m( @( A
4 T! w" _, Z9 _0 Q4 Q
                -    Perform a Repayment calculation  
) b6 |* ]; i$ t. l* j! L; [7 n. \
& o$ n0 r- Y; q- M: T                -    Print out to the screen the Repayment details  
  X: c, J. L6 Z1 U; E1 t9 a4 _' G3 V. H$ j
                -     Change one, two, or all of the values for the current calculation  ' O/ k+ j2 x) R5 R

/ R. z- ]4 l0 V& o- H$ q                -     Start a new calculation   6 P! `* U& O3 T

8 }4 }+ p6 J8 M! w% [) P7 _9 p4 x                -    Leave the program.  
' `5 Z6 s) C0 f# q8 r" u9 c0 X* xThe RepayCalc class: (Total maximum 10 marks available)  5 U. d- o4 r9 G, M9 f1 O
6 b2 @( I" h3 P+ J6 y2 ], I
     2.    Provide a method to accept three input values from the user:   
5 x4 r  p6 N, r# ~
2 j6 q- Y: M; p+ f, X                -     the Amount to be Borrowed (to 2 decimal places, for example, 10550.00)  
+ ^! I2 |4 R! q& M8 H4 [
0 e6 H: e! k8 K8 ~% P& B" b                -     the Annual Interest Rate (to 2 decimal places, for example, 9.75)  
7 U. G9 z6 b6 O4 U4 E8 H! d* ]' j+ q  G* @" k2 M0 Q
                -     the Period of Repayment (in whole Years, that is, no fractions of a year)  : `. c+ g% Q. N- J. y' d

  l/ W6 z  o' G$ e7 Y) w. }      3.   Provide a method to print out to the screen the three input values (accepted in  * K2 u" a9 y3 v! E; h
           requirement 2), plus the repayment calculations:  
- p3 ?" z. c" f" L* i
/ V' v8 t4 b1 X3 U; p                -     the Weekly repayments  
* l6 `+ c' m& u# Q* p/ l4 H
4 H2 d4 g4 h$ W+ X                -     the Total repayment amount (Amount borrowed + Interest)  # @# K  @. c* P; {* d

- d6 S# M9 `; q, N* w+ ^! U  
1 l1 k5 o& g' P* u! d. N+ \* u$ q. x$ B0 w8 t! {5 h/ M
The Borrow class: (Total maximum 40 marks available)   ) Q( \' \  U3 e4 I9 P  m: J

1 G' p: m, T  J, b8 K' n     4.    Provide methods to perform the following tasks:  
1 O% ~0 _) L3 M( F2 y; ?" S
! h2 ?2 j3 A, g$ K0 p  W: Y                -     to calculate the weekly repayments ***  
0 ?( V3 z, v' G' B
8 B; a9 T1 t9 }4 w) A' y                -     to calculate the total repayment amount  5 h2 h# }& o* H7 k) F' Q6 |

# ^6 a4 K3 ?6 V3 o% Q( w# Q- a                -     to return the amount borrowed  
$ Z" w# `7 F1 i9 A  H
  i* n$ \9 y) o4 ^' z                -     to return the borrowing period in years  3 D; Y6 q' x" r+ `# n

2 s* @& Q9 W6 G, f! G, j                -     to return the borrowing period in weeks  2 `, S& J+ z$ P' ]! ~

* o" @" X4 {. f- Z0 j                -     to return the annual interest rate  , N4 ?! G! W- M1 V: q

+ M5 p7 j* A. _- d                -     to return the weekly repayments  . v" h" V% z8 w' H5 Q

' ?- \' [# C& W& c0 C                -     to return the total repayment amount   
; `0 U+ [  b. Z) X! k! m
/ F- k9 L7 f; s                -     to reset the loan amount  
5 l; c) c* ^; M9 i. F$ Y1 w
4 l8 I# q8 a* _( S2 @                -     to reset the annual interest rate  
3 F: e6 N" o: {9 Y9 e1 r& k# _
# w7 E6 C5 E: t6 e% w3 p                -     to reset the loan period (in years)   . p' D* |8 I# b+ H* U9 v8 s/ V
3 y( Y! ~" D9 \: H
      
) \! J, [5 ^. S. F0 P8 [, R. N2 \" ?. g) h' z; k& Q+ V4 m. r0 Y% b
               4 A; f- I3 [: |9 {! x
      
5 r8 s% L5 p% x# T              *** Use a simple interest calculation (not compound) formula, for example:   6 ~# n" ~: P" a$ w$ b
       7 s) P/ d" o' H+ C& r
             weeklyRepayment = (borrowedAmount * 1 + (annualInterestRate *  . ^2 e: _. j+ F
             numberOfYears )) / numberOfPayments;  6 S1 w, A7 G$ Y- O" F" m

- x4 {  x# U1 G  X         
+ T5 t. u& ]0 N. ]1 t! m3 A& a* R
- Z" i* S: T! l' f3 G. X# L: x' o       $ r; X- _6 z4 @2 W# h! g
; F2 p, ?9 l5 J
Individual Data (Maximum 10 marks available)  
: @9 P# P( B- ~9 w( ~* S+ V
* L4 v* f% n- Q7 }0 t% V# a      5.   You will be given two Megalodon staff member user names and passwords, plus a set  3 Q( U: o' c, F! C8 g; _4 S, \
           of data for each staff member to use to calculate repayment details. You will need to  : P3 D; @6 p% c
           log onto the BSA104 Assignment 2 page on Vista to generate your individual data  / G9 Z, ~$ \3 O# z- l
           and instructions for this requirement. You will need to use your University of  ( X0 B0 `- l0 A9 f
           Tasmania (UTas) student number.  
" M) V% r+ @/ J& r, w) F0 a' Y             8 f6 E/ @8 N4 i7 y' g4 l

" z3 K& i7 g7 B& N6 c8 R3 x: Z( B                                                        Page 2 of 5  
: f. ]3 X: e, Z2 C( d( i3 c
+ V9 L0 |; W5 e, G" A/ p; E8 fFor requirement 5 use the following data:
1 r% |0 w9 i4 ]6 g) b) H
4 P7 E2 z: h  T# Data Set 1:$ p9 T" b( X+ L  p6 G5 \: l& z
  o' P7 v' n  T4 e  \. {" X0 D
User name: JordanM# @$ T6 ^/ j7 _
Password:  Ferrari9 }' z) g$ ~, Y, B* b1 H
Borrowed: $ 749.95
" e, T) n3 H1 W" H+ W/ y) F' CInterest:    15.0 %$ L  g3 z- z; [( g: J% S: S
Years:      4
& T+ y/ \. a3 f5 q5 P6 R) h  C
. Y; V3 f! ]5 j6 P- G# Data Set 2:& w  i. d8 {2 ^; V
" o$ Z$ z; `( p6 o
User name: KimZ
. A; ?3 n2 Z. O0 G6 _5 SPassword:  DimSim) v- @9 f2 C1 _4 |4 Z* j( w+ N
Borrowed: $ 150500.25
) s! ]3 \; v/ jInterest:    5.5 %
; k4 A8 [- q& R1 pYears:      7, j! U4 ~( v& I0 c; ]
0 ?7 [; Q: z: I. O8 n! h
[ 本帖最后由 wwwsnailcom 于 2006-5-24 02:15 AM 编辑 ]
 楼主| 发表于 2006-5-24 10:52:42 | 显示全部楼层
怎么也没有里我啊,高手来呀
回复

使用道具 举报

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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-9-15 07:28 , Processed in 0.067646 second(s), 5 queries , Redis On.

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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