Question: WRITE CODE IN C++ Consider the class called student which models the following states and behaviors of a student: - States: Name, Roll Number, Marks,

WRITE CODE IN C++ Consider the class called student which models theWRITE CODE IN C++

Consider the class called student which models the following states and behaviors of a student: - States: Name, Roll Number, Marks, Grade - Behaviors: 1. Read_data() 2. Display grade () 3. Compute_grade () - Perform the following operations: Create an object of student type and reads its data. Write the object onto a file (say "student.dat"). Read the object from the file. Display the data onto the screen. Hint: ofstream Myfile; Myfile . open ("student.dat", ios::app); Myfile.write((char*)this, sizeof(* this)); Myfile.close()

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!