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

Write a C++ program using classes and objects, which can find the overall average of the entire group(say n) of patients. A single object with default constructor adds 10 patients with 60 kg average kg overweight or underweight. All objects of this patient class(and ONLY objects of this patient class) update the total weight and the total number(n) of patients and can display the overall average. Your C++ program should provide all these facilities.

      


A 2-character string, userPassword, is read from input. Replace each digit character in userPassword with '*'. Otherwise, userPassword is not changed.


Given string inputString on one line, character newLetter on a second line, and integer strIndex on a third line, change the character at index strIndex of inputString to newLetter


Write a complete C++ program that • Creates a 12 element integer array containing elements between 0 and 20 using the rand function. • After creating the array, sort it using any of the sorting methods then ask the user to guess a number between 0 and 20. • To search if the number is in the array, create a menu: 1: Linear 2: Binary. The different search algorithms are to be created in separate Functions. • int LinearSearch(int list[], int size, int value) • int BinarySearch(int list[], int size, int value) • if it is guessed number is found the chosen function should return the index of the value to the main function, then the main function should sshow index and value to the user


write a program that show the working of tollplaza.the program will consist of vehicle class which has further two child(paying vehicle and non paying vehicle).Vehicle class should be having an account of all the vehicle that pass through the toll-plaza . paying vehicle has three type:

1)Type A(used for cars/jeeps)

2)Type B(used for Hiace/truck)

3)Type C(used for bus/heavy vehicles)

Type A has passing fee RS30/- Type B has passing fee RS50/- Type C has passing fee RS100/-

There is another class Person who is going to the entry but he needs to be authorized by assigning a unique id and password.

Note:

us static function,classes,constant,global variable where ever necessary.Output will begin by a Welcome message and then ask for authorization of the person. It should be having proper messages and the object should only be created at the time of use. Incorrect entry of person should only take 5 entries and then end/exit the program.


Create a “Boss” class that inherits from the “Armed Enemy” class. Implement an additional

armor level field for the “Boss” class and provide suitable getter and setter methods. Create a

“Boss” Object in the main function to test the functionality of your “Boss” class.



Task 3:

Consider a class Computer having Two fields (i.e. companyName, price) and A single function named show() A class named Desktop inherits Computer class and adds fields representing color, monitor size, and processor type and Override function named show() to display values of its all attributes A class named Laptop inherits Computer class and adds fields representing color, size, weight, and processor type and Override function named show() to display values of its all attributes In Main() instantiate objects of derived classes to access respective show() functions to see the polymorphic behavior.


Task 2:(Inheritance and Polymorphism)

We want to calculate the total marks of each student of a class in Physics, Chemistry and

Mathematics and the average marks of the class. The number of students in the class are entered by the user. Create a class named Marks with data members for roll number, name and marks. Create three other classes inheriting the Marks class, namely Physics, Chemistry and Mathematics, which are used to define marks in individual subject of each student. Roll number of each student will be generated automatically.


Task 1:(Inheritance and Polymorphism)

Make a class named Fruit with a data member to calculate the number of fruits in a basket. Create two other class named Apples and Mangoes to calculate the number of apples and mangoes in the basket. Print the number of fruits of each type and the total number of fruits in the basket.


Write a program that accepts student mark out of 100, and return the corresponding letter grade based on the following condition:



if mark is greater than or equal to 90 A


if mark is greater than or equal to 80 and less than 90B


if mark is greater than or equal to 60 and less than 80C


if mark is greater than or equal to 40 and less than 60D


if mark is less than 40F


for other cases NG


N.B write the program using both switch and if-else if- else Statements.


It is known that a score for a given course is b/n 0-100

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS