Modify the program by creating an array of n objects using pointers. Show the details of n items by using pointers to object concept.
(Pointers to objects) Define a class Item that is used to store and display the information regarding the item number and its price. Write a program to store and display the details of one items by using both normal object and pointer to object separately. Display
appropriate message wherever necessary.
Searching a word present in a sentence or not, if present print its location with a successful note.
WAP using pointer to print greatest and smallest number present in an array (min 10 elements)
Write a program that able to compute the pay of both types of employees: retired one’s and employed,
the retired employees will receive pension and it will be computed and displayed with proper variables
and messages. The pension of the employer will be fixed and will be computed on the basis of age, if the
age of the retired employer is between 60 to 70 years then its pension will be 30000 and if the age is
greater than 70 then the pension will be 40000. The pay of the employer will be computed on daily
worked hours and the net pay will be shown with the proper messages of gross salary. The pay of the
employer will be 1000 rupees per day if he/she worked for 8 hours and if it works more than 8 hours, then
he will be paid 300 rupees per hour but the extra time can only be utilized at maximum of 3 hours.
Using while or do-while loop. Make a program that will input two number, If the two number entered are EVEN then perform the addition and display the Sum. Your program will be terminated by an option if the user not to proceed another entry.
Make a program that will input Philippine currency (Peso), convert it into Dollar. 1 Dollar 49.50 pesos, Display the Dollar equivalent. Your program will be terminated if the peso currency = 0.
Determine whether the following are valid switch statements. If not,
explain why. Assume that n and digit are int variables. (11)
a. switch (n <5 2)
{
case 0:
cout << "Draw." << endl;
break;
case 1:
cout << "Win." << endl;
break;
case 2:
cout << "Lose." << endl;
break;
}
Using while or do-while loop. Make a program that will input birth year. Compute and Display the age of this current year 2021. Your will be terminated if you input zero in the birth year.
A new author is in the process of negotiating a contract for a new suspense novel. The publisher is offering three options. In the first option, the author is paid $5,000 upon delivery of the final manuscript and $20,000 when the novel is published. In the second option, the author is paid 12.5% of the net price of the novel for each copy of the novel sold. In the third option, the author is paid 10% of the net price for the first 4000 copies sold, and 14% of the net price for the copies sold over 4000.
The author has some idea about the number of copies that will be sold and would like to have an estimate of the royalties generated under each option. Write a program that prompts the author to enter the net price of each copy of the novel and the estimated number of copies that will be sold. The
program then outputs the royalties under each option and the best option the author could choose.
(Use appropriate named variables to store the special values such as royalties rates and fixed royalties.)