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

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

[复制链接]
发表于 2006-5-24 02:10:29 | 显示全部楼层 |阅读模式
汗,真是不知道怎么写,同学找了个哥哥,3个小时就搞定了,我编了3天,还有100多个错,可怕啊% c! v) P( E+ ^$ X( y2 c
有没有高手帮我哦,周5就要交了,我的邮箱是[email protected],谢谢啦! v) z- A2 n7 Z( S
Requirements:  
6 T4 B$ L' {+ T  j' RConsider the three Java Classes: Borrow, RepayCalc and RepayCalcMenu, available from the  
, T1 O' d, N2 h0 e. [Assignment 2 page on Vista.  
# b: X  I% Y  Q  
  d% s( ?( [  i) N1 _: bYou are required to perform the following tasks:  
2 M7 _8 o! |8 c! P, z, I  
" u$ T0 l2 s. n" x, x4 F# _The RepayCalcMenu class: (Total maximum 20 marks available)  ; j& p, Q# e! w! C, `7 O3 H2 O3 B
6 ]/ I1 `/ U% K- T0 {
      1.   Provide a basic text-based interface to a Repayment Calculator for the Megalodon  5 h; Y' Q6 Y  k7 ~3 H" y9 w/ k0 E
           Finance Company so that it can be used by the Megalodon staff members to  % _) k4 K3 A$ s; N' |; R8 B
           determine repayment options for their clients.  
+ s7 T; k; Y2 q/ T3 x' Y" E4 L! F# ?$ A
           The staff must be able to:  / [( O- w  E5 v( G6 E

( D& X) B' f4 e+ v% w           *    Log on to the ‘system’ using their user name and a Personal Identification  
, J! p0 f/ P# s7 q4 o8 B                Number (PIN), which a four digit number **.   % }% e+ W% j- L! a: i% Y& m$ W0 N
/ B4 c1 W' U3 x1 X! b4 P  O2 A
                   *    The user should not be able to use the ‘system’ until they have provided the  , G1 g2 T  D' ^
                        correct user name and PIN combination. You should give them a second or    @% D  L# p8 m$ t; [
                        third chance to get it right before shutting the ‘system’ down.   
5 ^0 H( x+ M" z, S8 H& V9 W+ K6 |3 ~- H7 L
  # J9 N- }& j( N7 A! G4 J) _
                  
3 l, Y% w' l7 K! c" l                ** You must use the user names and passwords provided in your individual  . x. x' B8 ?. n8 B% G6 g" N
& z' M& f, ]; _( [& P- L. F
                data available from the Assignment 2 page on Vista (see requirement 5 below).  5 U! }! R  N  W; e, Q
                The user names and passwords should be included in your code, and the output  . p5 r! Q9 @7 d# |" c) m5 A
                to the screen should prompt the user with the user names and passwords (for  
$ x2 S1 `8 L  t# k3 l" `6 i' T) Q" G
                marking purposes).  8 |9 i3 l3 H# M, X; F
; o) L; g. E, ^5 h
                  + x! C( d* P) M: L6 J' z# A8 z
             8 t  j# J7 x  y4 g
*    The interface should provide a menu so that the staff can:  
7 z5 B- K( a" i# h5 V5 W& _
+ D7 {* y3 l: `% D                -    Perform a Repayment calculation  , K' Z$ f6 X3 x% H" P8 K

5 C' E( Z4 [. f) u) }9 d                -    Print out to the screen the Repayment details  
0 H" `. _8 `# x( l7 V1 d9 D
8 _: I, _. P* Q) p8 c                -     Change one, two, or all of the values for the current calculation  
: y1 N5 t8 j" b. H! O2 q9 V/ Y+ |. Z; I- [  Y; H6 J
                -     Start a new calculation   
( w' ]  t1 d7 @+ n4 T" }* E, ~( |  r
                -    Leave the program.  9 m' p& [8 n. ]: g5 B
The RepayCalc class: (Total maximum 10 marks available)  
$ o. T9 W/ a# p& n
. M# N/ c; A3 D     2.    Provide a method to accept three input values from the user:   
+ B8 G" \" ~- w$ `# O, K( w1 @+ h$ w. H" x
                -     the Amount to be Borrowed (to 2 decimal places, for example, 10550.00)  & k+ w3 u$ l6 o: V- p$ A5 U

: r; ?9 Q% O- `* w6 }! K$ ^3 E3 U; g                -     the Annual Interest Rate (to 2 decimal places, for example, 9.75)  & |/ {+ X+ H+ L$ |
* h9 ^% L7 I7 q8 v6 L7 d
                -     the Period of Repayment (in whole Years, that is, no fractions of a year)  
; k6 b/ Q$ r2 j, D& [+ O% g9 N( O7 J3 H: t; z
      3.   Provide a method to print out to the screen the three input values (accepted in  . L2 s; ~6 K* c+ u3 s
           requirement 2), plus the repayment calculations:  
- I) D- N8 _2 Q2 k+ B
$ C: W$ x. @2 e+ @. a" N1 E                -     the Weekly repayments  9 o5 y* c* m0 V& U* x2 ]8 n
0 f( n* P% v( Q- F/ p8 t6 j
                -     the Total repayment amount (Amount borrowed + Interest)  
  Q- a# c  i& g% Q% l( W# ]
% j- C. h; L% Z, G6 v  ! w! o+ a( v+ x
3 k8 q* `3 W( [: a
The Borrow class: (Total maximum 40 marks available)   - _, m; @3 q( P. T) h$ i3 W% ~* g4 z

' ]. G. U1 {- b! l2 ]; K     4.    Provide methods to perform the following tasks:  : s. i  {: N! u) k

  r0 R2 ~6 v, i- O& p6 L                -     to calculate the weekly repayments ***  $ P' n! Y" ^) t5 q" x2 ~

3 N3 @" k2 J  R6 f                -     to calculate the total repayment amount  : [! S$ b$ v( t8 X
1 |. `, ?& |. D, k
                -     to return the amount borrowed  + _4 S# v' A1 V1 R  M9 V! D  x1 o
: R9 H4 ~1 X3 w4 {
                -     to return the borrowing period in years  2 W) g: }2 t" A
+ X! R2 q4 L4 _# O* ~+ C% D( Z
                -     to return the borrowing period in weeks  
2 I2 G3 a' f0 O/ C. I2 C3 q1 U1 @+ E
                -     to return the annual interest rate  7 M; E( e0 |4 W
9 f( M8 F" n$ l6 u0 t, l
                -     to return the weekly repayments  
0 Y) B4 u* {( Q* u3 ^$ x7 B
9 z4 Y0 D4 T* {- |                -     to return the total repayment amount   / [% g5 p- H0 O0 S/ m0 ^

* Z9 L+ d/ S( J' c$ L- b) T- W8 x) D                -     to reset the loan amount  
0 g4 Q$ T# C- R/ o! K
3 M9 H7 m( s: `# l                -     to reset the annual interest rate  
/ |6 o2 A% z) i6 K7 l( m/ ?' E8 P
                -     to reset the loan period (in years)   
2 v* Y) c+ Q( V% f  H! R) r# n* w
       ( @& Q) d. E' a9 v% [8 k$ d
/ T; ^* K9 b4 r
               & |6 T* b/ ]2 J( g: c; D- g% v
       7 U; c& z: P. }+ V* a& t8 `$ A
              *** Use a simple interest calculation (not compound) formula, for example:   6 C! q7 v( C' K
      
8 x8 X4 X  {0 C: L7 _1 E             weeklyRepayment = (borrowedAmount * 1 + (annualInterestRate *  2 H' w+ w! I! A6 B1 F8 ^
             numberOfYears )) / numberOfPayments;  4 e2 d9 O/ B% @$ Q

9 k* g3 L, Y" X( J2 p+ [         
& U# n! u3 n5 n2 d4 b9 P4 P/ f0 m! ~' j# l
       5 h; ]' e6 @7 u7 K; R  U
1 [; Q1 x. C" I3 c( G$ u$ D+ D. e
Individual Data (Maximum 10 marks available)  & N4 B# l5 S8 {3 M1 i# \0 [! y
* ]. _: }/ w5 y+ E0 y9 {; G) P
      5.   You will be given two Megalodon staff member user names and passwords, plus a set  ( P* f3 Y* Q8 H9 w! R2 q3 E- W* }
           of data for each staff member to use to calculate repayment details. You will need to  6 Z( a) F- ]$ k
           log onto the BSA104 Assignment 2 page on Vista to generate your individual data  
8 `% |# k9 m5 }4 f9 e% K           and instructions for this requirement. You will need to use your University of  # E/ x0 g0 |: U, S8 U$ N
           Tasmania (UTas) student number.  
* \8 a0 |& c7 c. ^: T9 m- L             & l) Q- z9 J: N! _. [

1 ^1 T7 N5 s4 w; p4 O3 w9 M6 O/ \                                                        Page 2 of 5  
: M# x# m6 ?, e3 P# C) ]4 p- ]1 v/ x
For requirement 5 use the following data:
, j+ l2 G2 v) _7 w  P; r2 H
8 t5 Y, B- Z, s4 V: O% x, y# Data Set 1:
. L$ j3 ~$ M6 K7 d/ q
! g' ~% Q4 B* }# r6 p# W) `0 ^% RUser name: JordanM% Z1 f8 y$ v4 d5 R
Password:  Ferrari, _( e3 J0 T' h
Borrowed: $ 749.959 O: v2 L& p4 G% x( o- v$ b9 h
Interest:    15.0 %% G. H3 X0 y' w' w/ M
Years:      42 k5 d5 Q: `; j4 z7 O

4 l3 H' K7 H' ]4 k* Y7 {, i$ f* [# Data Set 2:
! H0 n. F3 ^( m$ z4 G
/ [1 Y# ?) H' r$ V# GUser name: KimZ
. }2 i/ u7 J5 A5 f% cPassword:  DimSim) l! y% x) j8 F; E0 u
Borrowed: $ 150500.25) b  }7 F/ }0 T( s5 _7 y4 u8 F& F) t
Interest:    5.5 %
0 _$ U( m8 q  u( w: TYears:      7
. i  P7 }8 i! I$ u. g( _$ q
: ]+ u$ n2 S7 B* o& u2 x' n% B[ 本帖最后由 wwwsnailcom 于 2006-5-24 02:15 AM 编辑 ]
 楼主| 发表于 2006-5-24 10:52:42 | 显示全部楼层
怎么也没有里我啊,高手来呀
回复

使用道具 举报

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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-1-9 15:12 , Processed in 0.085139 second(s), 5 queries , Redis On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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