159.234 OBJECT-ORIENTED PROGRAMMING S1, 2024 Assignment 3 (Price 800)

WX: help-assignment
Code price: 800

159.234 OBJECT-ORIENTED PROGRAMMING S1, 2024 Assignment 3

1. System Description (Overview of Problem)

You are asked to write a program in Java to simulate a computer store’s management system A computer store maintains three categories of computers: Desktop PCs, Laptops, and Tablets. Each category is further divided into different types, as listed below:
Desktop PC types: Gaming, Home & Study, Business, and Compact
Laptop types: Gaming, Home & Study, Business, and Thin & Light
Tablet types: Android, Apple, and Windows
Each computer’s unique ID, brand, CPU family, and price need to be specified regardless of its category. The computer store must also record memory size (GB) and SSD capacity (GB) for Desktop PCs and Laptops as well as screen size (inches) for Laptops and Tablets.
The computer store has two types of staff: salespersons and managers. A salesperson can log into the computer store’s management system to view a list of all computers. A salesperson can also search for computers by category and type before clicking on a search result to view that computer’s details.
A manager can log into the computer store’s management system to do everything that a salesperson can do, but a manager can also maintain records—by updating computer details or adding and deleting computers.

2. Tasks to complete:

a) Create a narrative step-by-step storyboard using screenshots of your system-generated GUIs to demonstrate required functions of the computer store’s management system (please refer to a sample at the end of this document; you can use its format to present your work)
Your Java code should:
b) Import the provided test data (computers.txt) to your system using Java Input
c) Add five staff to the computer store’s system—three salespersons and two managers—using usernames and passwords provided (this function should have classes designed with an appropriate inheritance hierarchy that applies core OOP concepts)
d) Realize all functions specified in the system description above (for this assignment, you are NOT required to update computers.txt file after a manager update/add/delete records, you only need to update the GUI to show the change)

3. Design and Implementation Guidelines

Note: You will receive credit for correctness, completeness, no code duplication, and clear on-screen outputs. Also, we will grade your program using the following OOP and general software implementation guidelines:

  1. Encapsulation design and implementation—proper use of modifiers
    a. Private/Protected/Public
    b. Must make use of getters and/or setters wherever appropriate

  2. Inheritance design and implementation
    a. Reasonable class hierarchies
    b. Proper data fields separation in base and derived classes
    c. Proper methods separation/overloading/overriding in base and derived classes
    d. Proper use of base and derived class constructors

  3. Polymorphism and implementation
    a. Write generic code that targets the base class whenever possible
    b. Appropriate use of overriding in derived classes to realize polymorphism

  4. Information store and implementation
    a. Use HashMap and other Java collection class(es) to store information

  5. Exception handling
    a. Throw an exception object when an application error occurs (e.g., when an invalid piece of data is entered)
    b. Use “try/catch/finally” or “try/catch” block to handle the exception

  6. Use Java Swing to implement your GUI

4. Other Specifications

You must follow the next three specifications when completing this assignment:

  1. Place appropriate comments in your program—e.g.:

/** explain what the program file is doing . . . */
// explain what a part/method of the program is doing…
2) DO NOT add any file path for ‘computers.txt’ (put it directly in your project folder when you test your code)
3) DO NOT add your own package name(s) to the beginning of your .java files (this requirement is only for marking purpose)

5. Submission Requirements:

  1. Your storyboard as a PDF file
  2. All your .java files (source codes)
  3. Any image file(s) you may have used in your program (put the image file(s) directly in your project folder when you test your code - this requirement is only for marking purposes).
  4. Zip all your files from 1), 2), and 3) together and submit as a single file to Stream

6. You MUST use the following test data in your assignment:

  1. Staff details

Usernames Passwords
Staff 1 – Salesperson p1 p1
Staff 2 – Salesperson p2 p2
Staff 3 – Salesperson p3 p3
Staff 4 – Manager m1 m1
Staff 5 – Manager m2 m2

  1. Input file computers.txt to download
    在这里插入图片描述
  2. Example GUI and functions narrations:
    Note: this is just a sample GUI design; you are free to design your own GUI and function flow as long as they are reasonable and complete the tasks listed in item “2.” above
    When the program runs:
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    WX: help-assignment
  • 30
    点赞
  • 22
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值