Define the data structures needed to support currency rates

Assignment Help Programming Languages
Reference no: EM131973913

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<Card> cards = new ArrayList<Card>();

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.

Reference no: EM131973913

Questions Cloud

How the sarbanes-oxley act has affected auditing : Assess how the Sarbanes-Oxley Act has affected auditing. Evaluate objectives for conducting audits, and compare management's and auditors' responsibilities.
Satellite-based navigation application : How would the principles and processes of object-oriented analysis and design apply to the Satellite-Based Navigation application using any format?
What do you think are the major advantages of 10miles : (1) What do you think are the major advantages of 10Miles? (2) What do you think are the major weaknesses of 10Miles?
What it the shape of the given contour : By answering the following questions, integrate the function shown below along the given contour. What it the shape of the given contour
Define the data structures needed to support currency rates : Define the card classes: Card, BasicCard and MultiCard including all needed methods. Define the data structures needed to support currency rates.
Define common and federal securities laws : Analyze the audit report that the CPA firm issued. Ascertain the legal liability to third parties who relied on financial statements under both common.
What is a three-tier framework : (1) What is a three-tier framework? In other words, what tiers are included in this framework? What are the functions of each tier?
Analytical report providing supporting calculation : FIN5FMA - Financial Management Assignment - determination of the costs of the various sources of costly or interest-bearing financing employed by the firm
Web server using the expression : This requires setting the path to the root folder of the Web server using the following expression: ____.

Reviews

Write a Review

Programming Languages Questions & Answers

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd