C++ Answers

Questions answered by Experts: 9 913

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

Q3. Define a class License that has a driving license number, name and address. Define 

constructors that take on parameter that is just the number and another where all 

parameters are present.


Q2. Assume that the cell users are two kinds – those with a postpaid option and those 

with a prepaid option. Postpaid gives a fixed free talk time and the rest is computed at 

the rate of N2.90 per pulse. Prepaid cards have a fixed talk time.

Define a class Cell_user as a base class and derive the hierarchy of classes. Define 

member functions and override them wherever necessary to

(i) retrieve the talk time left for each user.

(ii) print the bill in a proper format containing all the information for the postpaid user


Create a C++ program that will

  • Deposit cash amount in a bank account
  • Check available balance of the account
  • Withdraw cash amount from an account
  • Compute for the interest earned for balances greater than Php 10,000.00
  • Charges for having a balance below the required minimum

Maintaining balance is Php 5,000.00

Interest rate is 5%

Bank charge is 2%

PIN (Personal Identification Number) is required to do a bank transaction

The program gives the user an option to change PIN




Implement list data structure that will resize on its own

Note:

No global declarations

Make use of class and structure

Call in main the functions


You are required to create a programming to display the pricing, discounted value, who is the seller and postage company.



Please include the necessary library before typing your codes.


Item: shoe


Brand: adidas


Model: Super-star


Price (RM): 450.99


Discount (%): 25.75


Seller: DEF Sdn Bhd


Postage: Lazada pos


The output from the codes must have the command COUT for every item.



Construct the necessary script to solve the given problem.




USE THE ABOVE ESCAPE SEQUENCE IN A HELLO.CPP PROGRAM AND OBSERVE THE IMPACT THAT EACH OF THEM HAVE ON


THE PROGRAM. WRITE THE ANSWER WHAT YOU HAVE OBSERVED

Create a program that asks the user to input the full name and a number (1-10). Create two functions


One function that receives that number and print the factorial of value of that number.


Second function that print the table of that number ranges from -5 till +10, and count the negative and positive values of the multiplied number answers.


Given a text file containing unknown number of lines, each line containing three integer values representing the height of a building in (Yard foot inches) separated by space. Write a well-documented C++ program that 

  1. Reads the three values from the file,
  2. If any of the read values is greater than 2000, prints on the screen an error message: “Error: invalid building length.!” .
  3. Otherwise, calculates the building length in inches, where one yard is 3 feet, and foot is 12 inches, 
  4. Sends to another file both length values: the read and the calculated as shown below. 
  5. Repeats steps (1-4) until a negative value is encountered.
  • For example, if the read values are (71 2 6), then your program must send to a new file the following:
  •  The height of a building in YD:FT:IN format = 71:2:6
  • The height of a building in inches = 2586

Write a C++ program that defines an integer array of size 18, the program asks the user to fill the array from the keyboard. After filling the array, the function prints all values that are divisible by 3 and less than the average


Write a program using c++ with class GCD for finding Greatest Common Divission (GCD) of an input positive integer a, b.

LATEST TUTORIALS
APPROVED BY CLIENTS