Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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 exit

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

Marketing Database Analytics

Authors: Andrew D. Banasiewicz

1st Edition

0415657881, 978-0415657884

More Books

Students also viewed these Databases questions

Question

Which months of this year 5 Mondays ?

Answered: 1 week ago

Question

Define Leap year?

Answered: 1 week ago

Question

Prepare a short profile of Lucy Clifford ?

Answered: 1 week ago

Question

Prepare a short profile of Rosa parks?

Answered: 1 week ago

Question

Were the right people involved in the decision-making process?

Answered: 1 week ago

Question

Were they made on a timely basis?

Answered: 1 week ago