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

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

[复制链接]
发表于 2006-5-24 02:10:29 | 显示全部楼层 |阅读模式
汗,真是不知道怎么写,同学找了个哥哥,3个小时就搞定了,我编了3天,还有100多个错,可怕啊
0 Y3 m6 \7 M7 c有没有高手帮我哦,周5就要交了,我的邮箱是[email protected],谢谢啦
+ q/ G7 _- z' S# }Requirements:  
" R5 C0 A2 h( V; m6 I3 ?Consider the three Java Classes: Borrow, RepayCalc and RepayCalcMenu, available from the  ' h; N  p: |0 O+ a7 q$ `
Assignment 2 page on Vista.  
7 i' e& h) y0 q. j5 U  ; N3 t# l' {- p& ?( {' ]/ x+ F" c
You are required to perform the following tasks:  
$ S7 w5 l6 M& o5 D0 [7 |  u  ' [$ Y4 w, r% D7 \
The RepayCalcMenu class: (Total maximum 20 marks available)  
2 }  j+ }7 ^+ ~
% [+ S/ T/ F1 ~3 j8 A, F      1.   Provide a basic text-based interface to a Repayment Calculator for the Megalodon  
0 K  o4 H' E2 I% E4 ?3 A4 ?$ o  M' }7 K           Finance Company so that it can be used by the Megalodon staff members to  % F" L) ~3 {) F( I) i8 a
           determine repayment options for their clients.  
9 A: u4 t8 {6 v2 q5 |
: g5 K4 U( L  L) O. E           The staff must be able to:  
9 K: ~6 C9 D3 ]' L$ l% D( S* V9 D, x9 g# w) E
           *    Log on to the ‘system’ using their user name and a Personal Identification  % |- {, _, c/ I( Y
                Number (PIN), which a four digit number **.   
( I" F4 c" m, ?' b4 I
# U6 ~8 i9 A! x                   *    The user should not be able to use the ‘system’ until they have provided the  9 L) V6 I, g4 K2 l
                        correct user name and PIN combination. You should give them a second or  7 }+ @: L7 z. i5 x" U+ _) x
                        third chance to get it right before shutting the ‘system’ down.   ' R6 V0 O! A6 }/ z# u
; m8 V1 v* M* |! E) L
  ! E2 z. y" e/ Q0 @9 ~, |
                  1 Z, I* j1 o3 j+ i
                ** You must use the user names and passwords provided in your individual  " \( E' f2 q# ^. T, R9 b
$ T$ s. H3 Z, j0 ^
                data available from the Assignment 2 page on Vista (see requirement 5 below).  
. h* D. O# f7 _8 j/ G                The user names and passwords should be included in your code, and the output  
* O+ h8 Z% o( s6 v                to the screen should prompt the user with the user names and passwords (for  ( u/ N$ t6 o# V3 e7 a
% A5 e1 O( n" W& j  A/ @
                marking purposes).  5 c3 {$ p: Q5 J) D

/ \, M+ q) y' S) ~4 v2 L                  7 \, K: W) {  E7 p7 \8 P
             - N5 D1 C% ]' ?# E
*    The interface should provide a menu so that the staff can:  
. z! X5 {! t, Y' T" \$ X
/ \( F  f: [; J6 e7 j                -    Perform a Repayment calculation  
* a' e" m3 C' E0 B+ p6 D
, w  ^" e  r) H2 {                -    Print out to the screen the Repayment details  ; X* V' b) |5 V. u/ G8 K) @5 x
8 K4 X( k( c9 N5 T" [( k  k
                -     Change one, two, or all of the values for the current calculation  - [9 ?) o6 U; o) i5 w- ^

6 W4 i+ `1 c1 B! f* p                -     Start a new calculation   
6 C; F6 X" ]" n  F  U6 l7 u! a2 p
0 s* U7 o$ Q1 w                -    Leave the program.  & y% s* Y5 `; [1 y# u% ^
The RepayCalc class: (Total maximum 10 marks available)  
' ~- H/ u9 b% d7 t% L7 ]4 u3 r1 {! q. b( _. w) |( q
     2.    Provide a method to accept three input values from the user:   3 N, ]7 I. h% P/ A

% Y: a: O( r# g9 i+ f1 L                -     the Amount to be Borrowed (to 2 decimal places, for example, 10550.00)    P: \! a+ [" Y: Q7 N) u  `* H8 Z

: @! }( q7 b% y                -     the Annual Interest Rate (to 2 decimal places, for example, 9.75)  
3 \+ f0 a( X9 l. E- _' i
/ Q+ b) y5 B. r1 Q9 X7 A; G9 ?                -     the Period of Repayment (in whole Years, that is, no fractions of a year)  * j0 n2 A* Z  t! b  q3 }) _8 f7 q& x- l
( q7 B% F9 w! k1 _  P
      3.   Provide a method to print out to the screen the three input values (accepted in  - G  @1 C1 _9 v5 y+ H7 `
           requirement 2), plus the repayment calculations:  - }5 H. A& g7 Q, F8 x* y  l

' {9 n/ R8 A9 \8 m# {                -     the Weekly repayments  % [) n' x: ], ~5 M( y

6 Y1 _$ X0 C! W6 H) w2 g- \                -     the Total repayment amount (Amount borrowed + Interest)  
6 X' ^$ e4 L5 [5 G+ Z. L( i3 C( Z
  , e1 O' I. O# r

7 G4 m) D; f$ V$ b4 j- g6 wThe Borrow class: (Total maximum 40 marks available)   / A: }4 Z' |* c3 }5 a; ]

. ~: x2 b( K3 ^2 \     4.    Provide methods to perform the following tasks:  4 H) B" @  P4 S7 _7 q

& W# S% y1 ^) b                -     to calculate the weekly repayments ***  
# d9 g: l0 Z5 ^6 {8 L. m" J- V* j
2 W. m+ W$ T& a1 Q1 M                -     to calculate the total repayment amount  
: [# I/ D. p  u" f# `( [! z3 ]# M3 j, h' d
                -     to return the amount borrowed  
6 u  s: U% a- ?
+ \/ \6 }6 t5 |2 @                -     to return the borrowing period in years  ) G) @# e1 A4 L/ B' j  f2 C9 n5 d3 {
) e" m+ \+ f3 J. R# \+ E. _
                -     to return the borrowing period in weeks  
9 a2 ?' E4 d) ^  H8 F+ b+ X4 Q6 t1 T
                -     to return the annual interest rate  0 B- ^+ f6 r' v& {8 O4 R

' j4 s  F% T" L, P                -     to return the weekly repayments  
, Q' I3 s; ~! }2 p0 U4 a: j3 H3 o
& y) K1 Z4 D# G* W! {                -     to return the total repayment amount   9 s( ^% Y  W6 G" l' w( |; L) @

2 i; Y6 }4 d" p% }                -     to reset the loan amount  & M& k3 \4 c! `1 W! e

9 ~4 [/ D, Z) R2 t# K7 `                -     to reset the annual interest rate  * ^7 v8 f3 q: H: H. S& J8 X$ h

& Q6 G8 a# d" D$ j3 u5 I( r% g                -     to reset the loan period (in years)   / I; \, t8 c1 D' h9 n- c

( S0 |6 p7 N! H' \. b' j       - m! ?# i2 J& {

( ?; I8 |+ n, o+ z2 e' D4 {               
& `; A* z& Q5 h7 g- A' |6 p       ) G3 {- [2 K' W+ `0 X8 r3 [
              *** Use a simple interest calculation (not compound) formula, for example:   
* X( \! C2 d7 q+ H. O       4 n& h) s/ q9 l- u8 k6 T- \" J3 D& c
             weeklyRepayment = (borrowedAmount * 1 + (annualInterestRate *  
1 d- P3 B9 B& m: T             numberOfYears )) / numberOfPayments;  
& x7 _$ O. M) o/ o/ F. q7 i$ u# g8 D5 W2 ~: W5 D5 R
         
3 d! a3 h' E0 e2 O- O1 V) Z9 M
5 n9 T- |1 u$ q; H. a- d       ; E. S0 n4 N* r9 A3 A

2 A  n* f% v* p5 N+ eIndividual Data (Maximum 10 marks available)    E6 b4 ?6 t* R7 J5 |/ D1 f
( M, u9 c9 b- J& N4 y( u
      5.   You will be given two Megalodon staff member user names and passwords, plus a set  
/ e" {: i7 L4 s9 E' ^7 s           of data for each staff member to use to calculate repayment details. You will need to  / `9 A: S3 ^9 a
           log onto the BSA104 Assignment 2 page on Vista to generate your individual data  
8 N1 G9 b  o0 z6 K( Y           and instructions for this requirement. You will need to use your University of  
2 R/ |- p! J/ s( Z+ n           Tasmania (UTas) student number.  
" b  _3 I1 u7 R  q4 w8 q             * U6 }7 A. e/ q7 h! S
5 O2 M, w7 x8 q' y7 @3 e0 r
                                                        Page 2 of 5  
) R5 c6 C3 P$ [4 @  ~  \) D* K: h" J# o$ Z5 U& x
For requirement 5 use the following data:
2 e( z3 ^- ~( o7 ?) |" ?9 |$ O# g, Y! J1 L7 X* f) I
# Data Set 1:
" B  H% I3 I" ^: M1 Q
! J- y# k1 s4 f6 c# XUser name: JordanM' B/ H# X$ L3 J3 g
Password:  Ferrari3 M2 g8 r  {- ^- ~  f
Borrowed: $ 749.95# A- ^1 u  }0 Q; @7 n$ F
Interest:    15.0 %9 L0 C- t( D% E) s; S! H. N5 x
Years:      4
; j  m2 a0 ~8 ^; A* U: W; Q1 v  c; O: S5 t6 U) J
# Data Set 2:
; s' ]4 A8 n6 J# J7 H" D* b% w4 c" B5 ~$ I6 Y  t! G9 {
User name: KimZ
; M$ p) `2 M" f" UPassword:  DimSim
# N, p& w& I  w4 w0 TBorrowed: $ 150500.250 ]" W& N) R3 s* B# t7 j
Interest:    5.5 %& h3 k! h4 \. T- q9 B
Years:      7
8 Z+ V7 [, G% y- A, z- P. Z9 Q' r
: U; X7 ^4 ^+ ]; W( Z[ 本帖最后由 wwwsnailcom 于 2006-5-24 02:15 AM 编辑 ]
 楼主| 发表于 2006-5-24 10:52:42 | 显示全部楼层
怎么也没有里我啊,高手来呀
回复

使用道具 举报

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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-6-27 04:21 , Processed in 0.095430 second(s), 5 queries , Redis On.

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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