Comp 218/EC程序 辅导、 写作C++留学生

” Comp 218/EC程序 辅导、 写作C++留学生Concordia UniversityComp 218/EC Winter 2021Fundamentals of Object Oriented ProgrammingAssignment 2______________________________________________________________________________Deadline: By 11:59pm Friday March 12th , 2021.Evaluation: 2.5 % of your final gradeLate Submission: Late assignments will be discounted by 25%. Late assignments are accepted up to 5days late (grace period) and weekends count.Teams: The assignment is to be done individually.Purpose: The purpose of this assignment is to have you experience the basic steps involved inwriting a complete C++ program (from algorithm development to coding) and topractice with string data type Variables, selection statements and the whilerepetition statement.General Guidelines When Writing Programs:Same as for assignment #1 Refer to assignment #1 handout for details.RECOMMENDATION for this Assignment:Take the time to write out an algorithm for these problems to help clarify the logic BEFORE you startprogramming. (No need to hand in the algorithm.)Question #1: Speed System Program (6 pts)In this question, you will write a program that determines the penalty of a driver who is speeding onhighway with the speed limit of 100km/h based on Ontario Courts.Your program should follow the following rules: Prompt the user to enter name, id and score and validates the information. The student name should be entered as LastName, FirstName (separated by comma).Please note the whole name should be saved in one string. The driver ID must have 7 digits. The drivers SPEED must greater than 0. If the user enter correct information, your program should display the fine based on thespeed. When the fine is displayed, the output should beFirstName LastName got SPEED. Based on the speed system, FirstName (ID) will pay X.Please note the calculation of X is based on the following rules:- A $2.50/km speeding fine for 1-19km/h over the speed limit.- A $3.75/km speeding fine for 20-29km/h over the speed limit.- A $6.00/km speeding fine for 30-49km/h over the speed limit.- 50+ km/h over the speed limit comes with a court decided fine. Your program should be able to ask user for new input of drivers information for penaltyuntil get the input Yes from the user. Display welcome closing messages.The following are sample screen shots to illustrate the expected behavior of your program. YourComp 218/Winter 2021 Page 2 of 7 Assignment #2program must display the same information with the same format.User input at the keyboard is Marked with a red circle.Figure 1 Sample output of Question#1Comp 218/Winter 2021 Page 3 of 7 Assignment #2Figure 2 Sample output of Question#1Questions #2: Online Order Program (8 pts).In this question, you will write a program to help the customer order food online and calculate thetotal price.Your program should follow the following rules: Prompt the user to enter the choice based on the menu and validates the information The choice should be an integer number displayed on menu from 1 to 6. A price to calculate the total expense of the user. Please find the menu and price in the following table.Menu Price without Meat Price with beef Price with pork1. Hamburger $7.5 $25.5 $17.52. Pizza $7.5 $25.5 $17.53. Noodle $7.5 $25.5 $17.54. Salad $7.5 $25.5 $17.55. Sandwich $7.5 $25.5 $17.56. ExitComp 218/Winter 2021 Page 4 of 7 Assignment #2 Your program should be able to ask users new choice if the user enters Yes for more food. If the total price is less than $50, the customer needs to pay $5 for delivery. Your program should ask the amount of tips that the customer would like to pay. Display welcome/closing messages.The following are sample screen shots to illustrate the expected behavior of your program. Yourprogram must display the same information with the same format.User input at the keyboard is marked with a red circle.Figure 3 Sample output of Question#2Comp 218/Winter 2021 Page 5 of 7 Assignment #2Figure 4 Sample output of Question#2Comp 218/Winter 2021 Page 6 of 7 Assignment #2Figure 5 Sample output of Question#2Comp 218/Winter 2021 Page 7 of 7 Assignment #2Submitting Assignment 2- Zip together the source codes (.cpp files only) for questions 1 and 2.- Naming convention for zip file:Create one zip file, containing all source files for your assignment using the following namingconvention:The zip file should be called a#_studentID, where # is the number of the assignment studentID isyour student ID number. For Example, for this 2nd assignment, student 123456 would submit azip file named a2_123456.zip- Submit only ONE version of an assignment. If more than one version is submitted the first onewill be graded and all others will be disregarded.Note:- Late assignments will be discounted by 25%. Late assignments are accepted up to five days late (grace period) and weekends count.- Assignments not submitted in requested format may not be graded.- Uploading incorrect files will result in a grade of 0.Evaluation Criteria for Assignment 2 (20 points)For Assignment 2 – 6 pts.Comments – description of Variables/ description of the steps in code/purpose of program2 pts.Choice of variable names 1 pt.Indentation and readability of program 1 pt.Welcome and closing message 1 pt.Clear prompts to user clear messages with output results 1 pt.Question 1 6 pts.Prompt user read data 1 pt.Determine the correctness of users information 2 pts.Determine the penalty fine result 1 pt.Display results 1 pt.Question 2 8 pts.Ask for read input Data 1 pt.Check the valid input 1 pt.Determine the food type on menu and more food option 3 pts.Determine the delivery fee and tips 2 pts.Display the result 1 pt.如有需要,请加QQ:99515681 或WX:codehelp

添加老师微信回复‘’官网 辅导‘’获取专业老师帮助,或点击联系老师1对1在线指导