Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

its all one question c++ Given the following class definition: class Client { string name; string address; float Balance; public: Client(); void setvals(string name, int,

its all one question
c++
image text in transcribed
image text in transcribed
Given the following class definition: class Client { string name; string address; float Balance; public: Client(); void setvals(string name, int, string address); void showClient Info() const; int getPhoneNumber(); 3: a) Modify the class according to the following: 1. Add suitable non-global integer data members named NumSoFar and NumLive 2. The members above that keep track of clients created so far and active Clients respectively. 3. Whenever a creation or deletion of an object occurs, display both numbers to keep user up to date. 4. Write the code for the showclient Info function, 5. Create a function that compares me to another Client and returns True if my Balance is more, False otherwise 6. Create a friend function that compares two Clients and returns the one with the higher balance 7. Create a main program 7.1 Ask the user how many clients they wish to have create an array of clients as the user specified - make sure this is less than 5 7.2 Create an array of 5 balance amounts, an array of 5 names and an array of 5 addresses 7. Create a main program 7.1 Ask the user how many clients they wish to have, create an array of clients as the user specified - make sure this is less than 5 7.2 Create an array of 5 balance amounts, an array of 5 names and an array of 5 addresses 7.3 use the arrays in 7.2 to populate clients in 7.1 7.4 Print the original array of Clients - use NumSoFar and NumLive 7.5 Sort the array Client array according to Balance - use the function in point 5 above-also use NumSoFar and NumLive Notes Your code must be neat and with separate implementation and header files You must submit only 1 single.txt file with your name and id as comments in the file. Your file name should also include your name and id, e.g., 20189876 AhmadSalem-OOP-Asssignment2.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

Strategic Database Technology Management For The Year 2000

Authors: Alan Simon

1st Edition

155860264X, 978-1558602649

More Books

Students also viewed these Databases questions

Question

(2) Who knows about it in the company?

Answered: 1 week ago