subject

In this exercise you will expand your timeInput. cpp, which only dealswith lecture times, so that you can have more information about each lecture, and print a schedule to the student. More specifically, you should keep your Timestructure from timeInput. cppand create a new Coursestructure consistedof the following variables:. 1. name, type string, which stores the name of the course 2. credits, type int, which stores the number of credits for the course 3. majorRequirement, type bool, whfch tells if the course is a requirement for your major 4. avgGrade, type double, which gives the average grade (in percentage) that past students received in the course 5. days, type string, which stores the days that lectures are held 6. startTime, type Time (from exercise 1), which is the start time of the lecture 7. endTime, type Time (from exercise 1), which is the end time of the lecture Your program should read the course information from a text file called "in. txt". This file should contain the following pieces of information on the lines specified below: Line 1: Course number: How many courses the user wants to sign up for. Line 2: Name of the course Line 3: Credits Line 4: Is the course a major requirement? (1-yes, 0-no) Line 5: Average grade for the course Line 6: Lecture days Line 7: Start time of the lecture Line 8: End time of the lecture Line 9-15: Repeat same information for additional course, if it exists. In order to receive full credit for this part of the lab, you MUST create the two In order to read the avgGrade, you will need to convert from strings to floats. The Note: structures, Time and Course, consisted of the proper variables. function you can use to do so is atof, which takes in an array of characters as a parameter (again, NOT a string). To convert a string to an array of characters, use the function cstr().

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 13:30
Using the find and replace tool would be most appropriate when changing the company name when the same letter is sent to different companies. inserting a date field. suggesting alternate word choices with the same meaning. placing images alongside text.
Answers: 3
question
Computers and Technology, 23.06.2019 15:00
Jake really works well with numbers and is skilled with computers but doesn't work well with others. which of the jobs discussed in this unit might be best for jake? why?
Answers: 3
question
Computers and Technology, 23.06.2019 22:50
An environmental protection agency study of 12 automobiles revealed a correlation of 0.47 between engine size and emissions. at 0.01 significance level, can we conclude that there is a positive association between the variables? what is the p value? interpret.
Answers: 2
question
Computers and Technology, 24.06.2019 11:20
Print "censored" if userinput contains the word "darn", else print userinput. end with newline. ex: if userinput is "that darn cat.", then output is: censoredex: if userinput is "dang, that was scary! ", then output is: dang, that was scary! note: if the submitted code has an out-of-range access, the system will stop running the code after a few seconds, and report "program end never reached." the system doesn't print the test case that caused the reported message.#include #include using namespace std; int main() {string userinput; getline(cin, userinput); int ispresent = userinput.find("darn"); if (ispresent > 0){cout < < "censored" < < endl; /* your solution goes here */return 0; }
Answers: 3
You know the right answer?
In this exercise you will expand your timeInput. cpp, which only dealswith lecture times, so that yo...
Questions
question
Mathematics, 02.03.2021 23:30
question
Mathematics, 02.03.2021 23:30
question
History, 02.03.2021 23:30
question
Mathematics, 02.03.2021 23:30
question
Mathematics, 02.03.2021 23:30