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

Create a class called Person and save it in person.cpp 2. This class must have the following data members: A name > An age And gender, for example M for Male and F for Female 3. This class must have the following methods: • A public default constructor that sets the data members to appropriate default values A copy constructor A setPerson method that will receive and assign person data. Ensure that the name is not an empty string, that the age is not negative and gender is only M/m/F/f. getName method that returns a name with the 1st letter uppercased. A getGender method that returns "Male" or "Female" depending on the person's gender • A getAge method that returns a person's age

suppose a company “abc” is conducting a test to hire you as oop developer and asked you develop a calculator for the basic arithmetic operators (+, -, *, /, %), where you have to deal at least 11 digit numbers. the numbers can be of with decimal point or without decimal point. the company wants you to develop an efficient code. you can choose any of the following options to develop this whole scenario:

1 function overloading

2 class template


1. (Modify) Rewrite each of these declaration statements as three separate declarations:

a. int month, day = 30, year;

b. double hours, volt, power = 15.62;

c. double price, amount, taxes;

d. char inKey, ch, choice = 'f';


Develop C++ code for a function that takes the GPA of students from the user. This function should works for different class size specified by the user. Function should display the GPA of those students who had GPA more than 3.5.

Develop a C++ code for a function that takes the GPA of students from the user; this function should work for different class sizes specified by the user (class size may be 30, 40 or 50). Function should display the GPA of those students who has GPA more than 3.5.


Write a program that will read integers and find the total and average of the input values. Your program should end when the input is 0.


Write a function to fine the ceiling of a double value and write a function to fine its floor. The ceiling of a number is the smallest integer greater than or equal to that number .the floor of a a number is the largest integer bless than or equal to that integer. For example the ceiling of 5.4 is 6 and the floor of 5.4 is 5.


Write a program to define a class book that will contain Title, Author and Price of the book as data members. Define Null Constructor, parameterized constructor and copy constructor for the class and a function to display the details of an object. Use the new operator to initialize object of this class through a pointer and display the data member through a member function.


Write a c++ program that creates a one dimensional array with of length5 integers from the keyboard into the array .your to perform sequential search for an integer in the array and insert a new intem in that location of the array.


Write a program that Will short thee integers .the integers are entered from the keyboard and stored in variable num1,num2,num3 respectively. The program sorts the numbers so that num1<=num2<=num3.


LATEST TUTORIALS
APPROVED BY CLIENTS