Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

c++ QUESTION 3 An AES speed detection radar emits a beam of microwaves at a frequency designated as fe. The beam reflects by an approaching

image text in transcribedc++image text in transcribed

QUESTION 3 An AES speed detection radar emits a beam of microwaves at a frequency designated as fe. The beam reflects by an approaching car, and the radar picks up and analyzes the reflected beam's frequency, fr. Because of the car's motion, the reflected beam's frequency is shifted slightly from fe to fr. The relationship between the speed of the car, v, in kilometres per hour and the two microwave frequencies, is: 12 (6.685 x 108) * x fr - fel fr+fe x 1.60934 Where the emitted waves have a frequency of fe=2x1010 S-1. AES application will request the value of the reflected beam's frequency, fr. The program then calculates the car's speed before sending a warning message if the speed exceeds the set limits. The defined speed limit is 120 km/h. If the car's speed is larger than or equal to this, the program will display a warning message, "Vehicle is over the speed limits!" otherwise, the program will not display any warning. (a) Sketch a flowchart for the above problem-solving. [8 marks) (b) Write the complete source code for the above statement based on the following requirement. (9) One (1) function pass-by-reference as an input from the user, void user_input(double&); (i) One (1) function pass-by-reference to calculate the speed, double calculate(double&);- (iii) One (1) function pass-by-reference to display a warning if the speed exceeds the limit, void display_warning(double&);- (iv) Global variables are not allowed. (7) Must use cmath library function as in Figure Q3(b). (vi) The program can repeat until the user chooses to end or exit. (17 marks) (b) Write a subprogram named float total_marks(float &). This subprogram will ask the user to enter the pointer for all elements and calculate the total marks for each element after multiplying it with related weightage. The expected output display is as shown in Figure Q4(c). Enter Pointer Value for each 1CGPA elements Enter PL01 - Knowledge - 3.2 Enter PLOZ - Technical Skills - 3.8 Enter PLO3 - Social Skills and Responsibilities - 3 Enter PLO4 - Values, Attitude and Professionalism - 3.9 Enter PLOS - Communication, Leadership and Teamwork - 2.5 Enter PL06 - Problem Solving and Scientific Skills - 3 Enter PLO7 - Information Management and Lifelong Learning - 2.5 Enter PLO8. Managerial and Entrepreneurial Skills - 2.5 Average for Overall Test Marks is - 78.5 Qualified for an interview Press any key to continue... Figure Q4(e) Output Console (c) Write a subprogram named void CandResult(float &) where the subprogram will classify the total marks from the Q4(b) subprogram and will decide the applicant result based on the total marks as shown in Table Q4(b). [6 marks) (d) Write a main program that will use both subprograms above to show the test result. (4 marks) (25 MARKS]

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

Professional IPhone And IPad Database Application Programming

Authors: Patrick Alessi

1st Edition

0470636173, 978-0470636176

More Books

Students also viewed these Databases questions

Question

=+you think is being taxed when more money is printed? Why?

Answered: 1 week ago