Assignment 1
Assignment 1
The main goal of Assignment 1 is to implement Classes, Objects, Methods and the principles
of Encapsulation(access modifiers, Getters and Setters, Constructors).
There are 5 topics for an assignment 1(you have to continue it for an assignment 2 also).
Each project should have a menu with available actions and at least two/three Classes except
Main.java(this one is for your console menu of your app). All the data (i.e. objects) should
be stored in ArrayLists!
You can modify the project, add your ideas, other methods, classes, variables etc.
You need to write a small application to store ticket information in the system. It should be an
interactive console application!
The menu should be developed using the "switch case default" statement with the usage of
the loop. Use setter and getter. Clean code.
- Class User should has the following fields: name, age, balance, and orderHistory
(arraylist to store purchased tickets) and Methods;
- Class Movie with fields: movie name, movie genre, age restriction and Methods.
- Class Ticket with fields: id, movie name, date, time, price and Methods. (movie name is
filled based on selected movie)
- Class CinemaSystem which stores all Users, Movies, and sold Tickets also provides
necessary functionality for your app
2. Library System
You need to write an application to imitate the library system. It should be an interactive
console application!
The menu should be developed using the "switch case default" statement and in the loop.
Use setter and getter. Clean code.
- Class User should has the following fields: id, name, group, borrowed books (ArrayList)
and Methods;
- Class Book with fields: book title, isbn, book genre, author, year, quantity and Methods;
- Class Library which stores all users and books and also provides necessary functionality
for your app;
1) To show menu;
2) To add a new meal
3) To add a new user;
4) To order a meal;
5) To edit an order;
6) To cancel an order.
The menu should be developed using the "switch case default" statement and in the loop.
Use setter and getter. Clean code.
- Class Meal should have the following fields: name, price, description and Methods;
- Class Order should have the following fields: userId, mealName, quantity, sum and
methods;
- Class Restaurant which stores all users and meals, orderHistory (for whole restaurant
orders) and also provides necessary functionality for your app.
You need to write a system to keep the information of shopping products. It should be an
interactive console application!
The menu should be developed using the "switch case default" statement and in the loop.
Use setter and getter. Clean code.
- Class Product should have the following fields: Name, price, quantity, description and
Methods;
- Class User with fields: id, name, balance, ArrayList of orders and Methods;
- Class Order should have the following fields: userId, productName, quantity, totalSum and
methods;
- Class OnlineShop which stores all users and products, orderHistory (for whole shop orders)
and also provides necessary functionality for your app.
You need to write a system to keep the information of beauty salon bookings. It should be an
interactive console application!
An example of the menu:
PS. Booking should be done through usage of the certain format: date: “22/12/2022”
time: “12:00”. Suppose that all procedures take an hour!
The menu should be developed using the "switch case default" statement and in the loop.
Use setter and getter. Clean code.
- Class BeautyProcedure should have the following fields: Name of the procedure, price,
description and Methods.
- Class User with fields: name, balance, ArrayList of taken beauty procedures and
Methods.
- Class Booking with fields: id, procedure name, date, time, and Methods. (procedure name
is filled based on selected procedure).
- Class BeautySalon which stores all users and procedures, bookingHistory (for whole
beauty salon bookings) and also provides necessary functionality for your app.