subject

Write the following program: Use struct data type to store information about courses. Every course is characterized by the following information: 1) Title (up to 20 characters); 2) Number of credits (integer); 3) Instructor (up to 15 characters); and 4) the suggested order of the course in the course sequence of the major (integer; Two courses can have the same suggested order). - The information about individual courses is read from an input file.
- Store the information about all courses in an array and then display the content of the array.
- Order the courses in the alphabetical order of their titles and then display all the courses.
- Order the courses in the suggested order of the courses, such that one course with a lower suggested order is always before a course with a higher suggested order. Assuming that a student cannot take more than X credits per year (the value X is read from the keyboard), display what courses a student should take every year, so that courses are following the suggested order and the number of credits per year does not exceed the limit X.
Note: Extra credit is given if dynamic data structures are used.
example:
Inputfile: ESE999 5 Marshmello 2
MAT123 3 David 1
CSE123 4 Armin 3
JPN123 1 Martin 3
AMS123 2 Dimitri 1
Output:(display the content of the array):
ESE999 5 Marshmello 2
MAT123 3 David 1
CSE123 4 Armin 3
JPN123 1 Martin 3
AMS123 2 Dimitri 1
Output:(Order the courses in the alphabetical order of their titles and then display all the courses.)
AMS123 2 Dimitri 1
CSE123 4 Armin 3
ESE999 5 Marshmello 2
JPN123 1 Martin 3
MAT123 3 David 1
(Order the courses in the suggested order of the courses):
Input: 6
Output:
Year 1:
AMS123 2 Dimitri 1
MAT123 3 David 1
Year 2:
ESE999 5 Marshmello 2
JPN123 1 Martin 3
Year 3:
CSE123 4 Armin 3

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 02:50
Define a class named movie. include private fields for the title,year, and name of the director. include three public functions withprototypes void movie: : settitle(cstring); , voidmovie: : setyear(int); , void movie: : setdirector(string); . includeanother function that displays all the information about a movie.write a main() function that declares a movie object namedmyfavoritemovie. set and display the object's fields.this is what i have but know its wrong since it will notcompile: #include#includeusing namespace std; //class declarationclass movie{private: string movietitle ; string movieyear; string directorname; public: void settitle(string title); void setyear(string year); void setdirector(string director); void displayinfo(); }; //class implementationvoid movie: : settitle(string title){ movietitle = title; cout< < "what is the title of themovie? "< > temp; myfavoritemovie.settitle(temp); cout< < "enter movie year"< > temp; myfavoritemovie.setyear(temp); cout< < "enter director'sname"< > temp; myfavoritemovie.setdirector(temp); //display all the data myfavoritemovie.displayinfo(); system("pause"); return 0; this code is not entirely mine someone on cramster edited my firstcode but then i try manipulating the new code and i still get acompile error message : \documents\visual studio 2008\projects\movie\movie\movie.cpp(46) : error c2679: binary '< < ' : no operator found which takes aright-hand operand of type 'std: : string' (or there is no acceptableconversion)c: \program files (x86)\microsoft visual studio9.0\vc\include\ostream(653): could be'std: : basic_ostream< _elem,_traits> & std: : operator< < > (std: : basic_ostream< _elem,_traits> & ,const char *)w
Answers: 1
question
Computers and Technology, 23.06.2019 02:50
There’s only one game mode that stars with the letter β€˜e’ in cs: go. which of the options below is it?
Answers: 1
question
Computers and Technology, 23.06.2019 03:00
What are the different parts of computer
Answers: 2
question
Computers and Technology, 24.06.2019 01:30
Could you find out how im still getting an 83 percent on this in edhesive a = input("enter an animal: ") s = input ("enter a sound: ") e = "e-i-e-i-o" print ("old macdonald had a farm, " + e) print ("and on his farm he had a " + a + "," + e) print ("with a " + s + "-" + s + " here and a " + s + "-" + s + " there") print ("here a " + s+ " there a " + s) print ("everywhere a " + s + "-" + s ) print ("old macdonald had a farm, " + e)
Answers: 2
You know the right answer?
Write the following program: Use struct data type to store information about courses. Every course i...
Questions