Home /
Expert Answers /
Computer Science /
write-code-in-c-consider-the-class-called-student-which-models-the-following-states-and-behaviors-pa975
(Solved): WRITE CODE IN C++
Consider the class called student which models the following states and behaviors ...
WRITE 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();