Reference no: EM133486500
Homework: Designing a Pseudocode to Define how to Open Files Project
Overview
This milestone will help prepare you for Project One.
In this homework, you will start working on a project for ABC University (ABCU). ABCU is looking for software that will help their computer science advisors access course information for students. To do this, you will utilize what you have learned about data structures. In this homework, you will create pseudocode for the Computer Science department at ABCU. This code will demonstrate your ability to import data from a file and store it in the vector data structure.
Prompt
Create pseudocode for loading data into the vector data structure, and then using it to store and print that data. There will be no programming work in this milestone; you will be developing pseudocode that will help you implement your design in Project One.
For this milestone, you will:
Question I. 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 all of the courses required in the Computer Science curriculum for ABCU. Each line will consist of the 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 will need to validate the sample file to ensure it is formatted correctly and check for the following:
1) Ensure there are at least two parameters on each line (some courses may not have any prerequisites).
2) Ensure 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 courseNumber.
Question II. 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 into the appropriate course object instance variable. You should store each course object into 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: A loop will be needed to process all lines from the file.
Question III. 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. In the Pseudocode Document, linked in the Supporting Materials, pseudocode for printing course information using a vector data structure is provided as an example.