-
Notifications
You must be signed in to change notification settings - Fork 8
Problems Week 1
Trayan Iliev edited this page May 30, 2021
·
8 revisions
The main goal of the project is to implement a web application allowing the Users (Customers and Administrators) to register, and buy from a web-shop different types of goods online, and share their experience about bought Products using Comments.
All Users should have following common attributes:
- id (generated automatically) - long number;
- name - string 2 to 50 characters long;
- email - should be valid email address, unique within the system, cannot be changed;
- username - string 2 to 15 characters long - word characters only, unique within the system, cannot be changed;
- password - string 8 to 15 characters long, at least one digit, one capital letter, and one sign different than letter or digit, NOT sent back to the User clients for security reasons;
- gender - MALE / FEMALE enumeration;
- role - CUSTOMER or ADMIN enumeration, CUSTOMER by default, editable only by Administrators;
- picture of the user (optional)- valid URL, if missing should ne substituted with an avatar according to the gender;
- status - validity status of the user account (ACTIVE, CHANGE_PASSWORD - should change password on login, SUSPENDED, or DEACTIVATED), accessible and editable only by Administrators;
- metadata (optional) - string up to 512 characters long, accessible and editable only by Administrators;
- created (generated automatically) - time stamp of the moment the user account was created;
- modified (generated automatically) - time stamp of the moment the user account was last modified;
- type - enumeration PERSON, CORPORATE;
- ssnVat - SSN of the physical persons or, ID (VAT) number of the corporate customers, string 9 to 16 characters long;
- address - the address of the Customer, string 10 to 250 characters long;
- orders - list of all Orders the Customer has already purchased;
- comments - list of all Comments the Customer has shared;
- productsAdded - list of all Products the Administrator has added to the shop;
The Administrators should be able to add new Products and fulfill or cancel Orders (by changing the Order status to COMPLETED or CANCELED). The Orders have the following structure:
- id (generated automatically) - long number;
- customer - the Customer that has placed the Order;
- closingDate - date of Order closing (completion or cancellation);
- orderLines - list of all OrderLines included in the Order, read further for details;
- description (optional) - string 10 - 500 characters long allowing the Customer to add further instructions about the Order fulfillment;
- created (generated automatically) - time stamp of the moment the entity was created;
- modified (generated automatically) - time stamp of the moment the entity was last modified;
- id (generated automatically) - long number;
- order - the Order this OrderLine belongs to;
- product - the Product ordered;
- quantity - real number, the quantity of the Product purchased;
- price (optional) - real number with double precision, should be taken from Product entity, if missing;
- created (generated automatically) - time stamp of the moment the entity was created;
- modified (generated automatically) - time stamp of the moment the entity was last modified;
- id (generated automatically) - long number;
- name - the name of the 'Product, string 2 to 50 characters long;
- description - string 5 - 2500 characters long, supporting Markdown syntax;
- price - real number with double precision;
- isPromoted - boolean, true if product is currently in promotion campaign, false by default;
- promotionPercentage (optional) - real number with double precision, the percentage of promotion price discount;
- unit - enumeration of PCS (pieces), KG (kilograms), M (meters), L (liters), PCS by default;
- tags - string including comma separated tags, allowing to find the Products by quick search;
- comments (optional) - list of Customer comments about the Product;
- created (generated automatically) - time stamp of the moment the entity was created;
- modified (generated automatically) - time stamp of the moment the entity was last modified;
Each Comment should have the following attributes:
- id (generated automatically) - long number;
- author - the comment's author (User);
- product - the Product the comment is about;
- text - string 5 - 1500 characters long, supporting Markdown syntax;
- url (optional) - the URL of a web resource Comment author wants to refer, should be valid URL;
- approvementStatus - enumeration of SUGGESTED, APPROVED, DISAPPROVED;
- created (generated automatically) - time stamp of the moment the entity was created;
- modified (generated automatically) - time stamp of the moment the entity was last modified;
- Create the project summary document using this course project template. More information about projects is available in this presentation. The domain to be modeled by each course project should include all domain objects (entities) specified in the project description Wiki page.
- Create UML Design class diagram using StarUML, including all domain (Entity, Model) classes from project description, with their attributes and relationships. Export it as JPEG image.
- Create UML Analysis class diagram including all domain (Entity, Model) classes, together with additional Controller and View classes you propose for the project, according to MVC pattern. Following stereotypes should be used: <<controll></controll>> - business logic, <<entity></entity>> - data, <<boundary></boundary>> - user interface views. The attributes in analysis class diagram can be suppressed for better readability. Export it as JPEG image.
- Create new Eclipse Java project for your course project. Create all domain (Entity, Model) classes as proposed in the project description in model package. You can change and improve the model classes as necessary.
- Implement all Controller classes with input and validation logic for each model (entity) class you have implemented.
- Add Create-Read-Update-Delete (CRUD) functionality for all entities and collections of them to the Controller classes. The methods should be implemented for: adding new instances, updating the instance state, deleting instance by id, finding all instances of the type, finding instance by id.
- Add formatted reporting functionality for each collection of entites to the Controller class. The report should return as String all entities from given type, as a table - each on separate line. Use formatted String output.
- Create MainDemo class demonstrating all of the above functionality implemented.
Copyright © 2003-2019 IPT - Intellectual Products & Technologies. All rights reserved.