Question: use c++ programming 7. Consider the class Motherboard below. class Motherboard 1 friend ostream& operator>(istream& in, Motherboards m); private: string mbBrand, epuBrand; double price: int

use c++ programming

use c++ programming 7. Consider the class Motherboard below. class Motherboard 1

7. Consider the class Motherboard below. class Motherboard 1 friend ostream& operator>(istream& in, Motherboards m); private: string mbBrand, epuBrand; double price: int nooCPUCore, lengthInCM, breadthInCM; public: Motherboard () - default; Implement the extraction operator function, such that when the following lines are executed: Motherboard mb; cin >> mb: the extraction operator function will prompt user to enter the Motherboard's brand, cpu's brand, price, no. of cpu core, length and breadth (in cm), to initialize its own (Motherboard) attribute's mb Brand, cpuBrand, price, nooCPUCore, lengthInCM, and breadthInCM respectively. Note that data stored in mbBrand, or cpuBrand could consist of more than 1 word. The entire Motherboard object should be thrown (as an exception object), if any of the following condition(s) is/are true any string variables like Motherboard's brand / CPU's brand (entered by user) is an empty string the Motherboard's price (entered by user) is less than $100.00, or exceeds $500.50 the Motherboard's length in cm (entered by user) is less than 25, or exceeds 100 the Motherboard's breadth in cm (entered by user) is less than 15, or exceeds 100 the Motherboard's no. of CPU core (entered by user) is less than 2, or exceeds 32

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!