Write a C++ program in which write a function convert() that converts a decimal number to a binary, octal, and
hexadecimal equivalents. The function will take two arguments: first argument will be
the number to be converted and second argument will be the base in which this number
is to be converted. Function should return the converted value. You may use strings to
represent converted numbers like “0x3A”, “00101100”, “72” etc.
b. Call convert() function in the main program to produce the following output. It is same
as you made in the previous assignment.
Example output:
Enter upper limit = 20
Enter lower limit = 30
Please enter a value of lower limit between 0 and the upper limit and try again.
Enter lower limit again = 10
............................................................................
Decimal Binary Octal Hexadecimal
Wite a C++ function. A college offers a course that prepares students for the state licensing exam for real estate brokers.
Last year, ten of the students who completed this course took the exam. The college wants to know
how well its students did on the exam. You have been asked to write a program to summarize the
results. You have been given a list of these 10 students. Next to each name is written a 1 if the
student passed the exam or a 2 if the student failed.
Your program should analyze the results of the exam as follows:
Input each test result (i.e., a 1 or a 2). Display the prompting message "Enter result" each time the
program requests another test result.
Count the number of test results of each type.
Display a summary of the test results indicating the number of students who passed and the
number who failed.
If more than eight students passed the exam, print the message "Raise tuition."
Q.3 A block of wood A of mass 10 kg is held on a rough horizontal table. An elastic string
connected to the block passes over a smooth pulley at the end of the table and then under a second smooth pulley carrying a body B of mass 5 kg as shown in Fig
The other end of the string is fixed to a point above the second pulley. When the 10 kg block is released, it moves with an acceleration of g/9. Determine the value of coefficient of friction between the block and the table.
https://imgur.com/a/4oSOLx2 (figure's image link)
Steep safety ramps are built beside mountain highways to enable vehicles with defective brakes to stop safely. A truck enters a 250-m ramp at a high speed v0, and travels 180 m in 6 s at constant deceleration before its speed is reduced to v0/2. Assuming the same constant deceleration, determine (a) the additional time required for the truck to stop, (b) the additional distance traveled by the truck.
A hydraulic cylinder has a 1 meter stroke. It lifts a 100kg weight in 2 seconds. What is the average power used by the cylinder to perform this work?
Qd(=50-8P) and Qs(=17.5+10P)
find 'f(t) by definition if f(t)=4t^2 + t also find tangent at t=2
Write a program to overload operators in the same program by writing suitable operator member functions for following set of expressions: O5= (O1/O2) *(O3+O4) [Here O1,O2,O3,O4 and O5 are objects of a class “overloading”, and this class is having one integer data member]
A 79 kg weight-watcher wishes to climb a
mountain to work off the equivalent of a large
piece of chocolate cake rated at 571 (food)
Calories.
How high must the person climb? The
acceleration due to gravity is 9.8 m/s
2
and 1
food Calorie is 103
calories.
Answer in units of km.
If the monthly home loan repayment is more than a third of the user’s gross monthly
income, the software shall alert the user that approval of the home loan is unlikely.
7. The software shall calculate the available monthly money after all the specified deductions
have been made.
8. The software shall not persist the user data between runs. The data shall only be stored in
memory while the software is running.
Non-functional requirements:
1. You are required to use internationally acceptable coding standards. Include
comprehensive comments explaining variable names, methods, and the logic of
programming code.
2. You are required to use classes and inheritance. Create an abstract class Expense, from
which HomeLoan, etc., can be derived.
3. Store the expenses in an array