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

Write a function that accepts three arguments a number n, and two characters s and t. The function convert n from s unit to t unit of similar physical quantities. You can choose one of the following types to use in your program:

1. Length

2. Temperature

3. Area

4. Volume

5. Weight

6. Time


Write a function that accepts a character ch and a number n as arguments. The function then displays an n x n grid filled with ch. Use the function in a program.


a class FlightData in C++ with private data members as fltNum (storing flight number), fltDest (to store destination in km’s), fltDist (to store total distance), ppUnit(to store price (in float) of fuel per unit), totalCost (to store flight running cost). A member function calCost() to find out the flight running cost and store it in totalCost

Distance

Fuel Required(in Units)

Base Charges

<=500

1000

2865

more than 500 and <=1500

3000

3875

more than 1500

4000

4885

totalCost=Base Charges + (Distance*fuel required*price per unit).

Store values of base charges, fixed for every object of class using 3 integer data members having values mentioned in table above. Public members of class are, a function to allow user to enter all data members value and a function to display all flight information with total flight running cost calculated using calCost function. Create an object of class entering all details calculating and displaying flight running cost for it.



For this activity, you are required to provide les called sel.cpp as well as a make le to

compile and run it. In your le, sel.cpp, should have a skeleton of a main program as per

normal which you will then ll it in as per the following.

The objective of this activity is to demonstrate the selection sort algorithm for arrays.

Your program will need to read in from a le called list.txt. On each line, will be a

comma-delimited list of integer values. Each list will be 7 elements long. Your objective

is to sort each of these lists using the selection sort algorithm.

Each line should be sorted, and then displayed in sorted (ascending order with the small-

est element at the start of the string) one after the other. Each will be on a new line.

As a hint, implementing a function to do the selection sort itself will make the overall

program easier to implement.

For example:

Given a list: 6.4,3.25,7.5,2.5,1.1,11.6,0.5

The outcome of the sorting should be: 0.5,1.1,2.5,3.25,6.4,7.5,11.6



Write a program that declares a structure to store income tax, tax rate and tax of 

a person. The program defines an array of structure to store the record of five 

persons. It inputs the income and tax rate of five persons and then displays the 

tax payable.


Write overloaded constructors that take different arguments and calculates the area of shape as well as displays it.


Write a program that has a class named as Area and has attributes that are necessssary to calculate the area of shapes i.e length,width,height,radius etc.



Write a program that counts the number of objects created and destroyed using constructer and destructor.



Write a program that has a above mentioned attributes and also have an overloaded constructor that takes arguments like(Name,Age,Gender,nationality) from the user ,assign the parameers to attributes of class and display on console.


Write a C++ program that has a class named as Human and has related attributes like(Name,Age,Gender,nationality); Assign default values to them using constructor and display on console.



LATEST TUTORIALS
APPROVED BY CLIENTS