Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Programming Language Expert

Object Oriented Design and programming Assignment

The scenario for this semester's assignments is part of a banking system: managing pre-paid credit cards which can be used in both Australia and overseas. These cards can be standard single currency cards (AUD) or multi-currency cards. For example before going overseas a customer can get a multi-currency card that they load with the currencies of the countries they will be traveling to, to avoid the risk of a sudden drop in the value of the Australian dollar while they are travelling. The rules used in this assignment for a MultiCard are a simplified version of real prepaid multi-currency cards.

This subject has two assignments. This is the first one. Both use this scenario. The focus of this assignment is defining and testing the basic classes that will be needed. The focus of the second assignment is creating a GUI that supports user interaction, storage and analytics, that is, supports offline storage in text files and supporting analytics over card transaction data.

Each assignment has two levels: advanced (max mark is 7 out of 7) or standard (max mark is 5 out of 7). An advanced assignment must be ready to be marked in week 4 (assignment 1) and 9 (assignment 2) labs. While a standard assignment can be marked in week 4 or 5 (assignment 1) and week 9 or 10 (assignment 2) labs.

Advanced level assignments have additional requirements beyond the standard version.

The Key Classes: Card and Purchase

There are two kinds of cards: BasicCard and MultiCard. There is one kind of Purchase. A BasicCard maintains a balance of Australian dollars only. A MultiCard can maintain up to 5 currency balances of which one must be Australian dollars (AUD).

Each Card has:

- ID
- name
- list of purchases

BasicCard

- balance (AUD)

MultiCard

- supports up to 5 balances in various currencies (one of which is AUD)

Each Purchase has:

- date (stored as a yyyymmdd string)
- location (country)
- currency
- amount
- description

All cards are loaded with AUD. A multiCard support conversion of the AUD balance (or part thereof) into another currency. All card have a total value (in AUD). For a basic card this is just the balance. For a multiCard this is the sum of the AUD value of each contained currency. All cards support making a purchase in AUD (if there is a sufficient balance) for which there is no fee. MultiCards support making a purchase in other currencies only if there is a sufficient balance for that currency. Basic cards also support making foreign currency purchases, however the currency conversion is done at the time of the purchase (and deducted from the AUD balance). When a purchase is made in a foreign currency, there is a 3.5% fee for basic cards, and 1.0% fee for multi-cards. Again, note that a multi-card purchase will only succeed if there is sufficient foreign currency already in the card.

Code outline

The following provides an outline of the main method, which includes the test code you will need to write.

public class Assignment1

{

static List cards = new ArrayList();

public static void main (String[] args)

{

// Create some cards (basic and multi)

// Load the cards

// Check the total value for all the cards

// Convert some currency for some of the multi-cards

// Check the total value of the cards (should be the same)

// Make purchases in various currencies

// Check the total value of the cards

// Report the total balance for each currency across all cards

// Report the total spent in each country across all cards

// Report a transaction history for a selected customer that

// includes each transaction and their final balance.

// Report a card listing that shows for each card, the number

// of active currencies and the overall value for that card.

}
}

In assignment-1:standard there is no user interaction just batch testing as shown above. The purpose of assignment 1 is to get the various class working. In assignment 2 an actual GUI will be added.

A significant design issue will be how to support the currency conversions. There needs to be a list of currencies such as: AUD, NZD, USD, CND, YEN, etc and their conversion rate (from AUD), for example: AUD -> AUD: 1.0, AUD -> NZD: 1.15, AUD -> USD: 0.75 etc. In this assignment do NOT use a HashMap or similar, just use lists/arrays. You will be required to use a HashMap for this in assignment 2.

Standard Level

Assignment deliverables:

1. Define the purchase class

2. Define the card classes: Card, BasicCard and MultiCard including all needed methods

3. Define the data structures needed to support currency rates

4. Complete the program outline test code.

Your solution will use the netbeans IDE. It will be console based. Your solution will make appropriate use of inheritance.

Advanced Level

The advanced level includes all the requirements of the standard level plus the following feature:

5. Support console based user interaction for each operation: create a card, load a card with AU, convert a card currency, show a card's value, show a card's currency balances (and its total AUD value), show a card's purchases, show the total value of all cards, show the total amount of each currency in all cards, show the total amount spend in each country for a single card, show the total amount spend in each country for all cards.

Programming Language, Programming

  • Category:- Programming Language
  • Reference No.:- M92811566

Have any Question?


Related Questions in Programming Language

Task working with arraysoverviewin this task you will

Task: Working with Arrays Overview In this task you will create a simple program which will create and work with an array of strings. This array will then be populated with values, printed out to the console, and then, w ...

Assignment - horse race meetingthe assignment will assess

Assignment - Horse Race Meeting The Assignment will assess competencies for ICTPRG524 Develop high level object-oriented class specifications. Summary The assignment is to design the classes that are necessary for the ad ...

Assignment task -q1 a the fibonacci numbers are the numbers

Assignment Task - Q1. (a) The Fibonacci numbers are the numbers in the following integer sequence, called the Fibonacci sequence, and are characterised by the fact that every number after the first two is the sum of the ...

Question - create a microsoft word macro using vba visual

Question - Create a Microsoft Word macro using VBA (Visual Basic for Applications). Name the macro "highlight." The macro should highlight every third line of text in a document. (Imagine creating highlighting that will ...

Extend the adworks applicationi add dialogs to allow the

Extend the AdWorks application I. Add Dialogs to allow the user to Add, Edit, Read and Delete a Customer and refresh the view accordingly. 1. The user should be able to select a specific customer from the DataGrid and cl ...

Assignment - horse race meetingthe assignment will assess

Assignment - Horse Race Meeting The Assignment will assess competencies for ICTPRG524 Develop high level object-oriented class specifications. Summary The assignment is to design the classes that are necessary for the ad ...

Task silly name testeroverviewcontrol flow allows us to

Task: Silly Name Tester Overview Control flow allows us to alter the order in which our programs execute. Building on our knowledge of variables, we can now use control flow to create programs that perform more than just ...

Structs and enumsoverviewin this task you will create a

Structs and Enums Overview In this task you will create a knight database to help Camelot keep track of all of their knights. Instructions Lets get started. 1. What the topic 5 videos, these will guide you through buildi ...

Assignmentquestion onegiving the following code snippet

Assignment Question One Giving the following code snippet. What kind of errors you will get and how can you correct it. A. public class HelloJava { public static void main(String args[]) { int x=10; int y=2; System.out.p ...

1 write a function named check that has three parameters

1. Write a function named check () that has three parameters. The first parameter should accept an integer number, andthe second and third parameters should accept a double-precision number. The function body should just ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As