professor chang wants a program that caculates and displays the are of a circle, given the circle's radius. the formula for calculating the area of a circle is πr^2, where π and r represents pi and the radius, respectively. the professor wants to use the value of pi reounded to two decimal places, which is 3.14
enter the first number, second number, and third number
calculate the sum by adding together the first number, second number, and third number
calculate the average by dividing the sum by 3
display the average
enter the assessed value and tax rate
caculate th annual property tax by dividing the assessed value by 100 and then multiplying the result by the tax rate
display the annual property tax
Write code that puts "less than -9\n" to output if the value of userNum is less than -9.
Ex: If userNum is -15, then output is:
less than -9
userNum: -15A college offers diploma course with five set modules each. Define a class Student as an ADT that uses separate files for the interface and the implementation. This class represents a record of one student’s registration and results. For each Student the following information should be kept as member variables:
the student’s name, ID, student number, the name of the diploma, average mark, an array with the five module codes for the diploma, and another array with five results - one for each of the modules.
Class Student should also have a member function calcAverage() to calculate the average for the five results and a member function pass() to determine whether or not a student has passed the module. A student only passes a diploma course if he or she has obtained more than 50% for all the modules, regardless of his or her average mark. Member function pass()should return a boolean value.
.
Create a class called bMoney. It should store money amounts as long doubles. Use the function ms_to_ld() to convert a money string entered as input into a long double, and the function ld_to_ms() to convert the long double to a money string for display. You can call the input and output member functions getmoney() and putmoney().
Overload the operators +,-,*,/ appropriately.
create a class Matrix the stores it in a safe 2D array .that is it it should check for array index bounds .a constructor should allow the programmer to specify the actual dimensions of the matrix. define number functions : putel() for taking 3 argument row index , column index and the element storing it in the corresponding location. getel() for taking 2 arguments row and column indexes and returns the elements from that location . overload the operators +,-,and * appropriately
Provide a member function of class linkedListType that determines the maximum element in a list. Use the following header template Type linkedListType:: max(); You may assume that operator> is overloaded for Type.