06-24-2013, 10:38 PM
CS201 Introduction to Programming Assignment No. 3 Solution Spring Semester June 2013
Problem Statement:
Write the C++ program having class name studentinfo, that is used to store the VU student information: This class should store your VUID, campus id, name and father name in the following character type data members:
Data members:
VUID
campusID
Studentname
Fathername
Studentinfo class should have the parameterized constructor that is used to initialize the data members of the studentinfo class,
Studentinfo class should have following member functions.
Storefile()
Display()
Storefile() member function should store the value of all data members in the text file named “record.txt”, on separate lines in the text file as follows:
ms120400400
Vlhr02
Muhammad Hussain
Muhammad Ali.
Display() member function reads your VUID, campusID, name and father name from the file named “record.txt”, stores them in the respective data members and displays the record.
Hint:
In main() function, create the object of the class by using parameterized constructor and then call the storefile() member function to store the record of all the data members in the text file. Finally call the display() function to read the data from text file and store it in the respective data members and display all the records.
0300-9520262
Get solution in 24 hour |cpmputer & internet
mileys81:[SIZE="4"][SIZE="3"]....[/SIZE][/SIZE]
