Write a program that declared a class with one integer data member and two member functions for input data and output data. Decide appropriate access modifiers for these members. Use this class in your program.
Define a class TEST in C++ with following description:Private MembersTestCode of type integerDescription of type stringNoCandidate of type integerCenterReqd (number of centers required) of type integerA member function CALCNTR() to calculate and return the number of centers as(NoCandidates/100+1)Public Members - A function SCHEDULE() to allow user to enter values for TestCode, Description, NoCandidate & call function CALCNTR() to calculate the number of Centres- A function DISPTEST() to allow user to view the content of all the data members
"cin.ignore();" what type of cin statement is this and how it is used in a program?
Define a class batsman with the following specifications:Private members:bcode 4 digits code numberbname 20 charactersinnings, notout, runs integer typebatavg it is calculated according to the formula batavg =runs/(innings-notout)calcavg() Function to compute batavgPublic members:readdata() Function to accept value from bcode, name, innings, notout and invoke the function calcavg()displaydata() Function to display the data members on the screen.
2.16: Diamond Pattern
Write a <span style="text-decoration-line: none;">program</span> that displays the following pattern:
*
***
*****
*******
*****
***
*
One acre of land is equivalent to 43,560 square feet. Write a program that calculates the number of acres in a tract of land with 389,767 square feet.
Assuming the ocean’s level is currently rising at about 1.5 millimeters per year, write a <span style="text-decoration-line: none;">program</span> that displays
1. Function Overloading : Compile time polymorphism: early binding: same function name with different types and number of arguments.
2. Virtual function: Run-time polymorphism: late binding: call function depending on where base pointer is pointing to.