Sie sind auf Seite 1von 5

COIT29222

Programming Principles
Term 1 2012

Assignment 2

Submitted by
Student number: S0218205
Student Name: Qamar Bilal
Campus: Sydney

COIT29222
Programming Principles
Term 1 2012

S0218205
Qamar Bilal
Assignment 2

Assessment Task:
The assessment task required to develop a java application which holds bank accounts
in the form of an array. It tests the knowledge of how to manipulate the data in arrays
and how to transverse in arrays in order to accomplish the given task. Maximum
number of accounts in this application are eight (8) as this is the highest digit in my
student ID i.e. S0218205.
Assumptions:

This program was designed and developed using NetBeans IDE 7.1.1, so it is
assumed that it will be tested in a compatible environment.
The array was initialized with random numbers using maximum amount of
$2,000.
While one single deposit can not exceed the amount of 10,000, there is no
condition on maximum account balance, so maximum account balance can go
up to maximum value an integer variable can hold in java.
Since array will be created and initialized each time program is executed,
therefore in order to test every condition the exit from application confirms
from the user before exit. This is to ensure that user really wants to terminate
the application.
It was assumed that while sorting amounts in all accounts in ascending order
does not require the account number to be displayed, so only amounts in the
accounts were sorted and displayed in sort option.
IT is assumed that if a given amount is being searched, the index of thefirst
value found in the array which is equal to the user input amount will be
displayed only and rest of the amounts will be ignored.

Test Cases for data Validation:


Test Case 1:
If user inputs wrong choice which is any other number from between 1 to 8,
program will give an error message and user will be asked to enter a valid option
to select from the displayMenu.

Page 1 of 6

COIT29222
Programming Principles
Term 1 2012

S0218205
Qamar Bilal
Assignment 2

Test Case 2:
When user tried to deposit an amount of 12000 which is greater than 10000 the
system generated an error and asked the user to enter the valid amount of up to 10000
only.

Test Case 3:
When user tried to withdraw an amount, which was greater than the current account
balance, the system generated an error message and displayed the current balance,
allowing the user to enter the valid amount to withdraw from the account:
Page 2 of 6

COIT29222
Programming Principles
Term 1 2012

S0218205
Qamar Bilal
Assignment 2

UML Activity Diagram:

Page 3 of 6

COIT29222
Programming Principles
Term 1 2012

S0218205
Qamar Bilal
Assignment 2

END OF DOCUMENT

Page 4 of 6

Das könnte Ihnen auch gefallen