You are on page 1of 2

UNIVERSITY OF GUJRAT

Final Term Examination


Semester Spring 2020

Object Oriented Programming Lab Marks:75 Marks


Course Code: SE-104 Time: 3 hrs. 30 mins

Note: If you are making it on Netbeans or on paper make sure I can understand all the components
used while making this GUI. Answers should be properly written with question number. This paper
is of 3 hours and 30 mins are for submission.

Each Question contains equal marks 25*3

Your friend is owing a small bakery shop. He wants you to make a bakery system for him. As you are a
Software Engineer you need to check for all the OOP concepts implemented carefully and also your
database tables should be reflected in your classes. At first he has only 10 items in the bakery.
1) Make a GUI showing him 10 items with images, name and price only.
2) After somedays he added 5 new items and planning to add more bakery items in future. So help
him saving this data in database and retrieving it from their instead of saving a static value. Your
table should store all the necessary information about the item. Draw table for items.
3) Use FileChooser for selecting the image. Write its code.
4) Write function for inserting, updating and deleting items into database.
5) As he has more and more work coming he hired a cashier. Make a user friendly interface for him
where he can login to system with his username and password and can do following
6) Select an item from combo box the price field will automatically be filled with the price of one
item. Enter the quantity and do it until all the items are done.
7) Generate a simple receipt for the customer. Return him change if any.
8) Write function to save these details in bill table with bill id and date as a member.
9) He is receiving complaints from his customers that most of the time cakes and biscuits are not
available and they have to wait for hours. So he hired a manager. Make him a notification panel
where he get alerts when some item is below 20 in quantity. His responsibility is to update the items
in the inventory.
10) There are two types of customers in this system one the regular customers and other are the owners
of small stores. Store information for both types of customers in a single table by making radio
buttons for regular customer and store keepers. Before generating bills ask customer about their
name and phone number only and their type. Add a discount field for the store keepers.
11) Before making a bill search by phone number if the customer exists fill the fields otherwise add
new customer.
12) At the end of day your friend who is admin of the system click on reports where he can generate
total amount generated on that date. He saves that information in a text file with amount and date.
He can view any amount saved from the text file by giving the date. So help him handling the file
also.
13) He needs a proper login page for three roles in the system. Cashier can make receipts and generate
bills, manager can update only the items quantity and admin have all the controls. Make a proper
interface showing all this with a login from the text file.
14) For the above program how many exceptions you handled? Name them and write the reason.
15) How does polymorphism enable you to program “in the general” rather than “in the specific”?
Discuss the key advantages of programming “in the general.” Also highlight where in your program
you used polymorphism.
16) Compare and contrast abstract classes and interfaces.
17) Why would you use an abstract class? Highlight your class in program that is abstract.
18) Why would you use an interface? Name interface you used in the above scenario.
19) How many types of inheritance are there? In above program which kind of inheritance you have
used.
20) Differentiate ‘is-a relationship’ and ‘has-a relationship’.
21) Discuss the ways in which inheritance promotes software reuse, saves time during program
development and helps prevent errors.
22) What happens if no catch handler matches the type of a thrown object?
23) What happens if several catch blocks match the type of the thrown object?
24) What is the key reason for using finally blocks?
25) Perform the following tasks for an array called table:
 Declare and create the array as an integer array that has three rows and three columns.
Assume that the constant ARRAY_SIZE has been declared to be 3.
 How many elements does the array contain?
 Use a for statement to initialize each element of the array to the sum of its indices. Assume
that the integer variables x and y are declared as control variables.

You might also like