Professional Documents
Culture Documents
Instructions:
Read and understand the given problem statement carefully. Comment where necessary. Your
program must be error free and must be readable. Save your program regularly. Any Student found
plagiarized will be assigned -10. Proper checks must be handled in program.
No code will be accepted after the folder is closed.
It’s an open book test, students can look at relevant resources and notes
Attempt all questions; marks of each question are duly mentioned.
Upload solution of paper on Moellim within the given time
Please be analytical and specific in answering questions.
Image must be readable
The students should retain the solution of the paper until the announcement of results.
Deliverables
You must create a folder with your “SAP ID-Name” then create three folders in this folder like
Problem 1, Problem 2, and Problem 3. In sub folders you save the java files accordingly.
After completing tasks submit the complete folder into the Moellim.
Submit video demonstration of 2 minutes into Moellim too.
Problem 1: 15 points
You are required to design an application for the owner of ice-cream stand asks that you write a program
to help him track sales records. He has ten ice-cream stands around the city, each selling a variety of ice-
cream (e.g. Vanilla, Chocolate, Cookies, and buttered Chip etc.) treats. He wants to enter the sales value
from each stand and then view the data in different ways:
Sorted from lowest to the highest
Sorted from highest to the lowest
Showing just the highest and the lowest numbers
Showing the total number of sales
Showing the average sales value
He can use this information to help plan the location of his stands and reward the best sellers. If you get
this right, you might be getting some free ice cream, so you agree to help.
Enjoy Life Today Yesterday is Gone & Tomorrow May Never Come
Riphah International University, Islamabad
Advance Computer Programming -CS3623
ACP Final Exam Fall 2020
Class Attributes
Stand Stand Name, Stand ID, City, Provence, Street, Plot number
Ice-Cream Ice-cream ID, Ice-cream Name, Ice-cream Price (RS), Quantity of fruits
(Count of ice-cream)
Seller Seller ID, Seller Name, Store (Object), Ice-Cream (Object), Quantity
Client
Server
Classes of this problems are shown in Table 1. If necessary you can add more classes in the
solution.
You must create accessor and mutator methods of each data members of classes.
Create toString method in each class
Graphical User Interface (GUI) is created at the client end.
Use Transmission control protocol send data of Ice-Cream object to Server side.
After receiving data from server side save data into database.
o Name of Database is “End term Exam”
o Relation and Attributes are mentioned in Table 1.
Problem 2: 5 points
Write a program to perform the following operations with proper exception handling:
1. Write a program to create a file named Final_Exam.txt if it does not exist. Write 100 integers
created randomly into the file using text I/O. Integers are separated by spaces in the file.
2. Read the data back from the file (Final_Exam.txt) and display the data in increasing order. If the
read number equals to 100 then through custom exception.
(Define InvalidDataInFileException).
Note (In this task you must create customized exception)
Problem 3: 10 points
Searching data into an array using (more the one) multiple threads.
Create an integer array of 200 size and save integer number randomly
Search data from array using threads
Enjoy Life Today Yesterday is Gone & Tomorrow May Never Come
Riphah International University, Islamabad
Advance Computer Programming -CS3623
ACP Final Exam Fall 2020
Test Case:
Input Output
Enjoy Life Today Yesterday is Gone & Tomorrow May Never Come