Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

COURSE PROJECT: E-Commerce Application in Java PREAMBLE Project Description This course project will allow you to get practice developing a complete Java application. You will

image text in transcribed
image text in transcribed
image text in transcribed
COURSE PROJECT: E-Commerce Application in Java PREAMBLE Project Description This course project will allow you to get practice developing a complete Java application. You will work to develop a prototype for a virtual store interface in Java only - it will not be web-based. In the store, you will be able to sell any product of your choice, but it must be specialized. That means, you need to choose a product and focus on selling varieties of that product, for example, varieties of cars, computers, plants, or any other product you would like. The application will provide an interface for a user to shop for products from you store, which, as we already mention is specialized in something you selected. The user should be able to: (1) browse the products, (2) add products to a virtual cart, and eventually, (3) checkout. At first, the interaction will be textual, i.e., though the console. But later, a GUI will be added to complete the experience. The system will be implemented in Java and will have the following classes: (1) Store Manager, (2) Storeview, (3) Inventory (4) Shopping Cort. (5) Product, and (6) several other classes of your choosing (these will be the classes modelling the products you sell). A brief overview of these classes is presented below. More detailed requirements will be outlined in the relevant milestones. Store Manager: This class will be the controller of the system. Store Manager will (1) manage an Inventory, (2) maintain Shopping Carts for users and (3) respond to queries/prompts/inputs received from the user via the Store View class. StoreView: This class will be the starting point of your application. Ideally, Store Manager and StoreView would be able to exist independently. However, communication in this project will be done entirely between objects (no web, sockets, multi-threading, etc.). Therefore, the StoreView will be responsible for initializing the entire system. StoreView will allow the user to interact with the store via an interface. This interface will be textual at first (through the console), and later refactored as a GUI, Inventory: This will be the class responsible for keeping track and maintaining information relating to the products available in the store. The Inventory will be managed by the Store Manager. Shopping Cart: A Shopping Cart will be maintained for any user using the store interface (likely just one; but that could be subject to change!). A user will be able to view the contents of their cart and modify them appropriately. Interactions between the user and their cart will be moderated via the Store Manager That means, the StoreView class cannot actually see any Shopping Cart. The Store Manager will create and manage Shopping Cart objects for users as requested by the StoreView class. Overview In this milestone, you will develop the UML Class diagram of your software using the information provided in this overview. You will also be coding the beginnings of the StoreManager, Inventory and Product classes. You can find the specific requirements for each class below. Keep in mind that most of the tasks you will be required to do are relatively open-ended. You must justify in your Change Log any decisions you made that were not obvious. For example, you should give a brief reason why you used an Array instead of an ArrayList for a class field. However, you should not explain why you gave studentName a type of String. Another example: you do not need to explain why you made a class method public, or a class field private, because doing this is usually normal. But, if for some reason, you made a class attribute protected, you need to explain why. The Product Class The Product class will store information about items being sold by the store. A Product object must only have a (1) name, (2) id, and (3) price. It does not have any other fields. The information in these fields should be retrievable but cannot be changed once the Product object is created. The Inventory Class The Inventory class will track the state of the inventory of your system. It should keep track of the type and quantity of each Product, as well as provide methods to access and modify this information. The following functionalities should be available in any given Inventory object: Get the amount of stock for a given Product ID (Note: it is possible the Product does not exist in the Inventory!). Add a specified amount of stock for a given Product to the inventory (Note: new Products can be added!). Remove a specified amount of stock for a given Product ID from the inventory (Note: you cannot have negative stock, and you cannot delete Products from the Inventory; if a Product's stock reaches 0, leave it.). Get information on a Product given a Product ID. Initialize the Inventory; set the contents of the Inventory to some default values upon object creation. The Store Manager Class Store Manager is the "brain" of the system. It contains all the functionality for managing the Inventory, Shopping Carts, and providing information to the StoreView class. Store Manager manages a single inventory and it will have a variety of methods two for now- to interact with this inventory object. A Store Manager object should: Create a new Inventory object upon object creation (i.e., when a Store Manager object is created). Have functionality to check how much stock of a given Product is in the Inventory. Have functionality to process a transaction given an array of Product information. For example, imagine that the content of a user's shopping cart is as follows: "Ilproduction, quantity), [product/D2, quantity), (productID3, quantity]l". Given each productid, your method should: o Check that the desired quantity exists in the Inventory and return the total for all of the Products. o If there is insufficient quantity of any of the products, your method should return some indication of this failure. It could be, for example-1. o Remember to subtract the quantities from the Inventory stock if the transaction is successful. COURSE PROJECT: E-Commerce Application in Java PREAMBLE Project Description This course project will allow you to get practice developing a complete Java application. You will work to develop a prototype for a virtual store interface in Java only - it will not be web-based. In the store, you will be able to sell any product of your choice, but it must be specialized. That means, you need to choose a product and focus on selling varieties of that product, for example, varieties of cars, computers, plants, or any other product you would like. The application will provide an interface for a user to shop for products from you store, which, as we already mention is specialized in something you selected. The user should be able to: (1) browse the products, (2) add products to a virtual cart, and eventually, (3) checkout. At first, the interaction will be textual, i.e., though the console. But later, a GUI will be added to complete the experience. The system will be implemented in Java and will have the following classes: (1) Store Manager, (2) Storeview, (3) Inventory (4) Shopping Cort. (5) Product, and (6) several other classes of your choosing (these will be the classes modelling the products you sell). A brief overview of these classes is presented below. More detailed requirements will be outlined in the relevant milestones. Store Manager: This class will be the controller of the system. Store Manager will (1) manage an Inventory, (2) maintain Shopping Carts for users and (3) respond to queries/prompts/inputs received from the user via the Store View class. StoreView: This class will be the starting point of your application. Ideally, Store Manager and StoreView would be able to exist independently. However, communication in this project will be done entirely between objects (no web, sockets, multi-threading, etc.). Therefore, the StoreView will be responsible for initializing the entire system. StoreView will allow the user to interact with the store via an interface. This interface will be textual at first (through the console), and later refactored as a GUI, Inventory: This will be the class responsible for keeping track and maintaining information relating to the products available in the store. The Inventory will be managed by the Store Manager. Shopping Cart: A Shopping Cart will be maintained for any user using the store interface (likely just one; but that could be subject to change!). A user will be able to view the contents of their cart and modify them appropriately. Interactions between the user and their cart will be moderated via the Store Manager That means, the StoreView class cannot actually see any Shopping Cart. The Store Manager will create and manage Shopping Cart objects for users as requested by the StoreView class. Overview In this milestone, you will develop the UML Class diagram of your software using the information provided in this overview. You will also be coding the beginnings of the StoreManager, Inventory and Product classes. You can find the specific requirements for each class below. Keep in mind that most of the tasks you will be required to do are relatively open-ended. You must justify in your Change Log any decisions you made that were not obvious. For example, you should give a brief reason why you used an Array instead of an ArrayList for a class field. However, you should not explain why you gave studentName a type of String. Another example: you do not need to explain why you made a class method public, or a class field private, because doing this is usually normal. But, if for some reason, you made a class attribute protected, you need to explain why. The Product Class The Product class will store information about items being sold by the store. A Product object must only have a (1) name, (2) id, and (3) price. It does not have any other fields. The information in these fields should be retrievable but cannot be changed once the Product object is created. The Inventory Class The Inventory class will track the state of the inventory of your system. It should keep track of the type and quantity of each Product, as well as provide methods to access and modify this information. The following functionalities should be available in any given Inventory object: Get the amount of stock for a given Product ID (Note: it is possible the Product does not exist in the Inventory!). Add a specified amount of stock for a given Product to the inventory (Note: new Products can be added!). Remove a specified amount of stock for a given Product ID from the inventory (Note: you cannot have negative stock, and you cannot delete Products from the Inventory; if a Product's stock reaches 0, leave it.). Get information on a Product given a Product ID. Initialize the Inventory; set the contents of the Inventory to some default values upon object creation. The Store Manager Class Store Manager is the "brain" of the system. It contains all the functionality for managing the Inventory, Shopping Carts, and providing information to the StoreView class. Store Manager manages a single inventory and it will have a variety of methods two for now- to interact with this inventory object. A Store Manager object should: Create a new Inventory object upon object creation (i.e., when a Store Manager object is created). Have functionality to check how much stock of a given Product is in the Inventory. Have functionality to process a transaction given an array of Product information. For example, imagine that the content of a user's shopping cart is as follows: "Ilproduction, quantity), [product/D2, quantity), (productID3, quantity]l". Given each productid, your method should: o Check that the desired quantity exists in the Inventory and return the total for all of the Products. o If there is insufficient quantity of any of the products, your method should return some indication of this failure. It could be, for example-1. o Remember to subtract the quantities from the Inventory stock if the transaction is successful

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Mastering Apache Cassandra 3 X An Expert Guide To Improving Database Scalability And Availability Without Compromising Performance

Authors: Aaron Ploetz ,Tejaswi Malepati ,Nishant Neeraj

3rd Edition

1789131499, 978-1789131499

More Books

Students also viewed these Databases questions