Professional Documents
Culture Documents
Private Members : FlightNumber (integer), Destination (String), Distance (float), Fuel (float)
A Member Function calfuel() to calculate the value of fuel as per the following criteria:
Distance Fuel
<=1000 500
More than 1000 and <=2000 1100
More than 2000 2200
Public Members: 1. A function Feed_Info() to allow user to enter values for data members and invokes
calfuel() to calculate the quantity of fuel. 2. A function show_fuel() to show the contents of the data members.
Q3. Write a OOP program to create and count number of objects of a class that are created in the memory.
Q4. Write a program to perform following the following operations in a TEXT FILE:
(a)Count no. Of vowels (b) Count no. Of consonants (c) Count total no. Of alphabets
Q5. Write a program to concatenate the content of 2 different files entered by user and store into third file.
Q6. Write a program that increments the contents of the array with pointer and print the contents of an array
in reverse order using a pointer variable.
Q13. Write a program to implement Queue using the concept of dynamic allocation.
Q14. Given a binary file “BUS.DAT” containing the records of the following class bus type.
class BUS
Int bus_no;
Char desc[40];
int distance; // in km
public:
};
Write a function in c++ that would read the contents of the file “BUS.DAT” and display the details of those
buses which travels the distance more than 100 km.
SECTION – B
Attempt any one K-MAP assignment given below
(Note: Question is randomly selected based on chit drawn)
Draw a digital circuit diagram for the following Boolean expression (after reduction using K-map):
SECTION – C
Attempt any one question: The command along with the result must be written in the answer sheet
(Note: Question is randomly selected based on chit drawn)
(i) To display W_ID, FIRSTNAME, DESIGNATION and CITY of all employees living either in New
York or in New Delhi or in Boston
(ii) To display first name of the workers in descending order of BENEFITS.
(iii) To display the FIRSTNAME, LASTNAME and total salary of all clerks from the tables WORKERS
and DESIG, where total salary is calculated as SALARY + BENEFITS.
(iv) To display the maximum Benefits as per their designation.
(v) Display the total no. of employees whose salary is between 71000 and 90000 and neither lives
in New York nor in Paris.
Table : Books
BookId Quantity_Issued
T0001 4
C0001 5
F0001 2
Table: Stationary
S_ID StationaryName Company Price
BP01 Ball Pen Reynolds 10
PL02 Pencil Natraj 5
ER05 Eraser Natraj 3
PL01 Pencil Apsara 6
GP02 Gel Pen Reynolds 15
Table: Consumer
C_ID ConsumerName City S_ID
01 Pen House Delhi PL01
06 Write Well Mumbai GP02
12 Topper Delhi BP01
15 Good Learner Delhi PL02
16 Motivation Bangalore PL01
Write SQL statements for (i) to (iv)
(i) To display the consumer detail in descending order of their name.
(ii) To display the Name and Price of Stationaries whose Price is in the range 10 to 15.
(iii) To display the ConsumerName, City and StationaryName for stationaries of
"Reynolds" Company
(iv) To increase the Price of all stationary by 2 Rupees.