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

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

[复制链接]
发表于 2006-5-24 02:10:29 | 显示全部楼层 |阅读模式
汗,真是不知道怎么写,同学找了个哥哥,3个小时就搞定了,我编了3天,还有100多个错,可怕啊
: l1 y2 T) W3 J: S有没有高手帮我哦,周5就要交了,我的邮箱是[email protected],谢谢啦/ O/ {  M6 p0 Q+ c+ T% g
Requirements:  
+ A5 q: i, H7 L" G5 D. KConsider the three Java Classes: Borrow, RepayCalc and RepayCalcMenu, available from the  6 @- v- `7 a( Y4 P( W
Assignment 2 page on Vista.  
; V& ^6 m$ z! p$ o  h7 n% d  g3 s  
7 b7 H; h1 d0 Q! JYou are required to perform the following tasks:  
5 _1 T9 Z9 \+ ^- q: o$ d2 h5 b  
7 Z* S, q5 I. x1 D7 {The RepayCalcMenu class: (Total maximum 20 marks available)  ; @5 B" J. V- ]& V3 C$ z
) I" {. V5 F1 y
      1.   Provide a basic text-based interface to a Repayment Calculator for the Megalodon  7 v* _- p+ U% s2 I7 H9 C
           Finance Company so that it can be used by the Megalodon staff members to  
9 a% F0 V% l5 H" ?  Z, B) o" S           determine repayment options for their clients.  
1 R; c2 C! r% d2 M2 v1 t$ Z# P: a! z
, a  Q3 O' Q# ?           The staff must be able to:  ) R  c% j% b$ T% q( J6 H: u# i. m
( C3 ^' {: q) n+ t2 {
           *    Log on to the ‘system’ using their user name and a Personal Identification  
# r4 m* C! I. W                Number (PIN), which a four digit number **.   
2 a! r8 Y2 z# K! W6 j
6 C* l" X# V; ~$ j8 R7 p3 E                   *    The user should not be able to use the ‘system’ until they have provided the  
$ m  B$ \; `1 `- F) ]% L                        correct user name and PIN combination. You should give them a second or  8 l5 L1 `! v4 N9 z; _0 _
                        third chance to get it right before shutting the ‘system’ down.   2 B5 B3 B' _, `$ U) x
/ i" ?3 J" I7 {$ W# h4 l# ?
  
# F8 ?3 {' [: B% M* `" P% |+ n                  7 m3 ^/ k0 `* {! [& y
                ** You must use the user names and passwords provided in your individual  
0 p; J5 K9 y+ Q* f' \
" l* O3 J7 E  B& ]# A, b                data available from the Assignment 2 page on Vista (see requirement 5 below).  ; A) S2 U% _( r, z1 q
                The user names and passwords should be included in your code, and the output  $ G) Z9 k6 B0 M. C
                to the screen should prompt the user with the user names and passwords (for  % `% W9 T. q1 }3 _8 v* g% D5 _
% {" ]! p+ `4 F' U; ?) P, a* I
                marking purposes).  * {4 D' J0 b. @0 ?1 t! f0 m9 ]
8 I$ {  l! D5 u! z+ z2 E& i3 y. n5 Z
                  
2 H* X8 n! z+ `/ B, \            
3 D- D; Y; i$ C*    The interface should provide a menu so that the staff can:  
0 H/ k4 J+ g8 n; x) q; ?& P. X. K) R
$ C- X2 a4 x8 J  A. s/ P                -    Perform a Repayment calculation  
+ y, g  c& E2 k  s% W( j, r- \$ k9 J& H( @( i; m- O% D' V$ r- C
                -    Print out to the screen the Repayment details  # ~0 R! A" V+ J4 @! V3 H7 k
* ?+ t7 O$ `$ N* J+ f& \
                -     Change one, two, or all of the values for the current calculation  , A, V8 I/ _4 }8 N; k
9 U) s, n4 g' H! Q0 Q3 M' W
                -     Start a new calculation   
  L) m; U4 D+ `# `1 c3 `+ K2 T. P7 ~- M1 S
                -    Leave the program.  
( Q9 c2 ]+ O% Y: g% NThe RepayCalc class: (Total maximum 10 marks available)  3 Q/ _; F4 G% R* e
6 \! b) U1 l2 W; a/ s+ L
     2.    Provide a method to accept three input values from the user:   
) i7 I1 q& D9 f$ n0 e9 g/ n; \& {: Y: b2 {
                -     the Amount to be Borrowed (to 2 decimal places, for example, 10550.00)  
. U" x3 s; E# ]5 h. o# A$ H3 r6 Z' C5 `) z' _0 A
                -     the Annual Interest Rate (to 2 decimal places, for example, 9.75)  
; o% V" _; g% t# {8 c! A1 a; Y3 W9 T8 T9 R% Y2 n0 |& U
                -     the Period of Repayment (in whole Years, that is, no fractions of a year)  
$ u6 j2 V$ n! F- o9 f1 }# u7 f, f3 _
      3.   Provide a method to print out to the screen the three input values (accepted in  : @7 ]# D0 I8 m' Q
           requirement 2), plus the repayment calculations:  + t2 G$ a; u- V- `7 r  ?" t

2 k+ \4 i1 N& k+ X' L- z$ C4 R                -     the Weekly repayments  / m& ?$ J; U; W; _' g2 |
; J+ w1 r6 ]' }6 a" P
                -     the Total repayment amount (Amount borrowed + Interest)  
0 Y- x. `8 G# t% u, b* w0 ^. S
  
$ O% z$ ?% {+ K9 F. t# C0 ~1 Z. A8 ]3 E/ D1 b2 K7 M. v8 c6 A; w  F
The Borrow class: (Total maximum 40 marks available)   4 D% K' d( g" a

3 Y% B3 ]- ~" S# ~$ g     4.    Provide methods to perform the following tasks:  / A2 g- }5 G# s. E% V/ Y" G0 f
( ]( T* t% Y$ L- g2 I5 S4 e: \  ~
                -     to calculate the weekly repayments ***  # d2 T3 c3 S1 A, A% D) y3 S6 ?4 A

( Z: M0 H% s& r/ z) {7 J' J7 V4 {                -     to calculate the total repayment amount  
9 ~8 m0 b& S/ Z7 A
( G% Z2 P0 n) C9 @6 @/ K                -     to return the amount borrowed  / {" k& a4 j! Y
/ F( F# C, x7 \- k+ j9 H/ |5 x
                -     to return the borrowing period in years  6 j6 D: V. w& {7 G0 \

' |+ V( G6 J7 y5 p0 r& B! N( r( g                -     to return the borrowing period in weeks  
, ^0 G7 ~* l6 [8 t) L+ S
+ w6 |$ n5 @  L6 ~  i, j! l2 M                -     to return the annual interest rate  8 J9 b5 j& V9 B& t
* ]9 w; e3 q# ?( M  m. @: t' `
                -     to return the weekly repayments  3 [; D/ }  m/ e# k7 O- t4 l8 @
7 [, c( v9 p( |9 c/ A9 j9 ~
                -     to return the total repayment amount   # F2 q- M. y$ p' V' l5 {  ~( ^

! u! p% o0 p( j; |% P& x                -     to reset the loan amount  
+ f6 s& n* y2 n5 g6 V( z5 h
* B6 q- P2 S: y  d                -     to reset the annual interest rate  
# H; J$ F& U& X% B: l' l
, z' @7 e! X" E: T- R+ p                -     to reset the loan period (in years)   
/ a2 z; z5 r) e7 V/ ^: b1 Y4 n6 f% q) _( x* [0 h7 A
      
3 B6 b! f. S' [' n
, `3 o( U4 V+ ~7 T" N               
" V* F* C1 m$ k: E8 o" H. J       - u, c3 A  e& p: P  {# T
              *** Use a simple interest calculation (not compound) formula, for example:   " t6 j. \# D/ P7 r" {5 b
      
/ [9 |3 Y0 ?) W+ r# x  B             weeklyRepayment = (borrowedAmount * 1 + (annualInterestRate *  
7 ^- o2 S' ^: n3 n1 b8 _             numberOfYears )) / numberOfPayments;  1 D0 J0 z+ ]2 Y" F( l
" l% Z+ [" i3 B! ^) W
         
7 t7 X4 t" `0 u* z& h. _+ [5 N: n" r* m$ M
       3 _3 y2 V9 P# L! c6 I

! B8 X9 \# ^/ `% eIndividual Data (Maximum 10 marks available)  
, @/ v) ]9 E8 j' d; g/ I
( `  T8 F  D1 d6 D0 b  S1 y      5.   You will be given two Megalodon staff member user names and passwords, plus a set  ( D8 v6 }  ]# }4 Q# A& T- i
           of data for each staff member to use to calculate repayment details. You will need to  * t5 l; J2 v7 ^' a
           log onto the BSA104 Assignment 2 page on Vista to generate your individual data    B7 ?8 w/ T/ H! V6 f
           and instructions for this requirement. You will need to use your University of  
$ Q: ~4 ]+ V' {7 G+ A" _7 S) V, \           Tasmania (UTas) student number.  % S& q0 U  ?$ U, r7 C
             " w8 `* |. j$ x6 o3 l

- u, j5 K; {5 R7 r                                                        Page 2 of 5  
4 u" P9 a: }/ U# @* j, c& H- r. Q$ v2 ?8 c3 P- ]$ Q- C1 C
For requirement 5 use the following data:
& O: l& [6 s7 u% F$ J' J6 I; I6 L1 K9 l9 c0 U& ]8 J  i
# Data Set 1:
; D- p) X  e( d4 A7 }$ i3 w' e) h0 L! @& Q; a
User name: JordanM
" i/ b' u* d' {! _2 b- }- T) @Password:  Ferrari  D/ }5 \# }% g6 y  @# q( }$ Z8 N
Borrowed: $ 749.95
5 M; Y7 c2 k- G) k( a+ lInterest:    15.0 %9 R/ Y/ ^- N  ~6 q
Years:      4% d% j( k1 O7 r
8 ~) O0 J, u2 B
# Data Set 2:" b. h! w" J4 @. W% e6 @1 D

0 w* o% m+ u- A1 z- J3 @; `User name: KimZ
  t/ P6 x* _" k7 m- YPassword:  DimSim/ v$ g4 l( G( ]' @* A' _
Borrowed: $ 150500.25
1 p  {; I' }/ f. u1 l& w  U  mInterest:    5.5 %7 b! Z5 v! s' A2 _0 d, @( R
Years:      77 I  r9 Z) r4 _3 u* T7 b
' n+ r0 }# R9 {& n
[ 本帖最后由 wwwsnailcom 于 2006-5-24 02:15 AM 编辑 ]
 楼主| 发表于 2006-5-24 10:52:42 | 显示全部楼层
怎么也没有里我啊,高手来呀
回复

使用道具 举报

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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-7-18 09:02 , Processed in 0.052629 second(s), 5 queries , Redis On.

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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