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

Design a program that calculates a person’s body mass index (BMI).

BMI is often used to determine whether a person with a sedentary

lifestyle is overweight or underweight for his or her height. A person’s

BMI is calculated with the following formula:

In the formula, weight is measured in pounds and height is measured in

inches. Enhance the program so it displays a message indicating

whether the person has optimal weight, is underweight, or is overweight.

A sedentary person’s weight is considered to be optimal if his or her BMI

is between 18.5 and 25. If the BMI is less than 18.5, the person is

considered to be underweight. If the BMI value is greater than 25, the

person is considered to be overweight


Write a C++ Program ,

Create a typedef structure called Doctor that includes medical license (strin g), name of the doctor (string), channeling fee (float) and the number of pa tients checked during the week (int array)


Write a function called getData( ) which is the data type of Doctor that reads the details of Doctor and store them in the variable of the Doctor typedef structure


Hint Use the given function prototype as

Doctor geData (Doctor d);


Write a function called calDocFee( ) which takes three parameters, channel fee of the doctor, number of patients channeled in a week (7 days) array and the size of the array. Find the total charges for channeling of the doctor and print the total channeling fee


Call the getData( ) and calDocFee( ) functions in the main function to print the following output as required

Output

Enter medical license : PH-1234

Enter the name of the doctor :saye

Enter the channeling fee:1500

Enter the number of patient-Day 1:3

Total channeling fee: 63000


Create class fraction with necessary member variables and member functions .Overload + operator to add two fractions.Also overload << and >> operator to input and print fraction .


Write a program to display the summation of the following series :


12 + 32 + 52 + 72 + 92 + 112 + 132

+ 152


1)write a function using c++ statements called PrintChart( ) which takes three float arrays (value1,value2,value3) and an integer (as day) as parameters . The function calls GetProduction and PrintBar to print the output as given below


Output

Day 1

Machine A**

Machine B*****

Machine C****


2)Write a function using c++ statements called PrintBar( ) which takes a float ( as production ) as a parameter. The function prints asterisks on the screen based on the production .

Note: 1 asterisk = 10 production units (round up the production units )


Input

Machine A Day 1 production 15.5

Output

**


CODE

  MEAL NAME

  PRICE (RM)

 1 2 3

S L C

Based on

Chicken Fillet  15.00 Roasted Beef 20.00 Rib eye Fillet  30.00

Syrup  1.50 Lychee  2.80 Coconut 3.50

the requirement these are what the owner wanted the system to do.

   CODE

 BEVERAGE NAME

 PRICE (RM)

   i. The customer order the meal and beverage based on the code

ii. The system will ask the quantity for each order

iii. The system displays the quantity and the total price of the meal

iv. The system displays the quantity and the total price of the beverage

v. The system displays the total price that the user needs to pay

vi. The system will repeat the process i to v until user put ‘N’ to stop the program


Write a program to display the summation of the following series :

12+ 32+52+72+92+112+132 +152


BEGIN


READ pricePerTicket, numberOfPerson total = pricePerTicket X numberOfPerson IF total is greater than or equal to 200


ELSE

discount = 20%

discount = 5%

amountDiscount = total – discount DISPLAY total, amountDiscount


END


 Draw the equivalent flow chart of the pseudocode.


Fee structure of students of different departments.


Write a class Fee having the following attributes and behavior


 No.of Students


 Fee_per_Student


 Float fee


Pure virtual fun ctions:


 Monthly_fee()


 display()


Derived the following classes from the base class Fee:


 CS


 Chemistry


 BBA


Perform the functionality:-


 Calculate the monthly fee for every department.


 Show the results on the console using Display () function.


 Write destructor when you realize that this is the end of program.


 Use virtual destructor concept in the above hierarchy.


Note:


 Use virtual Member functions for derived classes.


 Use appropriate values for per number of students in departments.


 User appropriate data types.




Following is the diagram for a hierarchy of Mammals, Map the code into C++, each class should contain a

function Sound which can take some parameters and produce a sound.


Parent class: Mammal

-eyeColor:int

+getEyeColor:int

Classes inherited from Mammal:

1)class Dog

-barkFrequency:int

+bark:void

2)class Cat

MeowFrequency:int

+meow:void

Classes inherited from Dog

A) class GermanShephard

+isGerman()

B) class Poodle

+isFrench:void

Implement:

 Inheritance

 Static Polymorphism

 A main( ) which can test all the classes



LATEST TUTORIALS
APPROVED BY CLIENTS