Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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 points 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.8., 20189876 AhmadSalem-OOP-Assignment2.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

Creating A Database In Filemaker Pro Visual QuickProject Guide

Authors: Steven A. Schwartz

1st Edition

0321321219, 978-0321321213

More Books

Students also viewed these Databases questions

Question

What was the positive value of Max Weber's model of "bureaucracy?"

Answered: 1 week ago