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

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

[复制链接]
发表于 2006-5-24 02:10:29 | 显示全部楼层 |阅读模式
汗,真是不知道怎么写,同学找了个哥哥,3个小时就搞定了,我编了3天,还有100多个错,可怕啊
$ U1 m" S6 e5 G# v6 s有没有高手帮我哦,周5就要交了,我的邮箱是[email protected],谢谢啦1 o# o. v0 T3 k0 j& T6 |) y
Requirements:  # ~8 D0 ?3 P) ^# c. u0 Q
Consider the three Java Classes: Borrow, RepayCalc and RepayCalcMenu, available from the  / {( N+ X3 I" V/ a
Assignment 2 page on Vista.  
9 `# F7 \$ f( E$ U! i  ; g+ S! N6 L! B1 Q- P. o. E
You are required to perform the following tasks:  $ R  g( p6 Z$ z% j$ b3 s$ k7 L* }
  2 A! A& P! W, Y- q$ N
The RepayCalcMenu class: (Total maximum 20 marks available)  " K/ `! N2 H" N0 q1 d6 ~5 p

+ j9 `$ v8 X/ S& L* |) v      1.   Provide a basic text-based interface to a Repayment Calculator for the Megalodon  4 E9 c+ f: H+ P5 W( I( G9 j
           Finance Company so that it can be used by the Megalodon staff members to  % e6 t8 z: q3 q# b' k
           determine repayment options for their clients.  3 Q% o5 u! K# E8 u
4 t6 O4 ]; C, k8 w) l
           The staff must be able to:  + [: g$ z2 Q( u4 D7 T! w
- p2 y$ p1 L+ r
           *    Log on to the ‘system’ using their user name and a Personal Identification  % o" M, e' r& l. [( l/ C* z& ~0 @
                Number (PIN), which a four digit number **.   
2 Y2 ^( ]9 N3 \6 j0 r0 ^/ b
, Y! W! {, G# z( Y0 l; g                   *    The user should not be able to use the ‘system’ until they have provided the  
0 r+ K" z; e' \: o! Y2 h                        correct user name and PIN combination. You should give them a second or  
( L/ u+ m" T& R: u% y$ o( I( S1 m                        third chance to get it right before shutting the ‘system’ down.   ( K" @5 c/ l7 c$ T  x8 w

  e3 {5 V( q+ K$ T9 J  
+ y! j0 R$ R1 x) m) B                  
4 C/ p9 P4 \0 v7 Z                ** You must use the user names and passwords provided in your individual  ' n8 R3 z, }$ V+ W$ Y7 I
$ X. g8 y; I, Z
                data available from the Assignment 2 page on Vista (see requirement 5 below).  
5 Y' W3 B3 P! B4 s& Z# W8 j                The user names and passwords should be included in your code, and the output  / x; O" c$ y' N2 |
                to the screen should prompt the user with the user names and passwords (for  
  J, G7 e' N% U* l# |. F# B" i) E- F" d
                marking purposes).  
' A1 i7 S' ~: k  p: d" p0 [' r6 m3 Z
2 M. Y) A# C8 G                  
, m* R8 g! i0 m4 W            
) S/ Y1 ?0 |, u*    The interface should provide a menu so that the staff can:  3 y" d' z) ]; f9 U' c$ `0 q
- W3 Y: E8 w; g% H# y2 |) G
                -    Perform a Repayment calculation  ! N* w/ G3 S: |5 A* G

+ N' h- m" l" V+ F                -    Print out to the screen the Repayment details  
+ y1 {/ p* [! U; j5 C8 w* Z( L5 L# C( [
: i' Y5 z. P/ ~  P7 x) w8 m# _0 Y                -     Change one, two, or all of the values for the current calculation  ( \/ D. _4 X: e% p4 l# K- W

5 Z# r" r- T( R% l) }$ D                -     Start a new calculation   . M- a! c. h- w' I; _

% x* m, B* ]1 L/ F1 ?' m* B! F                -    Leave the program.  " ^  h2 [5 ^8 c
The RepayCalc class: (Total maximum 10 marks available)  
' A! M8 q4 Q# ]0 w8 N$ u# L0 Z! ^7 `8 m  A% o8 u6 r5 |5 C* S
     2.    Provide a method to accept three input values from the user:   3 B8 S' t) L# q1 F' X* ^$ h
% J/ M* a. Q  `3 }
                -     the Amount to be Borrowed (to 2 decimal places, for example, 10550.00)  % ?  ]$ d: P" F

3 R4 j! F# ^! t' _( V1 N                -     the Annual Interest Rate (to 2 decimal places, for example, 9.75)  ' H$ v% A, K8 \& y5 t

0 z3 R6 v' d1 y9 \2 n; d                -     the Period of Repayment (in whole Years, that is, no fractions of a year)  
2 k/ f2 `* U8 k; ^% |
1 z- q& K. n. k  ]7 [$ \& X. I      3.   Provide a method to print out to the screen the three input values (accepted in  
; j  F' w, [. ~" x5 f7 y. N8 ?           requirement 2), plus the repayment calculations:  8 t. U$ z; _. b1 v6 |
/ l: c* T. k5 g0 E' [$ i& S7 m9 U
                -     the Weekly repayments  ' m. Z% k+ c+ A' T2 Q7 x

# q; l5 N5 _8 s- d                -     the Total repayment amount (Amount borrowed + Interest)  
' F5 F: _6 X4 g1 M- H7 x0 r, k1 C* o- T9 `3 C3 }8 [
  
+ I% b+ e' q; u
2 t$ J' I3 c3 I. u/ HThe Borrow class: (Total maximum 40 marks available)   4 A# |  z# F$ Q* `+ r7 `7 W; u

) Z: z+ j3 w0 P2 T7 b8 g% X     4.    Provide methods to perform the following tasks:  
7 W9 K2 V! r& `5 ?3 {' `- I: e1 F7 J$ y* M# J! G. t; l7 r
                -     to calculate the weekly repayments ***  " \8 ?, {- V, h9 j4 a

% I3 {2 ]' U) \$ V                -     to calculate the total repayment amount  + C3 L2 g8 F" L
% K4 X& Y+ _- O/ u3 V9 c
                -     to return the amount borrowed  
% z( _* p8 d2 G; q1 \! u! a6 {+ R7 o8 x" M. W4 ^
                -     to return the borrowing period in years  
/ _* g* W# Q. i7 R$ T2 q" l
! ~. b$ w6 a! A( W+ p7 @0 ?                -     to return the borrowing period in weeks  4 X- g: V5 C5 a
" h2 r0 Z; u9 V) K: ~6 [
                -     to return the annual interest rate  / U. e' Z: k+ F0 T, S9 ~

% P( c# o$ S2 a' W; Q4 w                -     to return the weekly repayments  0 g. ]1 H# z; y! `9 b

$ G) x' S0 L/ K; e- f& q                -     to return the total repayment amount   
6 N. I' e! j) E/ C6 H9 q# L% v
7 A/ d( A$ P3 F% {, C# F                -     to reset the loan amount  7 d/ `- K8 k" e

  X! o) @9 _* ?2 Y) ^9 ]                -     to reset the annual interest rate  
) X& }9 h: F" X6 O5 y9 Y
/ M1 U* a1 @& Q$ D                -     to reset the loan period (in years)   9 |7 z0 c- D# l3 L$ N! _0 P7 Y
4 @* |4 c1 z# A9 s! T2 a
      
3 |' z. @+ s9 H/ i% K* }/ ?) V2 i
- P. t1 z: _& O5 x9 T9 q' q               6 l3 w  Q. w1 M- ~9 g
      
9 s$ `9 k3 K7 Y, v/ P              *** Use a simple interest calculation (not compound) formula, for example:   ' S9 Z% W1 h6 L1 Y% x6 ]
      
5 q2 V- c7 \( j. g$ P4 v7 d* @2 \4 O             weeklyRepayment = (borrowedAmount * 1 + (annualInterestRate *  
. y& F) B% ?* y             numberOfYears )) / numberOfPayments;  
+ n8 a. O; s+ f/ R# z& t" d0 s: P. @0 ~9 p  ?
          ; b- G' J* ?# z2 o1 E

8 \& U, `" S2 S4 ?" E* `( c      
$ T1 z6 u& l# e, o; J7 ]8 K5 M( _" W# w% [( g$ ~
Individual Data (Maximum 10 marks available)  6 b0 z! m8 T* P+ H6 z1 a: ?, e1 {
0 K7 g* @5 }8 Z, S) e
      5.   You will be given two Megalodon staff member user names and passwords, plus a set  
+ A) N- \4 \* v           of data for each staff member to use to calculate repayment details. You will need to  : d; F; n1 i) ?' U0 A( |
           log onto the BSA104 Assignment 2 page on Vista to generate your individual data  
1 z4 a4 U3 ~1 k- ~           and instructions for this requirement. You will need to use your University of  5 S$ s4 Q# M7 X/ `
           Tasmania (UTas) student number.  ! i1 a9 [: A8 K" Y. @/ Z% e2 k
             ! _$ u  s6 B$ h0 x! v

; w0 f# b* k7 Y$ F                                                        Page 2 of 5  
$ Z) Z2 \2 g% M( \: k6 R  H- T
% Y: k: V' X6 LFor requirement 5 use the following data:5 T% O9 H* V/ O) W
: h' W3 d# o4 R* ?. {
# Data Set 1:
9 w, l% c5 c4 p. j7 E6 v
6 k* r& m: n/ y8 i3 sUser name: JordanM8 b- \( ]$ x- k4 }2 h5 C
Password:  Ferrari$ o  V" B# g3 x+ L0 s8 ^5 b
Borrowed: $ 749.95
( e9 S* ?1 |5 ]% hInterest:    15.0 %+ T* R8 A1 N) q2 W
Years:      4% o+ y$ f  a% X/ _
8 a& b8 I/ z1 v1 O& m
# Data Set 2:
* q' k- \% _. q3 m0 |  v8 K
, Y6 ?/ `- V- ~$ E# @1 KUser name: KimZ6 g5 @5 [( P8 n% u7 q: J
Password:  DimSim
* T4 S$ x9 _( z5 h: K0 S' K( ~1 BBorrowed: $ 150500.25
9 _9 D" K3 y  T  ~2 v; ~% ^Interest:    5.5 %
; d( s. O. d- e- w( nYears:      76 Y' k+ `' G' I& b
3 e1 J5 K) K' l7 A2 J' t
[ 本帖最后由 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:26 , Processed in 0.081447 second(s), 6 queries , Redis On.

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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