Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Code needs to be visual studio C + + Question One: You are requested to develop part of an application that is going to be

Code needs to be visual studio C++
Question One:
You are requested to develop part of an application that is going to be used in a Bank. Specifically, you will need to implement the following:
Card: A bank card is identified by card number and card holder.
There are two types of bank-cards:
CreditCard is a card with balance, limit, institution that provides the card(CIBC, RBC, TD, etc.), and expiry date. These are the following required methods that you are requested to implement:
purchase(float amount) : This method is used when the owner purchases a product. Once called, the balance of this card is increased by amount. However, if there is not enough credit available, the transaction is failed (when available credit is not enough to purchase a product). Notice that there is a limit for the card and the owner cannot exceed the limit.
RewardCard is a credit card with reward-points. So, the customer collects one point for every dollar that is spent. Keep in mind that you will need to re-implement the purchase() method to obtain points.
Customer is identified by name, date of birth and address. Each customer has a collection of cards. A customer can purchase a product with either of cards (if there is enough credit available). Implement the payWithCard(Card c) method that is used by the customer to pay.
Test: Test your code by creating a vector that contains one creditcard and one rewardcard in it.
Note:
You are free to add any other feature(s) that you think is/are required for this application.
You need to create three cards (card, creditcard and rewardcard)
Question Two:
You are given a set of integers and you are requested to find all the possible subsets of this set of integers. The output of your program needs to be printed out into an output file named output.txt.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Mining Concepts And Techniques

Authors: Jiawei Han, Micheline Kamber, Jian Pei

3rd Edition

0123814790, 9780123814791

More Books

Students also viewed these Databases questions