Mr.John, sales manager. He wants to store the list of items that were ordered by customers and he felt to store those details in a particular file which is more useful for their selling process. Write a C++ program to get the array of Item details from the user and to write the same details in a text file. Use File handling mechanisms to handle this problem. Strictly adhere to the Object-Oriented specifications given in the problem statement. All class names, member variable names, and function names should be the same as specified in the problem statement. File names used should be the same as mentioned in the problem description. Consider the class named Item with the following private member variables Data Type string string string Include appropriate constructors, getters, and setters for the Item class Variables itemld name description Include the following member function in the Item class Method Name void writeltemDetails(ofstream &file,list item) Description This method is used to write the item details in a fi In the main method, read the Item details from the user and write the same details in a file named "WriteltemDetails.txt". Create the object for the file for opening and closing the file in the main method itself. Input and output format: Refer sample Input and Output for formatting specifications. Sample Input and Output : [All text in bold corresponds to input and rest corresponds to output] Enter number of items 2 Itemld: IE001 Name: Fan Description: Electronics Itemld : IFO06 Name: Chair Description: Furniture Items are added to a file successfully Output file: (WriteltemDetails.txt) Item details(Id,name,type) are to be in CSV format. O writeltemDetails.txt x IE001,Fan,Electronics IF006,Chair,Furniture

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

question provided in attachment please read carefully make solution according to question only.

 

------strictly use below templates while making solution------

Item.cpp

#include <iostream>
#include <fstream>
#include <string>
#include <list>
using namespace std;
class Item
{
//Fill your code

};

 

Main.cpp

#include <iostream>
#include <fstream>
#include <string>
#include "Item.cpp"
using namespace std;
int main()
{
//Fill your code here
return 0;
}
Mr.John, sales manager. He wants to store the list of items that were ordered by customers and he felt
to store those details in a particular file which is more useful for their selling process.
Write a C++ program to get the array of Item details from the user and to write the same details in a
text file. Use File handling mechanisms to handle this problem.
Strictly adhere to the Object-Oriented specifications given in the problem statement. All class
names, member variable names, and function names should be the same as specified in the problem
statement. File names used should be the same as mentioned in the problem description.
Consider the class named Item with the following private member variables
Data Type
string
string
string
Variables
itemld
name
description
Include appropriate constructors, getters, and setters for the Item class
Include the following member function in the Item class
Method Name
void writeltemDetails(ofstream &file,list<Item> item)
Description
This method is used to write the item details in a file.
In the main method, read the Item details from the user and write the same details in a file named
"WriteltemDetails.txt". Create the object for the file for opening and closing the file in the main
method itself.
Input and output format:
Refer sample Input and Output for formatting specifications.
Sample Input and Output :
[All text in bold corresponds to input and rest corresponds to output]
Enter number of items
2
Itemld :
IE001
Name :
Fan
Description:
Electronics
Itemld:
IFO06
Name:
Chair
Description:
Furniture
Items are added to a file successfully
Output file: (WriteltemDetails.txt)
Item details(ld,name,type) are to be in CSV format.
A Writeltem Details.txt x
IE001, Fan, Electronics
IF006,Chair, Furniture
Transcribed Image Text:Mr.John, sales manager. He wants to store the list of items that were ordered by customers and he felt to store those details in a particular file which is more useful for their selling process. Write a C++ program to get the array of Item details from the user and to write the same details in a text file. Use File handling mechanisms to handle this problem. Strictly adhere to the Object-Oriented specifications given in the problem statement. All class names, member variable names, and function names should be the same as specified in the problem statement. File names used should be the same as mentioned in the problem description. Consider the class named Item with the following private member variables Data Type string string string Variables itemld name description Include appropriate constructors, getters, and setters for the Item class Include the following member function in the Item class Method Name void writeltemDetails(ofstream &file,list<Item> item) Description This method is used to write the item details in a file. In the main method, read the Item details from the user and write the same details in a file named "WriteltemDetails.txt". Create the object for the file for opening and closing the file in the main method itself. Input and output format: Refer sample Input and Output for formatting specifications. Sample Input and Output : [All text in bold corresponds to input and rest corresponds to output] Enter number of items 2 Itemld : IE001 Name : Fan Description: Electronics Itemld: IFO06 Name: Chair Description: Furniture Items are added to a file successfully Output file: (WriteltemDetails.txt) Item details(ld,name,type) are to be in CSV format. A Writeltem Details.txt x IE001, Fan, Electronics IF006,Chair, Furniture
Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY