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

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

[复制链接]
发表于 2006-5-24 02:10:29 | 显示全部楼层 |阅读模式
汗,真是不知道怎么写,同学找了个哥哥,3个小时就搞定了,我编了3天,还有100多个错,可怕啊
+ V1 e8 U* n) C/ l. K有没有高手帮我哦,周5就要交了,我的邮箱是[email protected],谢谢啦) ?+ O" Q9 d8 u) |" f$ h
Requirements:  ! {: ]% d: Y2 A5 f) S. T& k( f7 T' Q/ h
Consider the three Java Classes: Borrow, RepayCalc and RepayCalcMenu, available from the  3 \* Y/ h! R6 F# @* s
Assignment 2 page on Vista.  * Y( t( I' d; a( h
  
' f8 S6 o. u9 S" D" TYou are required to perform the following tasks:  + k4 {8 \6 e' l# t4 q5 N8 Q
  : v7 N/ F! _/ @; w( S$ c
The RepayCalcMenu class: (Total maximum 20 marks available)  
- G0 o# L0 }+ X  K" k( j* f6 |; u$ ?' R0 g: S: f# [
      1.   Provide a basic text-based interface to a Repayment Calculator for the Megalodon  
0 b+ w- |1 `# ~: T7 i' b4 h           Finance Company so that it can be used by the Megalodon staff members to  
9 i" H# a  x; b$ T1 W' @! y) a) U           determine repayment options for their clients.  
6 I% A2 G) t& u! @: X/ n
2 @# J( P" x6 G% U7 F8 K7 ^- q           The staff must be able to:  
7 o4 C  l/ \# u4 t  Z# F/ }0 Y
" o0 Q6 ~& ~( J: x  C( h+ n( g           *    Log on to the ‘system’ using their user name and a Personal Identification  
4 J# R6 k# s" y. ^  }* h- l0 z7 L! d                Number (PIN), which a four digit number **.   
' ~& S3 y" Y2 N
" R, E' K7 Z+ E                   *    The user should not be able to use the ‘system’ until they have provided the  
( ?- q& `5 G! w- l+ Z8 z) B9 ^                        correct user name and PIN combination. You should give them a second or  
9 w% F7 M% F5 Q" {7 F$ M4 ?                        third chance to get it right before shutting the ‘system’ down.   
) a- A, h) J! p: a( L) k5 ?6 |  Y( z6 l- Z  E: A. ^7 ?
  
6 u# r: M8 B# v9 I" r- R                  
& y% ]- T  `8 V" ~3 \                ** You must use the user names and passwords provided in your individual  & n2 p  s$ y/ j+ I' \) G, E

& ?; Y1 Y8 S  h4 P* n/ r  T" M                data available from the Assignment 2 page on Vista (see requirement 5 below).  
# h& Q8 [1 U! `                The user names and passwords should be included in your code, and the output  0 q6 K3 U1 t0 E# F% W
                to the screen should prompt the user with the user names and passwords (for  7 F. X; [+ V' k" L
7 n/ E: `' X" z% k3 G+ e, N1 C
                marking purposes).  + `, Z' @$ Z8 a* a
7 N8 g2 ?$ H4 j5 M" c1 N3 d
                  % H; r/ F3 |# p
            
  d7 U' U1 i% |4 |7 t* U6 ^*    The interface should provide a menu so that the staff can:  
+ e* X( Q% n% z3 k) I: G  p1 M1 j) e, E& L2 s6 U2 O
                -    Perform a Repayment calculation  - m$ f8 r- [& M/ J( s  M4 s
* _' m2 l0 S9 g$ [( Q% l+ \
                -    Print out to the screen the Repayment details  % o5 ~7 p! D2 U9 z! d; }. V- ?

5 Z" h* @& {+ h                -     Change one, two, or all of the values for the current calculation  
, B( U- _% |* G! @+ u2 {' P* q' P
                -     Start a new calculation   9 h' g6 J4 g; L# D% }! ^  P- b* L  g1 E
/ w- f% H9 c/ N' h5 Y& L) B6 _, c* i
                -    Leave the program.  
- w  k( q( I% \- d  s* U9 y# sThe RepayCalc class: (Total maximum 10 marks available)  - |, M) [& M* Z0 U* {

: C$ S* w2 i* @, f     2.    Provide a method to accept three input values from the user:   ) L" X9 N% n( q

# }* L1 o% i4 ]                -     the Amount to be Borrowed (to 2 decimal places, for example, 10550.00)  
9 Y, M% w+ ]0 N$ x5 h; S9 n; [8 f2 E" z
                -     the Annual Interest Rate (to 2 decimal places, for example, 9.75)    c$ X+ W- u: {% |& X6 E0 d8 A) a

! u. ]% a6 a6 j) a& b9 }                -     the Period of Repayment (in whole Years, that is, no fractions of a year)  2 Q% x! K; Y! M, U8 J9 b

0 R7 m) \: e  ~0 d4 G      3.   Provide a method to print out to the screen the three input values (accepted in  
+ U6 n! D4 L7 d( S4 v# T8 x8 N! M( y           requirement 2), plus the repayment calculations:  
9 G6 z7 g  g; @+ J+ j+ G: p0 p7 Y! W
                -     the Weekly repayments  + j: p& I, \& O4 O; f4 Q9 t
9 y5 C3 N0 X3 |. H- l
                -     the Total repayment amount (Amount borrowed + Interest)  8 ]* a: ^' @4 ]: V0 u

* t; S5 q! @5 g; z! K, X* q  - e5 [  U+ I; w* f( k
- G) v" x- C% f/ k
The Borrow class: (Total maximum 40 marks available)   7 k& Z! E$ |4 S  I

+ c! J% i( N! P2 J+ F6 U     4.    Provide methods to perform the following tasks:  ' O: y1 e; |4 X7 `/ R8 P5 i: |

7 r0 i# A9 t$ u4 Z7 R                -     to calculate the weekly repayments ***  $ e& ^' \$ }- p2 x9 _* C

: Q% I6 B; L* Y8 |                -     to calculate the total repayment amount  
% e" K6 b( Q* Z% [0 P. z* g" b9 J" a, d
                -     to return the amount borrowed  6 \, J/ |! e( Y1 F
1 E/ y. j. W# z$ z, i5 h
                -     to return the borrowing period in years  
: [6 f9 R  w  G6 Q; r1 h" s# R/ A0 a( f3 U% C2 }2 t
                -     to return the borrowing period in weeks  5 S' h9 p4 G8 c- H& ^& c

6 t& r. j) n5 Q! A  ^9 e5 `                -     to return the annual interest rate  0 w# \" \& m8 y2 k" T

; E/ Q  M9 N: P  F) T" s$ C; N                -     to return the weekly repayments  4 h$ F5 d" {3 p8 A# `0 S
. a; J7 W' q4 V, @
                -     to return the total repayment amount   / e; f2 P. t$ r4 i" X6 _/ [1 M

, N9 ?7 {' R& n& T$ m                -     to reset the loan amount  2 z! ^1 L$ B0 s! F$ d- N

. N5 k5 {% t1 c5 t8 ~                -     to reset the annual interest rate  2 e) [8 z, S- _) e  G

; N2 |3 N" Q) d) y                -     to reset the loan period (in years)   ; ~! C2 z& ~; e
) T% \( t& [6 j* Z
      
; [, L6 G9 n: j( c! ^- s' w, B" v7 ]- j% i. s
               " ^3 b. s% l) l6 `3 d8 t! B7 h4 z
      
7 _* d5 [/ |" v              *** Use a simple interest calculation (not compound) formula, for example:     F- V! i3 v# i9 P+ ]
      
7 X) r4 R/ i8 S- B9 x3 v6 S             weeklyRepayment = (borrowedAmount * 1 + (annualInterestRate *  1 `: G9 l% b" f& {0 f( V/ K
             numberOfYears )) / numberOfPayments;  
* w) m) I' B: D
$ B' q. W: f* ?* \' k4 Q, t         
6 G4 y; W6 e3 n5 T' z$ `' E( U; j5 L9 Y4 F( b$ m
      
3 a+ d8 E( M) p) Z1 j0 a3 _! m
/ `& N/ N* D; ~( n1 gIndividual Data (Maximum 10 marks available)  
3 K9 p" O- W( ]9 u! l
) _2 _: T" {' A# e- [      5.   You will be given two Megalodon staff member user names and passwords, plus a set  & S' F6 \# e/ Q8 |( k
           of data for each staff member to use to calculate repayment details. You will need to  
: n2 ?( {1 N' A% x4 P6 t8 w           log onto the BSA104 Assignment 2 page on Vista to generate your individual data  
% r6 ~( ]7 Z# y           and instructions for this requirement. You will need to use your University of  0 M* h. b0 J, \
           Tasmania (UTas) student number.  
  {, c" X+ F9 T3 X$ P  t! |             8 Y  ~* ~4 h$ y5 w. m; Z3 ^

/ I$ V2 m. S) F, R$ ?+ {                                                        Page 2 of 5  
5 x  _* ~9 U3 s6 z! i) U+ N: j. Z- d6 s1 ]* @2 |
For requirement 5 use the following data:
1 W$ Z( m# w5 p, D
' Y5 ~0 i/ D" c# j) X# Data Set 1:
+ t' N! I* z' [5 ]0 @
9 i9 j6 `9 b( ^User name: JordanM
* S9 a( B# h$ q- @- @  `/ SPassword:  Ferrari
; t& c+ w5 d3 @2 T( o: |; H# xBorrowed: $ 749.95
4 [2 r2 [7 y( M7 lInterest:    15.0 %
, ?/ j/ V) h- `; h' o7 gYears:      4
0 I. K$ ?) r: t$ @3 x$ m& R
8 y3 h. l* d4 Y# G$ E! W# Data Set 2:
  c' p' M* |$ s( L1 I
3 k8 i- b2 O5 f: iUser name: KimZ  o+ i1 Q+ u* v- r# m$ M
Password:  DimSim
. M- A% t" E0 NBorrowed: $ 150500.25
) n4 R3 o) M9 FInterest:    5.5 %1 q, l$ r2 e' H( Y3 i, ^
Years:      7
0 C  M# m6 R- k; \3 O- E2 j: }+ x: b9 v7 a: U3 ~7 m1 |
[ 本帖最后由 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.010031 second(s), 6 queries , Redis On.

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

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