Konic-NLP / OOAD-project

A music store simulation with Java, including Unit-test and design pattern application

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OOAD-project

A course project repo for CSCI5448.
Group member: Sijia Ge, Xiaosong Wang, and Zhiyong Wang.
Java Version:16.0.2
Code Version:1.0

view the latest release of project 3

The output result of our code is in output.txt.

The link to Part1 (former) version of UML: UML 0.0

The link to Part2 (current) version of UML: UML 1.0

The link to the document that describes the changes of our UML: UML Documentation

To make the code run, we adopt the bellowing modifications/Assumptions:


  1. The conditions of items are integers from 1 to 5 inclusively. The correspond relation between number and words is {Poor:1, Fair:2, Good:3, Very Good:4, Excellent:5}.
  2. The price of items is an integer. When the price is changed 1.1 times, 0.9 times, the 0.8 times, the (int) method is applied to truncate the float into int .
  3. If the order is delivered on Sunday, when the store is closed, the staff of Monday will put items of the order in the inventory on that day.
  4. if today is sunday, both clerk's consecutive work days will clean to zero
  5. the correspondent situation wth different prices:
    1. listprice:when the buyer first time to consult with the price;
    2. saleprice:when the buyer second time to consult with the price;
    3. purchaseprice: the price for ordered new items;

As for the OO term examples:


  1. Examples of Inheritance can be found in Items.java, where each subclass inherits from the Parent class.
  2. Examples of Polymorphism can be found in Items.java, where subclass's Constructor and getter method overrides the Parent Class. Examples of Polymorphism can also be found in the Staff.java
  3. Examples of Cohesion can be found in Helper,java, where each method only has one basic thing/function to do.
  4. One example of Identity can be found in Staff.java, where the checkWithBuyer method check the content of two objects instead of the identity of two objects.
  5. Examples of Encapsulation can be found in Items.java, where classes' attributes are private and protected.
  6. One Example of Abstraction can be found in Staff.java, where the cehckRegister delegates with other methods, without concerning the details.

About

A music store simulation with Java, including Unit-test and design pattern application


Languages

Language:Java 100.0%