Questions: 11 448

Answers by our Experts: 10 707

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

A finger-print machine is kept in a school. All the students are required to record their finger-print on their arrival . Expected arrival time is common to all the students. For every one minute of late arrival, 50 paise is charged as fine. For example, if the arrival time of student is 9:03:10 and expected time is 9:00:00 then fine is Rs. 2. Given the details of students, their arrival time on a particular day and the expected arrival time, design an OOP model and write a C++ code to print the rollno and the name of the students who came earlier than the arrival time and calculate fine amount. Understand the precode and application program to do the implementation.

Input Format

Number of students

Roll no of Student1

Name of Student1

Arrival time of Student1

Roll no of Student2

Name of Student2

Arrival time of Student2

...

Roll no of Student-n

Name of Student-n

Arrival time of Student-n

 

All time is given in hours followed by minutes followed by seconds

(Perform Operator Overloading of << and >> operators)



Consider a situation that a user wants to print first n (any value, e.g. first 10) numbers of Fibonacci series.


You need to implement a program that gets a number from user and prints first n Fibonacci series


numbers. Write a function for this purpose that prints Fibonacci series recursively. This function should


accept a number in parameter and then print n number of elements of Fibonacci series

An integer is said to be a perfect number if the sum of its divisors, including 1 (but not the number itself),



is equal to the number. For example, 6 is a perfect number, because 6 = 1 + 2 + 3. Write a function



isPerfect() that determines whether parameter number is a perfect number. Use this function in a



program that determines and prints all the perfect numbers between 1 and 1000. Print the divisors of



each perfect number to confirm that the number is indeed perfect. Challenge the power of your computer



by testing numbers much larger than 1000.

A parking garage charges a $2.00 minimum fee to park for up to three hours. The garage charges an


additional $0.50 per hour for each hour or part thereof in excess of three hours. The maximum charge for


any given 24-hour period is $10.00. Assume that no car parks for longer than 24 hours at a time. Write a


program that calculates and prints the parking charges for each of three customers who parked their cars


in this garage yesterday. You should enter the hours parked for each customer. Your program should print


the results in a neat tabular format and should calculate and print the total of yesterday’s receipts. The


program should use the function calculateCharges() to determine the charge for each customer. Your


outputs should appear in the following format:


Car Hours Charge


1 1.5 2.00


2 4.0 2.50


3 24.0 10.00


TOTAL 29.5 14.50

write an inline function, factorial (int x) which returns the factorial of value x. Test the function by reading values from the keyboard


Design a class having the constructor and destructor functions that should display the number of objects being created or destroyed of class type


Write a program that declares a structure to store BookID, price and pages of a book. It defines two structure variables and inputs values. It displays the record of most costly book.


b. Use the fraction structure from Part a, implement four-function fraction calculator. It uses


functions for each of the four arithmetic operations. They can be called fadd(), fsub(), fmul(), and


fdiv(). Each of these functions should take two arguments of type struct fraction, and return an


argument of the same type.

Instructions:

  • Using a do...while() loop, continuously scan for random integers that will be inputted by the user and print out its square, separated in each line.
  • Once the inputted value is 0, it will still print out its square value but should then terminate the loop afterwards. Use this concept in making your loop condition.
  • Use iostream only.

Sample Results:


Input


Multiple lines containing an integer.


2

6



Output


Multiple lines containing an integer.


4

36




Create a structure called fraction. It has two members, both type int, called numerator and



denominator. Write a program that input values in two variables of type fraction. Add both



fractions and print the result in fraction format.

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS