In this task, you are going to be implementing a sorted array of angle measurements modelled as objects of the class named distanceMetries. Create a class named distanceMetries which has the following member variables and functions: • Member Variables (all.private): o dauble variable called radians • double variable called degrees Member Functions (all public): o Default Constructor: Initializes radians and degrees to o o calculateRadians: void function that's going to be used to compute radians from the degrees input by the user o calculateDegrees: xoid function that's going to be used to compute degrees from the radians input by the user Radian-Degree Conversion radian degree radian degree • Setter functions for each of the member variables o Getter functions for each of the member variables • Overloaded > Operator: This operator must be overloaded such that it returns as true or false, whether the degrees of one operand are greater than the degrees of the other operand • Overloaded < Operator: This operator must be overloaded such that it returns as true or false, whether the degrees of one operand are less than the degrees of the other operand o printMeasurement: This function will be used to print out the angle measurements exactly how they're shown in the sample output In main(), ask the user how many elements they'd like to input. Create an array of the size input by the user (hint: use a dynamic array), with each element representing an object of distanceMetrics. Fill the array with user inputs, and then print out the entire array. Then, use your overloaded operators to sort the array in ascending order of the degrees inally print out the sorted array

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Someone pleaee solve this Question asap 

In this task, you are going to be implementing a sorted array of angle measurements
modelled as objects of the class named distanceMetrics.
Create a class named distanceMetrics which has the following member variables and
functions:
• Member Variables (all private):
• double variable called radians
o double variable called degrees
• Member Functions (all public):
• Default Constructor: Initializes radians and degrees to o
o calculateRadians: void function that's going to be used to compute radians
from the degrees input by the user
o calculateDegrees. xoid function that's going to be used to compute degrees
from the radians input by the user
Radian-Degree Conversion
radian
degree
radian
degree
o Setter functions for each of the member variables
o Getter functions for each of the member variables
• Overloaded > Operator. This operator must be overloaded such that it
returns as true or false, whether the degrees of one operand are greater
than the degrees of the other operand
o Overloaded < Operator: This operator must be overloaded such that it
returns as true or false, whether the degrees of one operand are less than
the degrees of the other operand
o printMeasurement: This function will be used to print out the angle
measurements exactly how they're showWn in the sample output
In main( ), ask the user how many elements they'd like to input. Create an array of the
size input by the user (hint: use a dynamic array), with each element representing an
object of distanceMetrics. Fill the array with user inputs, and then print out the entire
array. Then, use your overloaded operators to sort the array in ascending order of the
degrees. Finally, print out the sorted array.
Transcribed Image Text:In this task, you are going to be implementing a sorted array of angle measurements modelled as objects of the class named distanceMetrics. Create a class named distanceMetrics which has the following member variables and functions: • Member Variables (all private): • double variable called radians o double variable called degrees • Member Functions (all public): • Default Constructor: Initializes radians and degrees to o o calculateRadians: void function that's going to be used to compute radians from the degrees input by the user o calculateDegrees. xoid function that's going to be used to compute degrees from the radians input by the user Radian-Degree Conversion radian degree radian degree o Setter functions for each of the member variables o Getter functions for each of the member variables • Overloaded > Operator. This operator must be overloaded such that it returns as true or false, whether the degrees of one operand are greater than the degrees of the other operand o Overloaded < Operator: This operator must be overloaded such that it returns as true or false, whether the degrees of one operand are less than the degrees of the other operand o printMeasurement: This function will be used to print out the angle measurements exactly how they're showWn in the sample output In main( ), ask the user how many elements they'd like to input. Create an array of the size input by the user (hint: use a dynamic array), with each element representing an object of distanceMetrics. Fill the array with user inputs, and then print out the entire array. Then, use your overloaded operators to sort the array in ascending order of the degrees. Finally, print out the sorted array.
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY