Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Hello Chegg team, i really need help on this one, below is the qustion. Thank you Design pseudocode to define how the program opens the
Hello Chegg team, i really need help on this one, below is the qustion. Thank you
Design pseudocode to define how the program opens the file, reads the data from the file, parses each line, and checks for file format errors. The Course Information document linked in the Supporting Materials section contains all the information about how the courses required in the Computer Science curriculum for ABCU will be stored in the data file. Each line will consist of information about a single course including the course number, title, and prerequisites. The Course Information document includes the course data and a diagram of how the program will execute.
Your pseudocode must validate the sample file to make certain it is formatted correctly and check for the following items:
There are at least two parameters on each line. Some courses may not have any prerequisites.
Any prerequisite that is provided on a line exists as a course in the file. In other words, any prerequisite at the end of a line must have another line in the file that starts with that course number.
Design pseudocode to show how to create course objects and store them in the appropriate data structure. Your pseudocode should show how to create course objects so that one course object holds data from a single line from the input file. Knowing the file format will help you parse and store each token of data in the appropriate course object instance variable. You should store each course object in the vector data structure. Once the entire file has been processed, the vector data structure will have multiple course objects, one per line in the file. Hint: You will need a loop to process all lines from the file and a struct to hold all the data from a single course.
Design pseudocode that will search the data structure for a specific course and print out course information and prerequisites. The advisors from ABCU want to be able to print out the course information and prerequisites from the data stored in the data structure for a given course. Pseudocode for printing course information using a vector data structure is provided as an example in the Pseudocode Document linked in the Supporting Materials section.
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