Maxxxxxx-x / OO_HW3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Object-Oriented Analysis and Design - HW3

Here is the finished code for the 3rd assignment for the CSC0005 course.


Components

Design

The main script starts the simulation and initializes all necessary classes, including Videos, Customer and Store.


There are a total of 4 classes which can be found in this folder

  • Logs - A class responsible for logging data in the rental store
  • Customer - The class for the Customers
  • Store - The class for the video rental store
  • Video - The class for the videos

Both Customer and Video uses a class factory method to create classes for each one of their types / categories. Both have similar designs where they both consists of a base class and a class factory.

We also have 2 utility scripts which provides us with the Random() and randomUUID function. (UUID is a buildint function from node:crypto)

image The UML class diagram can be found here


All configurations can be edited within the config script


Usage

Prerequisites

  • Node.js (LTS version is recommended)

Setup

  1. Use command prompt or powershell on Windows | Termianl Linux

  2. Clone this github repository

git clone https://github.com/Maxxxxxx-x/OO_HW3
  1. Change directory into the cloned folder
cd OO_HW3
  1. Check if node is installed on your machine
node -v

if there is no output with the NodeJS version, please install it / add it to the PATH

  1. Install the necessary dependencies with
npm i
  1. Run the script with command
npm run start

About


Languages

Language:JavaScript 100.0%