Answered step by step
Verified Expert Solution
Question
1 Approved Answer
CPAN 2 1 1 Lab 3 GoalsUnderstand I / O using Streams and FilesDescriptionA college keeps records of all professors and students in a file
CPAN Lab GoalsUnderstand IO using Streams and FilesDescriptionA college keeps records of all professors and students in a file named peopletxt Eachline starts with a title ProfessorStudent followed by first name, last name and adepartment for a professor or a degree for a student as follows:Professor Blaise Pascal PhysicsStudent Julia Roberts MastersCreate two classes: Professor and Student with applicable fields.Write a program that will read from file peopletxt scan every line, create thenecessary object either a student or a professor and add it to one of the two arraysstudents and professors.Once the arrays are ready print both to standard output Write them out to files Professortxt and Student.txt: Student array in thestudent file and Professor array in the Professor classDeliverablesShow your code in Class.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started