Q3-2) Show the sequence of code writing for the classes of the following diagram: ProductCatalog Store DeliverySchedule Product Inventory Supplier
Added by Dolores W.
Close
Step 1
The sequence of code writing should reflect the dependencies between the classes. A good approach is to start with the classes that have no incoming dependencies and proceed to those that depend on others. Show more…
Show all steps
Your feedback will help us improve your experience
Akash M and 82 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
The establishment called ABC Enterprise requires a Java program to keep a database of the inventory of the products that it sells. Each product is identified by its manufacturer, its name, the quantity, and unit price. Note: a manufacturer is characterized by its company's name and address. In addition to storing the information, the program should be able to make updates to the quantity and/or the price as time goes on. That is, when a sale is made, the quantity of that product must be reduced; similarly, when a product is re-ordered, the quantity of that product must be increased. Also, when there is a change in the price of a product, the price must be changed. The change must be interpreted as a replacement of the value. New products may be added to the inventory at any time; also, a product may be removed from the inventory at any time. Maintain a separate list of the products that have been deleted from the database of active products. Your program must be able to produce three kinds of reports, namely: (a) Locate a single product and display its name, price, and quantity alone. (b) The inventory report should be structured as follows: Product Purchase Date Quantity Price Manufacturer State Telephone 01/20/2013 10 254.99 Motorola FL Computer 01/06/2013 15 756.99 CBS NY : : : : : : : : : : : : (c) A list of the deleted products should be structured as follows: Product Date Manufacturer Paper reams 01/20/2013 Morgan Jewelry : : : In your design, convince yourself that you need a minimum of four classes, not including the test class – Product, Manufacturer, Address, and Database. You may use the class called GetData.java for inputting the data. Use scrollable panes to display your output.
Akash M.
Aarya B.
Need help with a JAVA program especially the GUI part as its formatting is something I cannot figure out. According to the Inheritance and encapsulation principles, you have to design and implement a super-class Product and the subclasses Electronics and Clothing. Also, you will have to add at least one constructor for each class. The class Product should be abstract and include appropriate get/set methods and hold information about the product ID (mix of characters and numbers), product name, number of available items, and the price. (You can add any other information that you consider appropriate). In particular: • The Electronics subclass should hold specific information and methods. You should add the brand and the warranty period as instance variables, constructors, and the relative get/set methods. • The Clothing subclass should hold specific information and methods. You should add the size and color as instance variables (attribute), constructors, and the relative get/set methods. • You should implement a class ShoppingCart to represent the user’s cart. The class should contain a list of products as instance variable, there should be methods to add, remove and calculate the total cost. • Design and implement a class called RAMShoppingManager, which implements the interface ShoppingManager. RAMShoppingManager maintains the list of the products in the system and provides all the methods for the system manager defined in the console menu. Console Menu Implementation (Phase 2) The class RAMShoppingManager should display a menu in the console (not in the GUI) containing the following management actions from which the manager can select one. – You should have a menu with a list of options • Add a new product to the system. It should be possible to add either electronics or clothing, with all the relevant information (all the attributes defined in the relative class). You should consider that the system can have a maximum of 50 products. • Delete a product from the system, inserting the product ID. Display a message with the information of the product (if it is electronics or clothing) that has been deleted and the total number of products left in the system. • Print the list of the products in the system. For each product, print on the screen all the information (attributes defined in the corresponding class) and say if it is electronics or clothing. The list should be ordered alphabetically according to the product ID. • Save in a file the list of products that have been added to the system, with all the relative attributes. The next time the application starts, it should be able to read back all the information saved in the file and continue to use the system. Graphical User Interface (GUI) Implementation (Phase 3) While the manager interacts with the system through the menu console, the client will interact with the system through a graphical user interface. Open a Graphical User Interface (GUI) from the menu console – you will have an additional option that the user can select to open the GUI. You should implement the GUI according to the following requests: • The user can select from a drop-down menu which type of product can be visualized (all, Electronics, or Clothes). • The user can visualize the list of products with relative information as displayed below. The user should be able to sort the list alphabetically. You should use a table to display this information on the GUI. • The user can select a product and add it to a Shopping Cart. When implementing these functionalities, you need to comply with the following requirements: o the items with reduced availability (less than 3 items available) should be in red on the table. o When the user selects the product, the product details (all the information related to the product) should appear in a panel below the table. o the user can add the item to the shopping cart by clicking the relative button. The user can visualize the shopping cart by clicking the ‐Shopping Cart‐ button. The user can select another item and keep adding items to the shopping cart. o the shopping cart will show the list of products and the final price. To calculate the final price, the system will apply the following discounts: • 20% discount when the user buys at least three products of the same category. • If the discount is applied, the message will appear on the GUI showing the final cost.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
18,000,000+
Students on Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD