How much profit the account holder makes every year

Assignment Help Physics
Reference no: EM131776124

Question: Description: You are writing a program that manipulates bank accounts. Each account has a holder's name (string), holder's mobile (string), and balance (pointer to double). There are two types of accounts: checking account and saving account. A saving account is characterized by a "profit rate" data attribute that indicates how much profit the account holder makes every year. The checking account is characterized by the daily withdraw limit.

Using classes and a single tree, write a C/C++ program that manipulates accounts in a binary tree in such a way that all checking accounts are on the left side of the tree root and all saving accounts on the right side of the tree. The trees on each side are sorted so that the account on the left has a balance lower than its parent and the balance of the account on the right side has a balance higher than the balance of the parent. Please note that this does not apply to the main root of the tree because all checking accounts are on its left side and all saving accounts are on its right side whatever the balance is.Also, note that the root of the tree itself is NOT an account held by a customer, it is just a root/separator.

For the accounts classes, define the following:

- Default constructor that sets the balance to 0, the name to "Unknown name", and the mobile to "Unknown mobile".

- A constructor that takes three parameters of the same types as the above attributes and initializes the corresponding attributes.

- A convert/conversion constructor that takes a double and creates a new object with the balance set to this double and the other attributes set to "Unknown name" and "Unknown mobile".

- A convert/conversion operator that allows assigning a bank account to a double.

- A copy constructor.

- The assignment operator.

- The addition (+) operator (this operator applies to all attributes: name, mobile, and balance).

- Overload the input (>>) operator.

For the tree, please define the following:

- Add an account

- Remove an account

- Modify the balance of an account (withdraw and deposit)

- Print all accounts

- Print all saving accounts

- Print all checking accounts

Reference no: EM131776124

Questions Cloud

Design the program for a pneumatic system : Design the program for a pneumatic system for control by a PLC with the cylinder sequence Aþ, Bþ, B-, A- and an LED indicating.
Business situation that presents a legal and ethical issue : A description of a business situation that presents a legal and ethical issue. The description of the business situation must not exceed two pages
Understand an organization environment : The two segments of the organization's environment are general and specific. Why is it important to understand an organization's environment?
Descriptions of items that require adjusting entries : Descriptions of items that require adjusting entries, The company completed services for a client and immediately
How much profit the account holder makes every year : Description: You are writing a program that manipulates bank accounts. Each account has a holder's name (string), holder's mobile (string), and balance.
Compare and contrast the three different vendors : Compare and contrast the three different vendors. Be sure to consider the services, data solutions, and security features they provide.
Components of the search for competitive advantage : Why innovation and product development are crucial components of the search for competitive advantage?
Does the use of non-military organizations : Does the use of Non-Military Organizations/Agencies enhance or degrade the Nation's War on Terror?
Discuss ultrasound diagnostic equipment divisions : Operating results for the Surgical Instruments and Ultrasound Diagnostic Equipment Divisions

Reviews

Write a Review

Physics Questions & Answers

  Find the magnitude of the resulting magnetic field

A sphere of radius R is uniformly charged to a total charge of Q. It is made to spin about an axis that passes through its center with an angular speed ω. Find the magnitude of the resulting magnetic field at the center of the sphere.

  Find the equivalent resistance

A resistor is in the shape of a cube, with each side of resistance  R . Find the equivalent resistance between any two of its adjacent corners.

  What is the electric field at the location

Question: Field and force with three charges? What is the electric field at the location of Q1, due to  Q 2 ?

  What is the maximum displacement of the bridge deck

What is the maximum displacement of the bridge deck?

  What is the magnitude of the current in the wire

What is the magnitude of the current in the wire as a function of time?

  Blackbody

Questions on blackbody, Infra-Red Detectors & Optic Lens and Digital Image.

  Gravity conveyor

Illustrate the cause of the components accelerating from rest down the conveyor.

  Calculate the dc voltage

Calculate the dc voltage applied to the circuit.

  Quadrupole moments in the shell model

Quadrupole moments in the shell model

  Determine the tension in each string

Determine the tension in each string

  Introductory mechanics: dynamics

Calculate the smallest coefficient of static friction necessary for mass A to remain stationary.

  Evaluate maximum altitude

Evaluate maximum altitude?

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