Code the following diagram Progression Class should be taken as abstract class,
think carefully before implementation. Correct Approach will give you maximum
marks.
Class progession
Fields:long first
Long cur
Methods:Progession()
Long firstvalue()
Long nextvalue()
Void print progession()
Implement through composition
Class ArithProgression
Fields:long inc
Methods:ArithProgression()
ArithProgression(long)
Long nextvalue()
2) class GeomProgression
Fields:long base Methods:GeomProgression()
GeomProgression(long)
Long nextvalue()
3)class FibonacciProgression
Fields:long prev
Methods:FibonacciProgression()
FibonaciiProgression(long, long)
Long nextvalue()
To complete our program, we define the main function, which p erforms a simpletest of each of the 3 classes.
Consider the products in the Departmental Store. Each product has product Id, product Name, product Unit price etc. Perform the following operations with Item details in the Departmental Store. i) Search the item by the item it. ii) List the items which are less than Rs. 100 /= iii. Sort the items by the item price and display all the items.
Consider the products in the Departmental Store. Each product has prodduct Id, product Name, product Unit price etc. Perform the following operations with Item details in the Departmental Store
Write a C++ Program on Airline Reservation System using classes and inheritance concept. And other C++ statements also like if, if-else, switch, loops, functions, etc.
The Output Should include:
1) Book Flight (domestic and international)
2) Cancel Flight
3) Check Flight Status
4) Exit
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
Evaluate each of the following expressions and list the final value of variable x.
1) x = 4-(8%5)*3/(8-6)%3;
2) x = ((9%8)*2)*8/5%(7/3)
3)x= (5-2*9+(3+((9/4)%2*3+6/(8%3))))
4)x =3/6+13%3+2
1.Write a function using C++ statements called AverageValue() which takes two integer values(value1,value2) and returns the average value as a float.
2.Write function using C++ statements called MaximumOutlet() which takes two integer values(value1,value2 )and returns the highest value.
3.Consider the following to answer the questions that follow.
RFC is one of the most popular food and grocery retailers. The company weekly record transaction details of a product over (four) 4 outlets.
The transaction code is a 4 – digit number and starts with 21. The last 2 digits indicate the quantity sold of the product.
Write a function using C++ statements called ProcessTransactions() which takes two 2 integer arrays (array 1,array2) and an integer as the size of the array 1.
Array 1 holds all transaction details while array2 holds the product quantity details after processing.
The function should use transaction details in array1 and store the quantity values in the array2.
Note: quantity is a 2-digit integer.
Write only the loop statements to print the following sequence .
1) 1 2 4 8 16
2) 1 2 4 6 10 15
3) 243 81 27 9
4) 111 222 333 444 555
5) 16 11 7 4 2 1
6) 1 1 2 3 5 8 13 21
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.
Create a class 'COMPLEX' to hold a complex number. Write a friend function to add two
complex numbers. Write a main function to add two COMPLEX objects.