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

SHREE RAMKRISHNA INSTITUTE OF COMPUTER EDUCATION AND APPLIED SCIENCES

Sarvajanik University

Internal Practical Exam 2022-23


FY BSc IT/CS Sem - 2 ( Div – A )
SET - A [ for ODD PC Nos ]

DCS-3 : Object Oriented Programming Methodology Total marks : 40


Date : 12th April, 2023 Time : 2 hours
___________________________________________________________________________

KINDLY READ THE QUESTIONS CAREFULLY BEFORE WRITING THE PROGRAMS.

Q-1. Implement the following structure using JAVA and OOPS concepts : [25]

Event

data members member functions


event_name event(e_name, e_type) // constructor
event_type showEventDetails()

Participant

data members member functions


p_name participant(p-name, p_type, e_name, e_type)
p_type // constructor
showParticipant()

Ticket

data members member functions


base_price ticket(p-name, p_type, e_name, e_type) //
add_ons constructor
price calcTicketPrice()
Within calcTicketPrice() method, implement following calculation :

Event Seminar Workshop

P_Type Regular Ext Regular Ext

base_price 400 550 1450 1600

If participant has selected add-on, set


add_on = 15 % of Base_Price
Else add_on = 0

price = base_price + add_on

Q-2. Implement the concept of data hiding to keep the application secure. [05]

Q-3. Implement Exception Handling for the following conditions : [10]

1. The event_type must be either “Seminar” or “Workshop” only.


2. The p_type must be either “Regular” or “Ext” only.
3. The accepted value for add_ons is “Y” and “N”.
4. Event_name must be at least 10 characters long.

You might also like