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

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

[复制链接]
发表于 2006-5-24 02:10:29 | 显示全部楼层 |阅读模式
汗,真是不知道怎么写,同学找了个哥哥,3个小时就搞定了,我编了3天,还有100多个错,可怕啊. ~0 C3 B+ u, T" V
有没有高手帮我哦,周5就要交了,我的邮箱是[email protected],谢谢啦, {9 C8 O' h/ a! y8 y6 r3 U* |
Requirements:  3 d& m' g% q5 u5 x: z5 `
Consider the three Java Classes: Borrow, RepayCalc and RepayCalcMenu, available from the  / [0 P* `$ A, ^
Assignment 2 page on Vista.  
% f& `' O. \; T  + [8 \' `* a" ^' G  l# A4 _, h4 f
You are required to perform the following tasks:  
# F$ ?* g( m0 x8 q  
+ E- k' s5 G! n6 [3 J+ @9 J* dThe RepayCalcMenu class: (Total maximum 20 marks available)  
; O3 W. ^# e! p" c0 m: _# L2 v1 q/ a" c6 p& p# b
      1.   Provide a basic text-based interface to a Repayment Calculator for the Megalodon  , V# g$ ~  ]: q4 M
           Finance Company so that it can be used by the Megalodon staff members to  * g! T+ ?6 f7 A  [' @; E
           determine repayment options for their clients.  / P3 b1 O/ {: R! X: S3 E7 i

( x! K( ~# y7 ?; O           The staff must be able to:  0 m0 e3 u* Y4 p
( W7 h- c; M  m  c9 x( r$ w) E
           *    Log on to the ‘system’ using their user name and a Personal Identification  
0 v% k% q* n. w! f                Number (PIN), which a four digit number **.   
* t: l5 E, D! q, W2 J6 d% E9 V; v# b1 Y" [  Q! D6 E
                   *    The user should not be able to use the ‘system’ until they have provided the  7 l& S3 M8 a; h( z8 @5 T
                        correct user name and PIN combination. You should give them a second or  
3 K7 F) o. X8 c, w                        third chance to get it right before shutting the ‘system’ down.   
% m8 B, l& h, Q6 q( P. t! |1 m- a# d8 Q
  
# K- }$ H% }8 m% Z2 E( |                  
1 P- E/ M- ^' w' h4 X                ** You must use the user names and passwords provided in your individual  ) |$ ]$ w  n. |7 ?  V5 L% d

, t2 N- T' @# r                data available from the Assignment 2 page on Vista (see requirement 5 below).  3 e: _! z6 M+ ~# Z3 ?
                The user names and passwords should be included in your code, and the output  9 V; B) b# k0 c6 z
                to the screen should prompt the user with the user names and passwords (for  : u: G) n, }6 r9 m

( I( ~9 ?3 V/ j* y- a  F                marking purposes).  8 d9 B4 c- v0 q! J$ u5 \- |+ K
; @1 T8 f- f% ?. [% _" d( H+ z
                  
& v6 T/ o: \4 z# j  a            
% z1 _5 o8 C  n. U3 B$ X*    The interface should provide a menu so that the staff can:  9 T$ \6 J) N/ ^: v9 u
0 F/ H5 B0 S! y- ^, x# n
                -    Perform a Repayment calculation  * \8 L2 t' K2 S- J7 H' v: k

8 \! W+ I9 n9 v& a                -    Print out to the screen the Repayment details  0 o, M4 b8 T7 @
" \3 @: C, a/ `4 ]
                -     Change one, two, or all of the values for the current calculation  # g+ q* d1 R, o: ~5 Q7 ~

9 F% P5 c9 w" j1 C; w2 K                -     Start a new calculation   
% o5 g7 |' s, v# W$ w- u( t; `) t& _; ~1 g( ~+ `( I' O
                -    Leave the program.  
* {" G; i5 T3 i( dThe RepayCalc class: (Total maximum 10 marks available)  $ T$ V* H2 h# G- h/ b" K

" p" {1 T/ E. w9 \9 Q* M) [) Z: Z     2.    Provide a method to accept three input values from the user:   5 a- o( Q  u( n# B; N' O5 y
' Q* y- w0 v. q, Y  U  r2 ^
                -     the Amount to be Borrowed (to 2 decimal places, for example, 10550.00)  + B1 n7 y3 t/ c) t1 Z* F

3 ]* g  U! j6 J                -     the Annual Interest Rate (to 2 decimal places, for example, 9.75)  5 x1 R1 h# S8 B# {2 B. U& H
8 _$ Y2 W" U4 u! |+ l
                -     the Period of Repayment (in whole Years, that is, no fractions of a year)  
6 D! r+ k6 F/ [& @" }
- G  d. k, r- R; G7 k" K4 l      3.   Provide a method to print out to the screen the three input values (accepted in  # s4 w2 k2 B, C- i- G6 y6 [
           requirement 2), plus the repayment calculations:  % D5 m8 U) Y1 u, p0 U3 G

6 s5 o8 {0 A- I6 @                -     the Weekly repayments  9 D+ _. f6 g# s  m" v( Y$ J1 W1 f
: o1 w3 X# H* A7 {  |
                -     the Total repayment amount (Amount borrowed + Interest)  
3 y2 ~$ s, t; x) |' s7 O. w. C! H/ Z+ Q' S! v) n7 q
  
& g  b$ Y/ j1 {
1 Q2 F# ~' Y/ O/ p; g( c$ QThe Borrow class: (Total maximum 40 marks available)   
' h* m9 w  l2 ^" X- q) G, l6 B# i0 Q; b+ T- R( `& H. O  n/ N4 F
     4.    Provide methods to perform the following tasks:  
6 S% G+ b3 @4 Z
  k( y7 S# M- ]4 u8 g! L) m                -     to calculate the weekly repayments ***  
- d1 O4 @- r5 S: S$ v6 V  H/ I
: }. o$ r1 q- X4 A( l" @                -     to calculate the total repayment amount  8 B7 q) h7 r6 D* f. u  p6 D
' s1 c  d. g6 `! V5 B
                -     to return the amount borrowed  ' u# Z* p0 v; S4 T; }, R

0 {# Z9 {/ U/ R" z; {                -     to return the borrowing period in years  % v6 \9 N% o5 s8 Q; S7 q- J

) q# o' E, U* c6 G6 @1 ?                -     to return the borrowing period in weeks  
/ H! T4 i4 s# M( E) u9 ~* k0 i. I6 A- W& d1 Q, i' Y5 t
                -     to return the annual interest rate  
$ D5 @6 I9 K" w* v' U+ |7 O6 |: b' q, |$ [' e- K3 @
                -     to return the weekly repayments  ; }; U9 S$ B' _1 C2 z& H7 W

; \" m) U4 M: {/ ~: R; A4 c$ T                -     to return the total repayment amount   0 t/ W6 c  X$ [+ J, C3 [9 V1 w

: h% u7 c6 v7 A$ m                -     to reset the loan amount  - Z- g. F- Y7 J: e8 P3 Q& w

4 f. {& N3 S! S4 P  q; O- ?* s                -     to reset the annual interest rate  8 V3 l& I8 W: p3 t, n
; K" D: Q2 y# c3 H8 I! |0 M
                -     to reset the loan period (in years)   
7 R# j. Y. a$ {
; l$ R) u2 b  ]2 q& d       7 {0 U. ^9 [8 {% ~7 q
7 c8 F, M3 H' s3 Z7 }9 k) t! [
               8 s; {" R6 D+ q
      
0 h+ t' p) s0 b7 c- f1 K              *** Use a simple interest calculation (not compound) formula, for example:     E4 @+ V" b  f" \9 T( G
      
! I" ]& G" h7 r1 W" a- ^1 `             weeklyRepayment = (borrowedAmount * 1 + (annualInterestRate *  1 F) `* m3 |5 v. H
             numberOfYears )) / numberOfPayments;  : Y' s% v1 @9 V/ R9 @. e
8 ]! f6 d) {; P: q5 b* n8 z9 o9 y
         
8 e6 _5 I( h3 L" t; U7 d! p0 `: {% |. ~9 r& r! {
       4 ~% a) l- T& y  f" C. `
' n0 w1 ~$ j7 {: B9 W9 B
Individual Data (Maximum 10 marks available)  % l+ s  H' L. S% I9 v
# E3 m6 ?  E7 d  s- `
      5.   You will be given two Megalodon staff member user names and passwords, plus a set  
' C: B  t0 j8 p' c" l) E: z$ u           of data for each staff member to use to calculate repayment details. You will need to  8 r5 i4 e* Z+ \$ n; G
           log onto the BSA104 Assignment 2 page on Vista to generate your individual data  # |/ \  t6 E5 S. r  Y- g. s. Y; c
           and instructions for this requirement. You will need to use your University of  9 d' j- ^) M  y: `: f6 D
           Tasmania (UTas) student number.  # i( D' ^8 L3 _5 m8 \
             + ?6 w, z7 X* V* W0 O
) A! p- i# K2 x* c# H) z  `
                                                        Page 2 of 5  
% D8 r% t8 \9 o/ m' A! U5 ~5 |( e$ K6 @5 _; f  G
For requirement 5 use the following data:
% u1 R% ]. y& V7 u# b% ^$ P, a3 }& P: w( _$ W0 j% ?0 N
# Data Set 1:
5 B. m5 v2 G2 S3 S+ Y' z1 `: o3 K$ N4 @! x; {. s
User name: JordanM
" }9 S+ q! Z$ V- v3 RPassword:  Ferrari
# e2 ^) @3 v- C( }! q1 z* \2 `Borrowed: $ 749.95
$ w& U! O( y1 Y8 \+ V+ ^6 ^, mInterest:    15.0 %4 ~4 n; q5 R5 e! L2 Q- n
Years:      4
, c! s3 Y+ z: w* a' ?/ f5 w; X2 s
# Data Set 2:& Q1 b) y' V; c& L
% G) S- {, M8 y1 ~7 R! t' _
User name: KimZ9 D, N  m; c. [
Password:  DimSim5 ~) g8 c& }! {9 ?& m
Borrowed: $ 150500.252 F+ q0 m. z5 h& J
Interest:    5.5 %
+ O$ j9 A9 V: [2 l0 Z4 cYears:      7
8 }' o+ o- C8 @" x# y3 G7 S+ E# ]6 {% O. O. j1 K1 h
[ 本帖最后由 wwwsnailcom 于 2006-5-24 02:15 AM 编辑 ]
 楼主| 发表于 2006-5-24 10:52:42 | 显示全部楼层
怎么也没有里我啊,高手来呀
回复

使用道具 举报

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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-8-23 13:48 , Processed in 0.728392 second(s), 5 queries , Redis On.

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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