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

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

[复制链接]
发表于 2006-5-24 02:10:29 | 显示全部楼层 |阅读模式
汗,真是不知道怎么写,同学找了个哥哥,3个小时就搞定了,我编了3天,还有100多个错,可怕啊% {! B- P) s" d( K
有没有高手帮我哦,周5就要交了,我的邮箱是[email protected],谢谢啦' H9 M- E' O! c. I
Requirements:  7 c; g4 s% j& |; Q& {
Consider the three Java Classes: Borrow, RepayCalc and RepayCalcMenu, available from the  ; Q  g2 G" m7 V* M
Assignment 2 page on Vista.  
9 C; N# T) H9 ]+ a  $ I  A$ [# ?3 @+ r6 c
You are required to perform the following tasks:  
( D+ N4 k+ d- p; A) W5 {  
4 A- i1 {1 r9 s1 ]: sThe RepayCalcMenu class: (Total maximum 20 marks available)  ( e. B' k  V! {

  t) r( g4 G% T' k      1.   Provide a basic text-based interface to a Repayment Calculator for the Megalodon  2 E! F) A% g/ v9 ?" S
           Finance Company so that it can be used by the Megalodon staff members to  
0 g; W( s, M8 C& [9 b) ^; R# b           determine repayment options for their clients.  4 Q9 r7 N* N  ~) \
6 q7 Q$ _) ^7 g7 N" S1 Y5 d0 p
           The staff must be able to:  3 O3 I/ x1 `6 z! d
: _1 U! k' h* y
           *    Log on to the ‘system’ using their user name and a Personal Identification  
2 t; s% g2 j8 n6 H! i                Number (PIN), which a four digit number **.   6 ], p3 C( }0 b, K; T
5 y) x! A5 K3 y8 J8 C  }
                   *    The user should not be able to use the ‘system’ until they have provided the  
, L( ]0 p9 e2 }( |% B                        correct user name and PIN combination. You should give them a second or  
9 o0 F5 T  P- F. D6 m                        third chance to get it right before shutting the ‘system’ down.   
: Z- N& z9 y/ _0 a9 O3 B2 B: t" d( `
  
& ^9 c0 s1 W$ o                  $ @! m8 ^1 P; D$ V! q0 A) q
                ** You must use the user names and passwords provided in your individual  
" G  S; W  M& u* |+ c; U) V, S* u0 K3 D! `) g# F* y8 S
                data available from the Assignment 2 page on Vista (see requirement 5 below).  & u$ u) W  R: g
                The user names and passwords should be included in your code, and the output  
. P) w; s: ]+ Q! _- X                to the screen should prompt the user with the user names and passwords (for  
! V1 r' j6 m9 |* o$ x
( l  v( f+ w( `, a) H+ W. I                marking purposes).  ' c- ]% @% u9 ?" S* ~3 S" w; p$ R
# ~& H! T( v, f8 f# {
                  
% W; z' a2 L2 A* ^            
( z, d0 G% z" N" _# G( @! R/ K*    The interface should provide a menu so that the staff can:  
( S; u; S! q+ i1 m7 }
$ x9 M8 o* i: p2 Y7 H                -    Perform a Repayment calculation  
" q9 I0 Y8 j( q1 M0 ^  s& W9 Y3 H! _& d
                -    Print out to the screen the Repayment details  
  G# Z( m# w. R: o6 L! J8 l4 W# y7 _& y
                -     Change one, two, or all of the values for the current calculation  0 c/ A* T% m2 `1 u

+ p4 X" C0 v' J, z- v* J3 e' x. g- p" q                -     Start a new calculation   
- b* a+ s1 L% f" I0 K! h. V1 O# H( g# S
! L0 y. S7 e" ~7 z+ X0 y                -    Leave the program.  , m3 G5 r$ G) f9 d- j
The RepayCalc class: (Total maximum 10 marks available)  
1 e7 `, ^$ g+ P, V, v# M9 ?7 [% i' Y/ o/ C+ A' G1 Q5 m9 U
     2.    Provide a method to accept three input values from the user:   : X+ \. p; Q# ?3 k) h

' c; B; L( i% ?                -     the Amount to be Borrowed (to 2 decimal places, for example, 10550.00)  
$ x- P9 d8 m+ k' p: u: r$ |, N. C
3 O0 t( F2 g' j2 f9 Q/ l! s                -     the Annual Interest Rate (to 2 decimal places, for example, 9.75)  7 d2 \* j0 C! {/ ?1 r6 ]. |
7 O# G1 x6 J) V$ x
                -     the Period of Repayment (in whole Years, that is, no fractions of a year)  0 E! l5 ~4 W, X. n$ C, [

1 y4 u0 A! k6 }& }, n# i      3.   Provide a method to print out to the screen the three input values (accepted in  . @0 H1 ^  F5 R
           requirement 2), plus the repayment calculations:  
0 o: a2 ~% l3 _1 r
# C  L% ]! y. C) C                -     the Weekly repayments  - J; N, ]2 T$ s- B3 {) X

: q/ F: Y# m* p- O3 y                -     the Total repayment amount (Amount borrowed + Interest)  ! D/ V# n( h- c
1 Y, `. Q  ]6 T+ M1 y$ \
  
+ T. h' ~# m% d) V0 }0 y, R9 l8 E: {: E
The Borrow class: (Total maximum 40 marks available)   % b" z: u, k) Z( a
( ^, P7 v1 ]# L* `7 ?0 A2 a
     4.    Provide methods to perform the following tasks:  
$ M5 j! N0 c% g9 ]* C0 S* p5 b* I  D/ p
                -     to calculate the weekly repayments ***  1 @' |; p8 X1 r) Y

: b$ h: W* _# S0 W' [                -     to calculate the total repayment amount  , _4 _- Z: O5 g& M

. z  b3 i, c1 ]$ q! o                -     to return the amount borrowed  
& W0 R+ B* H; Y' S1 w  U$ a+ }2 _
# V' \, ?) f8 o" D* C: o: y2 S                -     to return the borrowing period in years  
# [" H- G) x2 t% Z5 J2 L; h
5 C7 W  P8 T8 M/ S2 E                -     to return the borrowing period in weeks  " c* `7 @4 C& O5 D; ]% f! F6 x6 ^7 W

( m* h  n3 I7 K8 S/ ]5 _# K                -     to return the annual interest rate  ! [5 k' a' Y  u% Y

9 o! q4 d- ]3 @* P1 t" k                -     to return the weekly repayments  0 p( U, Y1 C' K% @* b) b) L+ v

" g3 b& r" s! y9 Y5 f9 e5 v, P                -     to return the total repayment amount   
. @* o: ^/ X+ }: X0 [) g; O" R1 Y7 ?8 p
                -     to reset the loan amount  
5 x! F4 G6 J8 `/ P$ l
, F7 j, p' J' [7 J- n+ o# r! d                -     to reset the annual interest rate  ' P, v' j  _' N! T3 @; _: D

3 K" H: ^, B# m7 k) ~5 v                -     to reset the loan period (in years)   1 P# Q0 B3 @9 p

, {. U/ D; O* W% i  S* s       % j6 V6 j  D8 v" w9 r. p9 h3 ]
. ]9 z$ x2 j- |( E
               
; X5 E- Y" t' V6 [2 j, L      
) |# u+ ]% K4 h; z1 I0 d4 I/ P              *** Use a simple interest calculation (not compound) formula, for example:   
! X% y; M& q% S6 ~6 Q; @       , U6 w$ n- u& ^' _
             weeklyRepayment = (borrowedAmount * 1 + (annualInterestRate *  
0 g7 Z; ^) j: z, r5 P             numberOfYears )) / numberOfPayments;  
: S$ W% O) p  M5 Z: n5 }& v, T1 r& ]$ I) Z( y5 d
          , x5 H: e6 q! r- ~" Z; U
$ o5 r  F# E$ c; E/ C
      
" X) t/ n  _9 M) S. M
2 h' E# X- ~7 m$ u6 vIndividual Data (Maximum 10 marks available)  # b: L) l& \0 p8 S9 F- q- K& \0 h

- D: K, `1 Y' V* G  r: X( @      5.   You will be given two Megalodon staff member user names and passwords, plus a set  ! l8 G; t* T' w$ o: \+ o% S
           of data for each staff member to use to calculate repayment details. You will need to  
3 v/ m9 Y, V0 X           log onto the BSA104 Assignment 2 page on Vista to generate your individual data  
: G& {( r" K0 n( O9 ~; \7 Z           and instructions for this requirement. You will need to use your University of  7 D; X6 j0 a9 b# w
           Tasmania (UTas) student number.  
- G% }& u0 A7 ^; G" e+ K8 W            
' P7 I0 {5 v" y8 f9 b3 r) G4 O9 w/ u) s
                                                        Page 2 of 5  
: k9 O( i7 ~  g4 p/ Y% f1 m( C. p
For requirement 5 use the following data:
2 a! c2 N8 V. A$ K. D) S7 ^" D! R9 _$ u3 t' ^# I7 r
# Data Set 1:0 s* u2 ~! U+ @3 E: C: L

/ v1 K* P+ Q( \* |( xUser name: JordanM/ A- j( P. V5 v: {. F
Password:  Ferrari3 e& Q. v9 d/ a: P/ s6 j
Borrowed: $ 749.95/ K* L$ F! |% C# j4 [5 y8 w  R
Interest:    15.0 %3 u2 }. E, h0 _$ D9 u$ ]
Years:      4
  }" \: |  E7 S+ d, w
1 \5 B; d' L" v* K+ O& w7 Y$ v# Data Set 2:1 Z3 K& |, I! U- Z
* N4 V" M6 Z* C* j4 _
User name: KimZ+ c1 C0 A. u3 c  x' q
Password:  DimSim( j% U" D- ~7 d: V2 m3 ^
Borrowed: $ 150500.25
6 t& a& z2 V! V* v+ R3 l& B, D/ ZInterest:    5.5 %7 J. L. N2 h9 i/ N8 n
Years:      7
! }# ~1 B8 L7 P' _7 k& J% ?  A9 S7 L+ T9 H% \( ~3 U
[ 本帖最后由 wwwsnailcom 于 2006-5-24 02:15 AM 编辑 ]
 楼主| 发表于 2006-5-24 10:52:42 | 显示全部楼层
怎么也没有里我啊,高手来呀
回复

使用道具 举报

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

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-3-30 23:29 , Processed in 0.077876 second(s), 4 queries , Redis On.

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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