Вы находитесь на странице: 1из 6

OOP

Partial 1
Topics
Java Revision: Primitive types, Wrapper class, primitive type conversions, String to primitive type
casting, Conditionals (if-else, switch-case, and Ternary), Loops (for, while, do-while, for-each), Input
(Scanner, and JOptionpane), Random numbers (random numbers between min and max), Arrays,
Methods, and simple enum type.
UML Class diagram (Association, Aggregation, Composition), Video of Lucidchart about class diagram
Concept only: OOP principals (Inheritance, Polymorphism, Encapsulation)
Simple Inheritance
Constructors (Overloading)
Setters and getters
Override (toString())
Concept only: Model-View-Controller (MVC)
Serializable
Online Retail Store Management
Task Description
There is a Retails store:
Scenario: The inventory should be filled with 3 products and random amount of
each based on the budget. In each iteration you calculate sales, update the
budget and buy products again based on the budget. The Retail Store receives
orders 3 times (can have only 5 customers at each iteration). Each customer can
have one order and between 1-3 randomly chosen products in each order. If the
order is not in the inventory the store ignores the order.

ATTENTION: This application does not receive data from the user input. This
application is a simulation. You run it and it prints the results. (If you use
joptionpane your grade will be from 4)
Deliverables/Entregables- Time
Make a MS Word file (name it like this: Group1.docx)which contains:
1. The complete name/surname of all participants ()/ Number of the Group (Group of the maximum 4)
2. One paragraph of the Description of your solution and the explanation of your UML model. Inheritance (Correct
Class format, Correct connections)
3. UML Class Diagram (PNG, JPG) (Must include: Association, Aggregation, Composition, Inheritance)
4. Snapshots/images of all code and the results
5. If you have any doubts, questions, or uncertainty write a paragraph describing it.
6. Each group has one task from top and one task from the bottom with exact number of the group. For example
group 1 takes task 1 from top and the bottom

The Complete Project in zip format (AT LEAST 5 CLASSES)


Optional: video of the Solution explaining
ATTENTION IMPORTANT: You must upload your projects between 6:45pm-6:50pm (70% of the class).
If you have problem with your internet you can upload it until 6:55pm. AFTER 6:55 THE GRADE WILL BE
CALCULATED FROM 4. MAKE SURE ALL THE FILES ARE CLOSED!!
Online Retail Store Management
◦ Main elements: Products, Customers, Store 1. Print the number of customers ignored.
Management, Orders, Inventory 2. Print the average of the sales at each iteration
1. Inventory elements: Products, amount(10) 3. Print sales-costs
2. Product elements: Name(Food, Game, Cleaning), 4. Print How many products were sold
Selling Price($10-$100, $30-$110, $5-$20), Buying 5. Print How many products were ordered
Price($2-$50, $15-$60, $1-$10), Amount 6. Print the name of all customers
3. Customer: Name, Order(1-3 products) 1. Print the ratio of number of products sold to sales
4. Order: Id, Products 2. Print the ratio of the sales in the first iteration and
5. Store Management elements: Customers, Inventory, the second
Budget($3000) 3. Print the ratio of customers to customers served
4. Print the ratio of the money gained and the
At least one class should implement “Serializable” money lost
interface and be written and read from file. 5. Print the amount of customers who spend more
than $100
UML class diagram 6. Print the ratio of each iteration sales to all sales
Iterations with a Schedule at Fixed Rate
For running a task every second or at a one second delay apply ScheduledExecutorService and
either scheduleAtFixedRate or scheduleWithFixedDelay, example

Вам также может понравиться