Answer to Question #313785 in C++ for Ahmad

Question #313785

Pak-Wheel requested for a software and asked for the following functionalities.

o Client name, contact, email and transection (only one) are important to keep.

o Client can buy or sell car through pinwheels. The transection details which are

important to keep are date (day), transection type (Buy or Sell) and amount.

Implement the above demand in such a way what if the client is deleted, none of its transection

record will remain. (Use Composition)

4. Later they requested another functionality to be incorporated within the program:

o The car should have its owner detail (client) but if the car is gone or sold, the client

should remain. (Use Aggregation)


1
Expert's answer
2022-03-18T07:50:14-0400

Here is program:

class Client
{
public:
	Client(string clientname,string contact, string email, string transection ,string date)
	{


	}
	void Transection(bool summ)
	{
		cin >> summ;
		if (summ == true)
		{
			cout << "Buy" << endl;
		}
		else
		{
			cout << "Sell" << endl;
		}
	}
private:
	string clientname, contact, email, transection;
	string date;
};

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog