0% found this document useful (0 votes)
23 views

Assignment 06

The document provides instructions for 6 programming assignments involving working with files. The assignments involve creating files to store product, patient, and student data, and developing classes to get and display data from files.

Uploaded by

Ram Bhardwaj
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views

Assignment 06

The document provides instructions for 6 programming assignments involving working with files. The assignments involve creating files to store product, patient, and student data, and developing classes to get and display data from files.

Uploaded by

Ram Bhardwaj
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

ASSIGNMENT VI

(Working with File)

1. Write a program to create a file “Product.txt” and write data as Product


Name, Product Price and Batch Number in a file.

2. Write a program to append Product Type and Product Weight in a file “Product.txt”.

3. Write a program to create a file “Patient.txt” and enter Patient ID, Patient Name,
Disease Name and City in a file. Now read patient details and display all the details
on a terminal.

4. Write a program to append Doctor Name and Doctor Speciality in “Patient.txt” file
and display the data on a console.

5. Create a class “Mobile” with attributes: brand, price, color. Use getData() values of
these attributes and store object in file. Write function displayData() to display object
from file.

6. Create a class “Student” having following data members:


studid,name,marks (of N subject), percentage. Create private function to calculate
percentage. Use getData() functions get data from keyboard and store data to the file.
Write function displayData() to display object from file.

You might also like