Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

void printCourseInformation (Tree courses, String courseNumber) Example Runtime Analysis When you are ready to begin analyzing the runtime for the data structures that you have

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed
void printCourseInformation (Tree courses, String courseNumber) Example Runtime Analysis When you are ready to begin analyzing the runtime for the data structures that you have created pseudocode for, use the chart below to support your work. This example is for printing course information when using the vector data structure. As a reminder, this is the same pairing that was bolded in the pseudocode from the first part of this document. Code Line Cost # Times Total Executes Cost for all courses 1 n n if the course is the same 1 n n as courseNumber print out the course 1 1 information for each prerequisite 1 n n of the course print the 1 n n prerequisite course information Total Cost 4n + 1 Runtime o(n)Overview This milestone will help prepare you for Project One. In this assignment, you will start working on a project for ABC University {ABCUL 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 assignment, you will create pseudocode for the Computer Science department at ABCU. This code will demonstrate your ability to import data from a le 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 printthat data. There will be no programming work in this milestone; you will be developing pseudocode that will helpyou implement your design in Proiect One. Please note: Throughout this milestone, we are going to use the word "course" to refer to the courses in the curriculum instead of \"class.\" which has another meaning in object-oriented programming. For this milestone, you will: 1. Design pseudocode to dene how the program opens the file, reads the data from the le. parses each line. and checks for le 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 le to ensure it is formatted correctly and check for the fol lowing: 0 Ensure there are at least two parameters on each line [some courses may not have any prerequisites]. o Ensure any prerequisite that is provided on a line exists as a course in the le. In other words, any prerequisite atthe end of a line must have another line in the file that starts with that courseNumber. 2. 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 cou rse 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 le has been processed, the vector data structure will have multiple course objects. one per line in thefrle. Hint: A loop will be needed to process all lines from the file. 3. Design pseudocode that will search the data structure for a specic 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, [inked in the Supporting Materials, pseudocode for printing course information using a vector data structure is provided as an example. What to Submit To complete this project, you must submit the following: Pseudocode Your submission should include your completed pseudocode formatted as a Word document. Supporting Materials The following resources will support your work on the milestone: Course Information This document outlines the courses and pathway you will be designing for. Pseudocode Document This document provides sample pseudocode and a runtime analysis that you will use to support your work in this milestone.snhu CS 300 Course Information Course List This document outlines all of the courses that the advising team will need you to include in the program you are developing. Once you start coding, the same information will be provided to you in a text file that can be used as an input for your program. For now, you only need to understand all of the course data inputs and will reference them while you create your pseudocode. Note that the course data is composed of comma-separated values and contains the fields courseNumber, name, prerequisite1, prerequisite2,...,prerequisiteN. While the courseNumber and name will be shown on every line, a course may have 0, 1, or more prerequisites. A prerequisite will be listed using only its courseNumber. The course data is as follows: CSCI100, Introduction to Computer Science CSCI101, Introduction to Programming in C++, CSCI100 CSC1200, Data Structures, CSCI101 MATH201, Discrete Mathematics CSCI300, Introduction to Algorithms, CSCI200, MATH201 CSCI301, Advanced Programming in C++, CSCI101 CSCI350, Operating Systems, CSCI300 CSCI400, Large Software Development, CSCI301, CSCI350 Flowchart To get started with your design, you could create a flowchart and diagram how the program will execute. If you were to visualize this as a flowchart, the above curriculum would look like this: CSC1301 CSCI100 CSCI101 CSC1200 CSC1400 MATH201 CSC1300 CSC1350Cs 300 Pseudocode Document Function Signatures Below are the function signatures that you can fill in to address each of the three program requirements using each of the data structures. The pseudocode for printing course information, if a vector is the data structure, is also given to you below (depicted in bold). / / Vector pseudocode int numPrerequisiteCourses (Vector courses, Course c) { totalPrerequisites = prerequisites of course c for each prerequisite p in totalPrerequisites add prerequisites of p to totalPrerequisites print number of totalPrerequisites void printSampleSchedule (Vector courses) { void printCourseInformation (Vector courses, String courseNumber) { for all courses if the course is the same as courseNumber print out the course information for each prerequisite of the course print the prerequisite course information // Hashtable pseudocode int numPrerequisiteCourses (Hashtable courses) { void printSampleSchedule (Hashtable courses) { void printCourseInformation (Hashtable Course> courses, String courseNumber) { / Tree pseudocode int numPrerequisiteCourses (Tree courses) { void printSampleSchedule (Tree courses) {

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

Mobile Communications

Authors: Jochen Schiller

2nd edition

978-0321123817, 321123816, 978-8131724262

More Books

Students also viewed these Programming questions