Course Solutions Uncategorized (Solved) : May Use Following Function Read Data One Inventory Item Void Inventoryitem Read Ifstream I Q30110699 . . . .

(Solved) : May Use Following Function Read Data One Inventory Item Void Inventoryitem Read Ifstream I Q30110699 . . . .

 

You may use the following function toread data for one inventory item:

void InventoryItem::read(ifstream&inFile)

      {

             string line;

             getline(inFile, line, ‘,’);

             setDescription(line);

             int q; double p; char comma;

             inFile >> q;

             setQuantityOnHand(q);

             inFile >> comma;

             inFile >> p;

             setPrice(p);

             inFile.ignore(100, ‘n’);

}

Below is a UML class diagram of class InventoryItem:

InventoryItem

description: string

qantityOnHand: int

price: double

+ InventoryItem()

+ InventoryItem(string, int, double)

+ getDescription() const: string

+ getQuantityOnhand() const: int

+ getPrice() const : double

+ setDescription(string): void

+ setQuantityOnhand(int): void

+ setPrice(double): void

+ display() const: void

+ read(ifstream &): void

Task 1 Submission (50%):

1. Write a test program (i.e. function main() ) to read from thean input file any number

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

(Solved) : 2 Q32902639 . . . .(Solved) : 2 Q32902639 . . . .

<p>can anyone help me to solve this by matlab</p><p><img alt="2" src="https://media.cheggcdn.com/media%2Feb2%2Feb289c84-561f-4582-9eea-78eb365d662f%2Fphpl4qyAq.png" style="height:276px;width:960px;" aria-describedby="d3f"/><img alt="" src="https://media.cheggcdn.com/media%2F2a8%2F2a8b6d49-3c93-4d3e-8bbb-8c686e025d32%2Fphp8iLvVs.png"/></p>2 Show transcribed image text Expert Answer Answer to 2...