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

in c++ 1.      Write a code which accept two floating point numbers as an argument. Calculate their modulus and return modulus to the main.


in c++ 1.      Write a code which accept marks of three subjects as argument and return CGPA on the basis of marks.


Create class named Laboratory

Two data fields name (a string) and location (string).

A no-argument constructor to initialize data fields with default values “NoName” and “NULL” .

A member function named input()

A member function named show() to display the details associated with an instance of this class.

Derive class WetLab from class Laboratory including

data members no_of_microscopes and Scientist_name.

respective mutator and accessor functions.

overriding function input() to take input from user in all data members.

overriding function named show() to display the details associated with an instance of class WetLab From Laboratory class,

derive a class named DryLab that contains

a data field no_of_computers and Capacity.

an overriding function named input().

overriding function show() to display the details associated with instance of this class.

Implement these classes and in main() create instances of each class and test functionality of overridden member functions with instances.


• Consider a class Shape that contains: A data member named as Shape Name of string type. A data member named as area of type int. A member function displayarea() • Derive two classes named Circle and polygon from the class Shape that contain: A parameterized constructor to initialize data members that they inherit from the class Shape. In the main(), create instances of Shape Circle and Polygon classes. Invoke displayarea() with shape object while passing references of Circle and Polygon instances.


Railway management system project


Programming challenge/seatwork. Modify the program using the discussed sample program that will give the following output and use a function with parameter and no return type.


Use this to view the picture:

https://drive.google.com/file/d/1EG50edwQCKgXSWM8adkhe08w9gAWw2Sp/view?usp=sharing


Modify the codes of the given output that will use a function on sum using a function with return type and with parameter.


Use this to view the picture: https://drive.google.com/file/d/1dkhqu95SBESide89FVr9yMUO6x-M7vrm/view?usp=sharing


Define a class REPORT with the following specification:

Private members :

adno 4 digit admission number

name 20 characters

marks an array of 5 floating point values

average average marks obtained

GETAVG() a function to compute the average obtained in five subject

Public members:

READINFO() function to accept values for adno, name, marks. Invoke the

function GETAVG()

DISPLAYINFO() function to display all data members of report on the screen.

You should give function definitions.


Define a class BOOK with the following specifications :

Private members of the class BOOK are

BOOK NO integer type

BOOKTITLE 20 characters

PRICE float (price per copy)

TOTAL_COST() A function to calculate the total cost for N number of copies where

N is passed to the function as argument.

Public members of the class BOOK are

INPUT() function to read BOOK_NO. BOOKTITLE, PRICE

PURCHASE() function to ask the user to input the number of copies to be

purchased. It invokes TOTAL_COST() and prints the total cost to be paid by the user.

Note : You are also required to give detailed function definitions.


Define a class in C++ with following description:

Private Members

A data member Flight number of type integer

A data member Destination of type string

A data member Distance of type float

A data member Fuel of type float

A member function CALFUEL() to calculate the value of Fuel as per the following

criteria

Distance Fuel

<=1000 500

more than 1000 and <=2000 1100

more than 2000 2200

Public Members

A function FEEDINFO() to allow user to enter values for Flight Number, Destination,

Distance & call function CALFUEL() to calculate the quantity of Fuel

A function SHOWINFO() to allow user to view the content of all the data members


LATEST TUTORIALS
APPROVED BY CLIENTS