Reference no: EM132366555
Applications Programming Assignment -
Topics: OO Design, Standard Patterns, Lists
Individual Work - All work is individual. You may discuss ideas, approaches and problems, but you should write every line of code yourself except for code copied from the lecture notes, lecture code or lab code. You MUST NOT let another student see your solution code, and you MUST NOT look at another student's solution code.
Overview - Computer Store - A Computer Builder System
A friend of yours is setting up a computer building business, to help customers decide on what components they want in their system. Your friend has cajoled you, with the promise of cold pizza and fat coke, into writing some software to help this process.
The aim is to increase profits and makes their products more accessible to their customer base. This requirement is urgent, as competitor have heard the rumors of this state-of-the-art system and they have also started working on similar prototypes.
Specification - The system should keep a catalogue of available parts, which can be displayed to the user, updated and filtered by type or price (or both).
The system should also allow the user to build a computer (more accurately a parts list) from parts in the catalogue, add and remove parts from the build, clear the build, and see the build (including the total cost).
The interface for the prototype will be a simple text interface, where parts are identified by their position in the catalogue/build.
As an advanced feature, your friend would like the user to be able to add several parts in one go.
Your friend has provided you with a nicely typed out text demonstration of how the system should work, along with some tests (... yet did not just code it...) to help.
An aside
While reading the first part of the specification, you will notice there is a lot going on.
- How many functions did you identify?
- How many classes did you identify?
- What are the fields in each class?
- How many goals did you identify?
- How many patterns did you think of that might be applicable?
This assignment will be challenging and you will probably want to manage your time well.
- How long do you think it will take you to code the functions?
- How long do you think it will take you to code each goal?
A good rule of thumb is to think of an estimate, and then multiply that number by 3 or 4!
To manage your time well, you may need to figure out which parts of the assignment you can start early.
- Which parts can you start now?
- Which parts can you start in week 6?
If you complete parts in the same week that you learn the topics (while they are fresh in your mind), they will take less time to complete.
Requirements -
Your design will consist of exactly the following classes with the listed fields, declared as indicated. You may not add or remove classes or fields; however, you may add constructors, functions and procedures to complete your design (in fact, you will have to!). You should pay careful attention to the tests on PLATE, as these will help guide you with some (but not all) of these methods.
To help visualize the design, a partial class diagram has been provided (attached).
Classes - your design will consist of these 5 classes:
1. ComputerBuilder
2. Build
3. Catalogue
4. Part
5. In (this is just the class you've been using throughout the labs to facilitate simpler I/O - just copy it over)
The fields also have some additional requirements and structures:
Lists all have the abstract type of List<>, but must be instantiated with a concrete type that implements the List<> behavior (you will see two of these in week 6, you can choose either - you may also want to think about why you might do things this way).
The type String in Part is stored in lowercase.
Constructors - the constructors of the class have the following requirements:
1. All constructors initialize the fields of their class.
2. The ComputerBuilder constructor takes no parameters.
3. The Catalogue constructor takes no parameters, but will add some initial Parts to the catalogue:
Name
|
Type
|
Price
|
evo 860
|
storage
|
155.00
|
daskeyboard
|
Keyboard
|
239.00
|
i5
|
cpu
|
365.00
|
Corsair 16G
|
memory
|
299.00
|
ASUS ROG
|
motherboard
|
159.00
|
sheetmetal box
|
case
|
39.00
|
Ryzen 7
|
cpu
|
299.00
|
4. The Build constructor takes no parameters.
5. The Part constructor takes three parameters, corresponding to the name, type and price, with the same types as the respective fields.
- toString() - Catalogue, Build and Part will each have a toString() function, see the I/O trace and tests for the formats.
- The main method of the program will be in the ComputerBuilder class.
Java assignment need a code to be written according to certain specifications.
Attachment:- Applications Programming Assignment File.rar