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

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

[复制链接]
发表于 2006-5-24 02:10:29 | 显示全部楼层 |阅读模式
汗,真是不知道怎么写,同学找了个哥哥,3个小时就搞定了,我编了3天,还有100多个错,可怕啊
$ c% r0 X, g6 Y; x有没有高手帮我哦,周5就要交了,我的邮箱是[email protected],谢谢啦
3 h3 U8 [- e, `# m- `% o# x6 N9 aRequirements:  6 u8 w1 E% O) N& c
Consider the three Java Classes: Borrow, RepayCalc and RepayCalcMenu, available from the  
/ `  Q. ^, [+ `1 K9 l6 W3 [' KAssignment 2 page on Vista.  
- O; u! i( r+ t, H' Q  
, A4 {1 t3 R2 C/ W1 l$ C! eYou are required to perform the following tasks:  1 c. e1 p* C8 @  d! |/ w
    f2 u6 Z# t! e1 @: L' D+ x
The RepayCalcMenu class: (Total maximum 20 marks available)  ! W) @: I9 a- ?  r

+ V2 R5 A. C5 Q& c      1.   Provide a basic text-based interface to a Repayment Calculator for the Megalodon  6 c2 V; q6 o5 j6 r' K" @" n8 A
           Finance Company so that it can be used by the Megalodon staff members to  , F/ l, J; S' U8 T  [& Y5 Q, o
           determine repayment options for their clients.  
2 Q" [% h/ A. q& d3 l+ T- j$ a) }/ g- d3 ~% }& ?
           The staff must be able to:  & A" K& a- t. U
" D; \. ^- U; y( v3 ]
           *    Log on to the ‘system’ using their user name and a Personal Identification  
! m( W& m# h; i* Y) M# Q; T                Number (PIN), which a four digit number **.   
2 ?# n( M6 y& Q) S8 G) E
0 g: v- G/ b4 z" {  |' f7 `+ J+ ^                   *    The user should not be able to use the ‘system’ until they have provided the  
" `# g# M& G- K' ^! q                        correct user name and PIN combination. You should give them a second or  
9 J- r: K& p2 E4 K) O4 k                        third chance to get it right before shutting the ‘system’ down.   
% n" V# o4 V( \
! e6 E+ o+ d0 K! S9 Y  2 G4 ^- p2 D8 b7 t+ F6 m* ~9 b, C1 t
                  # p4 i/ u" c' _! N) ]  d. M* l( l
                ** You must use the user names and passwords provided in your individual  
8 i# }- M7 x, x" W! ~3 `
6 }7 u7 s1 r" [                data available from the Assignment 2 page on Vista (see requirement 5 below).  
6 k7 I* f. a1 c" F+ I) t; P                The user names and passwords should be included in your code, and the output  5 Q) v0 l9 N" A) i6 ]& G
                to the screen should prompt the user with the user names and passwords (for  
$ \7 q+ k, g" Y6 L2 `
. z8 J* [3 c- k# F" w                marking purposes).  + H; Q+ x7 \" d" i$ e) Z6 \

, \7 k/ H3 T: L7 G' ], H' }  C                  2 Y5 v! o, y% ^0 S9 L' T0 E
            
+ m3 M. c* Q- w( h8 U* \* O*    The interface should provide a menu so that the staff can:  
# c4 j) ^! v0 o! L3 J/ Y' u4 u9 y/ f
                -    Perform a Repayment calculation  
6 \4 u, J- I$ s5 |9 p# N- n& c1 t
4 b/ X* s/ r/ d& s' l' I1 q                -    Print out to the screen the Repayment details  
. [8 f" c( z5 A. u7 ]# |1 @+ v" I8 ~) E# a
                -     Change one, two, or all of the values for the current calculation  # l5 f- o' m: ^1 b
, J- h9 y* F& _4 _% L4 [/ L
                -     Start a new calculation   
+ \* D/ a/ K9 e7 P- R& a# I7 ~" @3 g: D7 m! M. k
                -    Leave the program.  / M9 _1 D) _$ Q$ z
The RepayCalc class: (Total maximum 10 marks available)  
$ ^; _# L" L# e) i1 P" ]) A
9 Y/ c7 ?8 z; m% R     2.    Provide a method to accept three input values from the user:   
. R) `& [. u: X- ?5 l7 S' n& U) H7 S! d0 ^
                -     the Amount to be Borrowed (to 2 decimal places, for example, 10550.00)  % Y2 }$ s+ w: ^8 I8 f* s
4 w1 p+ @' A* Y
                -     the Annual Interest Rate (to 2 decimal places, for example, 9.75)  
# C1 p- d5 d" @# F0 `3 R2 @. O# D( b3 Z7 o# R  y
                -     the Period of Repayment (in whole Years, that is, no fractions of a year)  : v/ _( ~' M3 Z1 Q: m- A

7 y2 P2 t5 g9 X) D, M      3.   Provide a method to print out to the screen the three input values (accepted in  # U; C: F+ _7 K
           requirement 2), plus the repayment calculations:  ( K. i/ X) z0 o: y0 h

- G7 q# q5 B6 f) E9 a% R+ u. l                -     the Weekly repayments  
) P3 l0 w' N  W8 }- T- B& D" p8 y+ B9 w- K# N
                -     the Total repayment amount (Amount borrowed + Interest)  4 |% h' w% d6 \& C6 x
! M1 H$ E* l7 ]
  
6 b6 j# P6 Z$ b8 S# }+ j: i& p: Q, e% k* F
The Borrow class: (Total maximum 40 marks available)   6 O4 p4 b* B$ }+ r

- m& [, p% ^7 F     4.    Provide methods to perform the following tasks:  " c. s7 v2 A& h, a7 O9 x% a$ V; q
. I7 O+ g( U/ U" L9 j; p
                -     to calculate the weekly repayments ***  * s$ W, e+ e9 i3 C" c) y* K
; ^7 H3 P. `6 e/ n6 K7 n
                -     to calculate the total repayment amount  ! F) ]4 l# y0 k! Q

8 w2 ^! Q! g1 S! i1 \, R                -     to return the amount borrowed  0 b4 }1 ]2 N# m4 t

# V& d( K  _" ^( b) \7 k5 C% K                -     to return the borrowing period in years  
# k4 I/ h) y% }+ j
8 P+ P, J' C5 I& h9 }3 [; ~                -     to return the borrowing period in weeks  
5 V4 j6 ^) }" {9 R9 C  r( b# `
* }/ P( l9 W  X1 f. n+ z7 E1 A                -     to return the annual interest rate  
- u0 j$ a' g2 g$ a. W: H: l* y+ N
: ?! j, ]& P; o! G                -     to return the weekly repayments  
$ y6 Q6 E; E) [# z+ `' a4 r& d! Y! k3 h- T( Q
                -     to return the total repayment amount   . r& d. k0 b0 j, L0 P

# V# L. a. ^& E( N5 D# E! m                -     to reset the loan amount  - @& I& ~% L5 Y
* v2 S; x8 ~9 r* {
                -     to reset the annual interest rate  
1 k. k. _, N6 e1 s. j% w. G1 O9 L% g. v
                -     to reset the loan period (in years)   7 d6 i7 [0 }/ j8 F0 q- h

* p, `& Y2 d# k0 H1 Q       8 R9 b; I9 U) {* y

$ T* p6 f% `3 ]# G. N/ o0 y( V, I               * b/ l2 ^  t5 i# d/ e4 K. I
      
; V, G6 a  ~0 ]/ l) d              *** Use a simple interest calculation (not compound) formula, for example:   ) W- w3 U3 ~& {9 N' `0 v
       & a& D& B" A; a9 X. F- r; x
             weeklyRepayment = (borrowedAmount * 1 + (annualInterestRate *  
2 R0 }# v8 O% H, N, L- V             numberOfYears )) / numberOfPayments;  
2 v, ~9 [2 A; ~2 ?% e
& M: O+ _) g- }. H: u" R         
" Q0 \) D: u% `  @' C
6 T0 W( U5 p8 i; t      
/ y2 `* q6 Y5 _& j  s. j8 r, Q: k4 V: Y
Individual Data (Maximum 10 marks available)  4 w( U. E6 c2 l
) ]7 S, s* Z, _
      5.   You will be given two Megalodon staff member user names and passwords, plus a set  # [3 T) |8 b; V" ^2 o
           of data for each staff member to use to calculate repayment details. You will need to  ) f, L4 X3 T2 W9 z7 H
           log onto the BSA104 Assignment 2 page on Vista to generate your individual data  . z) \/ e  ]8 L' _( N7 S
           and instructions for this requirement. You will need to use your University of  * A8 P. H1 N8 g9 @
           Tasmania (UTas) student number.  3 z$ S* s, Q3 m* x% W2 M- o
             ) [5 N( ~! ~* t; ~+ \) y1 J0 o. p

; T' c% b* |8 T                                                        Page 2 of 5  
; i3 _8 Q/ ~0 L: g- T1 o
, y" Y9 _3 G, W$ {( k* gFor requirement 5 use the following data:
- A6 H( H. T5 W) @$ b8 o% ^0 e+ M5 M3 N" S
# Data Set 1:) ~9 X% |* J( l& Z+ W% d6 c& |+ e
. l$ [, \* q! A
User name: JordanM
1 t" c' j( ]) }. C( DPassword:  Ferrari+ W1 s5 p; N! O) |. n0 F
Borrowed: $ 749.95
' @* Y, {4 @! C; e9 x+ lInterest:    15.0 %
# `  k. U( {' P: l* zYears:      4( ?- e/ v0 W; ]! c! |, y6 T0 U
7 P0 i7 e4 |- G' G( E
# Data Set 2:8 ?2 B. M; q& I6 H2 V
4 _/ g0 g  [  \4 W$ i$ x/ F
User name: KimZ% B9 p! m0 Z8 {
Password:  DimSim! d$ F8 V6 Q) R+ W7 [) y
Borrowed: $ 150500.25
5 t' Y: d" M* {9 f' ^4 cInterest:    5.5 %
2 L: B( i1 m7 S1 g& hYears:      7
- m8 f. L$ f: ~# |6 @
, X. M+ g- X4 p2 H4 v& o- G, q[ 本帖最后由 wwwsnailcom 于 2006-5-24 02:15 AM 编辑 ]
 楼主| 发表于 2006-5-24 10:52:42 | 显示全部楼层
怎么也没有里我啊,高手来呀
回复

使用道具 举报

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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-4-3 06:50 , Processed in 0.081826 second(s), 5 queries , Redis On.

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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