Answered step by step
Verified Expert Solution
Question
1 Approved Answer
C++ An AES speed detection radar emits a beam of microwaves at a frequency designated as fe. The beam reflects by an approaching car, and
C++
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 fa to fr. The relationship between the speed of the car, v, in kilometres per hour and the two microwave frequencies, is: v= X X (6.685 10)(: - fe) 1,60934 frt fe X 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. () One (1) function pass-by-reference as an input from the user, void user_input(double&); (ii) One (1) function poss-by-reference to calculate the speed, double calculate(doubles); (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. (v) Must use emath library function as in Figure Q50b). (vi) The program can repeat until the user chooses to end or exitStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started