CSE 1002: (Problem Solving and Object Oriented Programming)

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

CSE 1002 :( Problem Solving and Object Oriented Programming)

SCHOOL OF ELECTRONICS ENGINEERING (SENSE)

FAT EXAM: TEAM C Questions


Follow the instructions: (Answer all the Questions)

 Write your Team Details, Registration number & Name in the top of each
answer sheets.

 Don’t share your code or answers to your friends (Very Important).

 Copy and paste the Code in answer sheet and attach the screenshot of
code with output for verification.

 Beware of Plagiarism (Don’t copy-paste the code: Understand & write in


your own way)

Question 1:
Creating user defined function food, and passes the argument (price).
Give option to the user to enter the amount (250, 200, 150) and display the food items
{Mutton Briyani, Burgers, Chicken Soup, Fried chicken, Mash potatoes, Spaghetti}
according to the price.
Food Items:
M= Mutton Briyani (Price 250).
B= Burgers (Price 250).
C= Chicken Soup (Price 200).
F= Fried chicken (Price 200).
P= Mash potatoes (Price 150).
S= Spaghetti (Price 150).

Method: Use Function with argument and without return value.

Output:

Enter the Amount: 250 Enter the Amount: 200 Enter the Amount: 150

M= Mutton Briyani (Price 250). C= Chicken Soup (Price 200). P= Mash potatoes (Price 150).
B= Burgers (Price 250). F= Fried chicken (Price 200). S= Spaghetti (Price 150).

Page 1 of 2
CSE 1002 :( Problem Solving and Object Oriented Programming)
SCHOOL OF ELECTRONICS ENGINEERING (SENSE)

Question 2:
Write a C program to create text file and find Unique “WORDS” and Common
“WORDS” store in to separate two different text files using File handling.

Texts file:

Line 1: Thanks for your in-depth conversation.

Line 2: Thanks for your concern and understanding.

Question 3:
What is inheritance? Explain Multiple inheritance?

Write a C++ program for Movie Ticket Booking System for two costumers, (Base Class
1: Movie Name, Base Class 2: City, Base Class 3: Phone Number) (Derived Class: Price)
using Multiple Inheritance, minimum three Bass Classes and one Derived class, after
that print the ticket details separately.

Note: Give condition in Derived class to Check If price is greater than 500 (Print bonus
points added) or lesser than 500 (Print bonus points not added). Check all possibility
conditions and attach the result.

Page 2 of 2

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy