Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ FILE: student.dat John Doe 123456789 A Bob Smith 598765432 B Bill Jones 898745792 C George Roberts 128920740 D Objectives: Template and Dynamic Objects This

C++ image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

FILE:

student.dat

John Doe 123456789 A

Bob Smith 598765432 B

Bill Jones 898745792 C

George Roberts 128920740 D

Objectives: Template and Dynamic Objects This project is a continuation from Project 2. The program should accept the same input data file and support the same list and find operations. You will implement a Queue template to store all the Student objects. A queue is a dynamic data structure, that maintains the first-in-first-out policy. You will use this Queue to manage all the Student objects. The student.h header file declared below is the same as in Project 2. The course.h header file needs to be modified to use the Queue template and Student. You should create Queue.h and Node.h for your queue template definition and implementation. Your student.cpp should be the same as Project 2, expect if you need to make corrections. You need to update your course.epp to work with the Queue data structure. Develop a program, name proj03.cpp, to use the Course object to read from the input student record file and create a list of student objects. This program can perform 2 functions List: to list all the student records read from the input file Find: to lookup a specific student record by the input student id. Student ID read from command line is character string. It needs to be converted to an integer before calling the find function. Use the ato () function in header for the conversion. Your program will read all input from the command line, no prompting for user input and hardcoding for input file name. The required program output is provided below Declaration of Student class: // file student.h #ifndef STUDENT H define STUDENT H #include using namespace std; class Student *param is the input stream eparam course the student object reference *return the input stream friend istreama operator >(istreams is, Student& student); * @param os the output stre param course the student object reference *return the output stream friend ostreama operator header for the conversion. Your program will read all input from the command line, no prompting for user input and hardcoding for input file name. The required program output is provided below Declaration of Student class: // file student.h #ifndef STUDENT H define STUDENT H #include using namespace std; class Student *param is the input stream eparam course the student object reference *return the input stream friend istreama operator >(istreams is, Student& student); * @param os the output stre param course the student object reference *return the output stream friend ostreama operator

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases DeMYSTiFieD

Authors: Andy Oppel

2nd Edition

0071747990, 978-0071747998

More Books

Students also viewed these Databases questions

Question

What is allocation?

Answered: 1 week ago

Question

Select the correct answer. Simplify. \sqrt(72)

Answered: 1 week ago

Question

Define Administration and Management

Answered: 1 week ago

Question

Define organisational structure

Answered: 1 week ago

Question

Define line and staff authority

Answered: 1 week ago

Question

Define the process of communication

Answered: 1 week ago

Question

Explain the importance of effective communication

Answered: 1 week ago