INTRODUCTION

This document describes Assignment 2 for Programming Fundamentals. The assignment will require you to write classes to represent a database for computer parts. You will be required to write an inheritance structure for computer parts. You will be required to output those objects to a text file as comma separated values (CSV), and read the comma separated values back into the program parsing them into objects. The program will also require a text-based user interface that allows users to select and record computer parts that they want to buy.

This document describes the classes, fields and methods required. It describes the format of the CSV files. It also shows examples of the textual user interface which you will need to replicate.

PACKAGES

computer_parts

The computer_parts package contains the ComputerPart class and classes that are derived from it, including CPU, GraphicsCard, Memory and Storage. Each class contains variables to record that computer part's specifications, such as price and speed, and getters and setters for them. They also contain methods for inputting these variables on the keyboard and outputting and inputting the part from a text file. The methods that all computer parts must implement are toString, toCSVString and the static methods parse and input.

The static input method should be implemented in each child of ComputerPart. It should ask the user to input a value for each of that class' variables on the keyboard and use these values to construct and return a new object. For example, the input method in the CPU class should ask the user to enter a value for the name, price, frequency and number of cores. It should then use the values entered on the keyboard to construct and return a new CPU.

ToCSVString should simply return the name of the class followed by each of the object's values separated by commas. For example, a Storage object may return the CSV string, "Storage,64.99,1000,HDD", where Storage is the class name, 64.99 is the price, 1000 is the capacity in gigabytes and HDD represents the type of storage, Hard Disk Drive. This CSV String is intended to be written to a file where each line contains the CSV String for a different part.

The static parse method should be implemented in each child of ComputerPart. It should take an argument CSV String and use it to construct and return a new instance of that class. For example, the GraphicsCard parse method may take the String, "GraphicsCard,AMD Radeon R9 Fury,399.99,1000,4". It should construct and return a GraphicsCard with the name, AMD Radeon R9 Fury, the price $399.99, the frequency 1000MHz and the capacity 4GB.

data_structure

The data_structure package contains two classes: PartList and WishList. PartList is the parent class of WishList. PartList will be used to simulate the database of ComputerParts. Users will construct a WishList and fill it with items selected from the database. Both the PartList and WishList will have methods to save their contents to a CSV file.

PartList is a class containing a partially filled array of ComputerParts. It contains methods to append ComputerParts to the array. It contains methods to get or remove ComputerParts from the array using either the name or index to specify which item. There is a method to move all the nulls to the end of the array if an item was deleted from the middle. While using the application, users may add items into the PartList using the keyboard and get items from it to fill their WishList.

The WishList class extends PartList. It has additional methods to give the user of the database extra information about the parts they have selected. The WishList class contains a method called isComputer that will return true if the WishList contains at least 1 CPU, GraphicsCard, Memory and Storage. The user can call this method to know if they have selected (almost) all the parts they need to build a computer. It also contains a method called calculateTotal that returns the sum of all the parts' prices

user_interface

The user_interface package contains two classes: CommandPrompt and InputUtil. The command prompt is a text based application which allows the user to add items to the database and list the items that are currently inside. It also allows the user to create a WishList by adding items from and then save it to a CSV file. InputUtil is a class that only contains static methods. These methods should allow the user to easily take keyboard input for Strings, ints and doubles and handle any errors that occur.

When the CommandPrompt is constructed, it should automatically construct a PartList and fill it with items that it reads from a CSV file called "database.txt". This PartList will act as the application's database. The CommandPrompt is a text based application. It will ask if the user wants to create a new wish list, open a wish list from file, list the database items, add a new part to the database or exit the application. When the user decides to quit the application, the PartList should be automatically saved to the same database.txt file in CSV format.

If the user would like to add a part to the database, they will be asked which type of part they want to add, CPU, Graphics Card, Memory or Storage, or return to the main menu. When the user selects the part type, it should call the static input method from the appropriate ComputerPart class to construct and return a new item. This item should then be added to the PartList database.

If the user wishes to create a new wish list, the application will take them to a menu that will ask them whether they would like to add a part from the database, remove a part from the wish list, print the wish list items or save the wish list and return to the main menu. If the user selects to add a part, the application will display all the database items in a list and they will be asked to input the name of the part they want to add. The program will search for a part with that name and add it to the wish list if it exists. If the user selects to remove a part from the wish list they will be asked for the name of the part and that part will be removed if it exists. If the user wishes to return to the main menu, they will be asked for a file name. The wish list will be saved to a file with that name in CSV format.

If the user wishes to open a wish list from file, they will be asked for a file name. The application will open the file with that name, parse each line to an appropriate ComputerPart, and append the parts to a new WishList. The user will then be taken to the same menu wish list menu that they would see when creating a new wish list; a menu asking them whether they would like to add a part from the database, remove a part from the wish list, print the wish list items or save the wish list and return to the main menu.

Any keyboard input that is required from either the CommandPrompt or ComputerPart classes can be obtained from the InputUtil class. InputUtil has a static method to take input for each of String, int and double. These methods take an argument prompt and print this prompt before asking for input. In the case of error, these methods will print an error message and ask for input again.

There is an additional input method for each datatype that allow the user to enforce further constraints on the input value. There is another inputString method that takes a String array of valid options as an argument. If the input value is not one of the valid options, it will print an error message and ask for input again. There is another inputInt method that takes an Integer min and Integer max as arguments and another inputDouble method that takes a Double min and Double max as arguments. Both methods will print an error message and ask for input again if the input value is outside the range of min and max. These methods should be used whenever input is required from the ComputerPart and CommandPrompt classes.

CSV FILE

You have been provided with a file called database.txt. This file should be read into a PartList at the start of the program. Each line starts with the computer part type; CPU, GraphicsCard, Memory, or Storage. It is followed by the variables for that type separated by commas. There are no spaces surrounding the commas. Your parse methods should split the String at the commas, parse each token to the appropriate datatype and use these values to construct and return an object of the appropriate type.

The file may look like this:

CPU,AMD Ryzen 5,119.99,4,3.2
CPU,AMD Ryzen 3,97.99,4,3.7
CPU,Intel Core i5,234.96,4,3.3
CPU,Intel Core i7,679.0,8,3.6
CPU,Intel Core i9,2005.0,18,2.6
CPU,Intel Xeon Platinum,13000.0,28,2.0
CPU,AMD Ryzen Threadripper,899.99,16,3.5
CPU,AMD EPYC,4324.0,64,2.0
GraphicsCard,NVIDIA Quadro RTX,6300.0,1005,48
GraphicsCard,NVIDIA TITAN V CEO Edition,2999.0,1200,32
GraphicsCard,NVIDIA TITAN Xp,1200.0,1405,12
GraphicsCard,AMD Radeon R9 Fury,399.99,1000,4
GraphicsCard,AMD Radeon RX,149.99,1168,8
Memory,G-Skill Ripjaws V,112.23,8,3200,DDR4
Memory,Corsair Vengeance LED,239.0,16,3000,DDR4
Memory,Corsair Dominator Platinum,1399.0,64,3000,DDR4
Memory,G-Skill TridentZ Series,189.0,8,4266,DDR4
Memory,Kingston ValueRAM,98.0,8,1600,DDR3
Memory,Samsung CL11,49.52,8,1600,DDR3
Storage,Seagate Barracuda,60.0,1000,HDD
Storage,WD Purple,72.0,1000,HDD
Storage,WD Red,107.0,2000,HDD
Storage,Toshiba P300,115.0,3000,HDD
Storage,Seagate FireCuda,105.0,1000,SSHD

Your toCSVString methods in the ComputerPart child classes must follow this format.

CPU is the Central Processing Unit of the computer. The CSV line for CPU is "CPU,[name],[price],[cores],[frequency]". Cores are the number of smaller processing units on the CPU. Frequency is the speed of the CPU measured in gigahertz.

The line for GraphicsCard is "GraphicsCard,[name],[price],[frequency],[capacity]". Frequency is the speed measured in megahertz. Capacity is the amount of on-board graphics memory measured in gigabytes.

Memory is the volatile memory of the computer. It is otherwise known as RAM. The CSV line for Memory is "Memory,[name],[price],[capacity],[frequency],[DDR type]". Capacity is the size of the memory measured in gigabytes. Frequency is the speed measured in megahertz. DDR type is the multiple of double data rate, either DDR2, DDR3, DDR4 and so on.

Storage is the non-volatile memory of the computer. It is usually a hard disk drive or a solid state drive but can be a hybrid between them. The line for Storage is "Storage,[name],[price],[capacity],[type]". Capacity is measured in gigabytes. Type is one of HDD, SSD, or SSHD.

CLASSES

The classes that you are required to write are split into three packages: computer_parts, data_structure, and user_interface. You have been provided with the InputUtil class but you will need to write the others. The following lists the variables and methods that are required for each class in each package. Note the accessibility level of each member is indicated by a symbol where + means public, - means private, # means protected and ~ means package access.

Package computer_part

Abstract Class ComputerPart

Fields:
- name : String
The part name.
- price : double
The price of this item as a dollar value

Methods:
+ ComputerPart(name : String, price : double) < < constructor > >
Initialize the fields to the given arguments.
+ getPrice() : double
Return the price variable.
+ getName() : String
Return the name variable.
# setName(name : String) : void
If the argument is not null, set the name variable to the argument name.
# setPrice(price : double) : void
If the argument is greater than zero, set the price to the argument price
+ toString() : String
Return the variables as a String, for example “Intel i7 $990.00”. The price must be formatted to represent a
dollar value.
+ toCSVString() : String < < abstract > >
Return the name of the class followed by each of the class variables separated by commas.
Because this method is abstract, you will have to extend the class before you are allowed to write this code.

Class CPU < < extends ComputerPart > >

Fields:
- cores : int
The number of sub-processing units in this CPU.
- frequencyGHz : double
The speed of the CPU measured in Gigahertz.

Methods:
+ CPU(name : String, price : double, cores : int, frequency : double) <>
Initialize the fields to the given arguments.
+ getCores() : int
Return the cores variable.
+ getFrequencyGHz() : double
Return the frequencyGHZ variable.
# setCores(core : int) : void
If the argument is greater than zero, set the cores variable to the argument cores.
# setFrequencyGHz(frequency : double) : void
If the argument is greater than zero, set the frequencyGHz variable to the argument frequencyGHz.
+ input() : CPU < < static > >
Take Scanner input for each of the variables of CPU. Using these input values, construct and return a new
CPU.
+ parse(csvLine : String) : CPU < < static > >
You can assume the argument csvLine starts with the word CPU followed by each of its variables separated by commas. Split the csvLine into separate values and parse them to the correct data-types. Use thesevalues to construct and return a new CPU.
+ toString() : String < < overrides > >
Return the variables as a String, for example “Intel i7, 4 cores @ 3.2GHz for $990.00”. The price must beformatted to represent a dollar value.
+ toCSVString() : String < < overrides > >
Return the name of the class followed by each of the class variables separated by commas. The format of this String must be, “CPU,name,price,cores,frequencyGHz”.

Class GraphicsCard < < extends ComputerPart > >

Fields:
- frequencyMHz : int
The speed of the processing unit in the graphics card measured in Megahertz.
- memoryGB : int
The amount of graphics memory measured in Gigabytes.

Methods:
+ GraphicsCard(name : String, price : double, frequency : int, memory : int) < < constructor > >
Initialize the fields to the given arguments.
+ getMemoryGB() : int
Return the memoryGB variable.
+ getFrequencyMHz() : int
Return the frequencyMHz variable.
# setMemoryGB(gb : int) : void
If the argument is greater than zero, set the memoryGB variable to the argument gb.
# setFrequencyMHz(frequency : int) : void
If the argument is greater than zero, set the frequencyMHz variable to the argument frequency.
+ input() : GraphicsCard <>
Take Scanner input for each of the variables of GraphicsCard. Using these input values, construct and return a new GraphicsCard.
+ parse(csvLine : String) : GraphicsCard < < static > >
You can assume the argument csvLine starts with the word Graphics Card followed by each of its variables separated by commas. Split the csvLine into separate values and parse them to the correct data-types. Use
these values to construct and return a new GraphicsCard.
+ toString() : String < < overrides > >
Return the variables as a String, for example “NVIDIA GeForce 1080, 8GB @ 1607MHz for $925.00”. The price must be formatted to represent a dollar value.
+ toCSVString() : String < < overrides > >
Return the name of the class followed by each of the class variables separated by commas. The format of this String must be, “GraphicsCard,name,price,frequencyMHz,memoryGB”.

Class Memory < < extends ComputerPart > >

Fields:
- frequencyMHz : int
The speed of the memory measured in Megahertz.
- capacityGB : int
The amount of memory measured in Gigabytes.
- ddr : String
The level of Double Data Rate (DDR). This String should be one of “DDR2”, “DDR3”, “DDR4” etc.

Methods:
+ Memory(name : String, price : double, frequency : int, capacity : int, ddr : String) < >
Initialize the fields to the given arguments.
+ getCapacityGB() : int
Return the capacityGB variable.
+ getFrequencyMHz() : int
Return the frequencyMHz variable.
+ getDDR() : String
Return the ddr variable.
# setCapacityGB(gb : int) : void
If the argument gb is greater than zero, set the capacityGB variable to the argument.
# setFrequencyMHz(frequency : int) : void
If the frequency argument is greater than zero, set the frequencyMHz variable to the argument.
# setDDR(ddr : String) : boolean
If the argument String starts with the letters “DDR”, set the variable ddr to this value. Return true if it worked, return false if it did not.
+ input() : Memory < < static > >
Take Scanner input for each of the variables of Memory. Using these input values, construct and return a new Memory.
+ parse(csvLine : String) : Memory < < static > >
You can assume the argument csvLine starts with the word Memory followed by each of its variables separated by commas. Split the csvLine into separate values and parse them to the correct data-types. Use these values to construct and return a new Memory.
+ toString() : String < < overrides > >
Return the variables as a String, for example “Corsair Vengeance, 16GB, DDR4 @ 3000MHz for $239.00”. The price must be formatted to represent a dollar value.
+ toCSVString() : String < < overrides > >
Return the name of the class followed by each of the class variables separated by commas. The format of this String must be, “Memory,name,price,capacityGB,frequencyMHz,ddr”.

Class Storage < < extends ComputerPart > >

Fields:
- capacityGB : int
The amount of space in the storage measured in Gigabytes.
- type : String
The technology used for the storage. Must be one of “HDD” for Hard Disk Drive, “SSD” for Solid State Drive, or “SSHD” for hybrid Solid State Hard Disk Drive.

Methods:
+ Storage(name : String, price : double, capacity : int, type : String) < < constructor > >
Initialize the fields to the given arguments.
+ getCapacityGB() : int
Return the capacityGB variable.
+ getType() : String
Return the type variable.
# setCapacityGB(gb : int) : void
If the argument gb is greater than zero, set the capacityGB variable to the argument.
# setType(type : String) : Boolean
If the argument type is one of “HDD”, “SSD”, or “SSHD”, set the type variable to the argument. Return true if it worked, return false if it did not.
+ input() : Storage < < static > >
Take Scanner input for each of the variables of Storage. Using these input values, construct and return a new Storage.
+ parse(csvLine : String) : Storage < < static > >
You can assume the argument csvLine starts with the word Storage followed by each of its variables separated by commas. Split the csvLine into separate values and parse them to the correct data-types. Use these values to construct and return a new Storage.
+ toString() : String < < overrides > >
Return the variables as a String, for example “Seagate Barracuda, 1000GB HDD for $60.00”. The price must be formatted to represent a dollar value.
+ toCSVString() : String < < overrides > >
Return the name of the class followed by each of the class variables separated by commas. The format of this String must be, “Storage,name,price,capacityGB,type”.

data_structure

Class PartList

Fields:
- partList : ComputerPart[100]
An array of ComputerParts that can store any subclass of the ComputerPart class. By default the length should be set to 100.
- count : int = 0
Keeps track of how many items have been added to the partList. By default this value should start at zero.

Methods:
+ PartList() < < constructor > >
Initialize the fields to default values.
+ get(index : int) : ComputerPart
If the argument is greater than or equal to zero and less than the count, return the item at this position, otherwise return null.
+ get(name : String) : ComputerPart
Return the item from this list that has a name equal to the argument name. If it does not exist, return null.
+ append(part : ComputerPart) : void
Add the argument part into the next available position in the partList and increment count.
+ remove(index : int) : ComputerPart
If the argument is greater than or equal to zero and less than the count, replace the item at this position with null. Return the item that was removed. Return null if the index was out of bounds. Call the removeNulls method to shift items back down the list to remove any empty space.
+ remove(part : name) : ComputerPart
If an item with the argument name can be found in the partList, replace it with null and return it. If the name could not be found, return null. Call the removeNulls method to shift items back down the list to remove any empty space.
- removeNulls() : void
The removeNulls method should be called any time another method removes an item from the list. If an item is deleted from the middle of the list it will be replaced with null. This method should move any nulls in the middle of the list to the end.
+ size() : int
Returns the count variable.
+ saveToCSVFile(filename : String) : void
Saves the contents of the partList array to a file with the argument file name where each line in the file is the CSVString returned from each ComputerPart.
+ toString() : String < < overrides > >
Returns each item in the list on new lines. The String should be in the form:
"---- Part List ----\nitem1\nitem2\nitem3\n-------------------"

Class WishList < < extends PartList > >

Fields:
No additional fields

Methods:
+ WishList() < < constructor > >
Initialize the fields to default values.
+ calculateTotalCost() : double
Add the price of each item to a total and return it.
+ isValidComputer() : Boolean
If there is at least 1 CPU, 1 Graphics Card, 1 Memory and 1 Storage, return true. Otherwise, return false.
+ toString() : String < < overrides > >
Return the same as PartList.toString followed by the total cost formatted as a dollar value, further followed by “Valid Computer”, if it is a valid computer.

user_interface

Class InputUtil

This class has already been written for you...

Fields:
- keyboard : Scanner = new Scanner(System.in) < < static > >
This static Scanner is available to the input methods inside this class. It should never be closed.

Methods:
+ inputString(prompt : String) : String < < static > >
Print the prompt then return the next line input on the Scanner.
+ inputString(prompt : String, validValues : String[]) : String < < static > >
Print the prompt, then wait for the next line entered on the keyboard. Keep asking for input until the input String is equal to one of the values in the validValues array. When valid input is entered, return the input String.
+ inputInt (prompt : String) : int < < static > >
Print the prompt then return the next int input on the Scanner. If an exception is thrown, remove the offending String from the Scanner, print out the error message “ERROR: ”+input+” is not a valid integer”, and ask for input again. Do this until a valid int has been entered.
+ inputInt(prompt : String, min : Integer, max : Integer) : int < < static > >
Print the prompt then return the next int input on the Scanner. If an exception is thrown, remove the offending String from the Scanner, print out the error message “ERROR: ”+input+” is not a valid integer”. If an int is entered and it is less than min, print “ERROR: ” + input + “ is less than “ + min. If an int is entered and it is greater than max, print “ERROR: ” + input + “ is greater than “ + max. Min and/or max could be null, so use if statements to only check the bounds if they are not null. Keep asking for input until a valid int has been entered.
+ inputDouble (prompt : String) : double < < static > >
Print the prompt then return the next double input on the Scanner. If an exception is thrown, remove the offending String from the Scanner, print out the error message “ERROR: ”+input+” is not a valid number”, and ask for input again. Do this until a valid number has been entered.
+ inputDouble(prompt : String, min : Double, max : Double) : int < < static > >
Print the prompt then return the next double input on the Scanner. If an exception is thrown, remove the offending String from the Scanner, print out the error message “ERROR: ”+input+” is not a valid number”. If a double is entered and it is less than min, print “ERROR: ” + input + “ is less than “ + min. If a number is entered and it is greater than max, print “ERROR: ” + input + “ is greater than “ + max. Min and/or max could be null, so use if statements to only check the bounds if they are not null. Keep asking for input until a valid number has been entered.

Class CommandPrompt

Fields:
- database : PartList
Should contain parts that are read in from the database.txt file.

Methods:
+ CommandPrompt() < < constructor > >
Initialize the database as an empty PartList.
- populateDatabase() : void
Open the database.txt file and loop through each line, parsing it to the correct Computer Part type. If the line starts with CPU, call CPU.parse with your line as an argument; If it starts with Graphics Card, call GraphicsCard.parse; If it starts with Memory, call Memory.parse; If it starts with Storage, call Storage.parse.
Each returned ComputerPart should be added to the database PartList.
+ menuPrompt() : void
Print out the menu in the form:
---- Main Menu ----
1. New Wish List
2. Open Wish List
3. List Database
4. Add Part to Database
5. Close
Ask the user to enter their choice as an int. You should use your InputUtil methods to do this. 1. New Wish List should call the newWishList method. 2. Open Wish List should ask the user to input the name of a WishList file and then call the openWishList method with that input string as an argument. 3. List Database should print the database. 4. Add Part to Database should call the addToDatabase method. This menu should loop until the user enters 5. When the user decides to close, the database PartList should be written to a file called “database.txt”.
- addToDatabase() : void
Print out the menu in the form:
---- Part Types ----
1. CPU
2. Graphics Card
3. Memory
4. Storage
5. Back
Ask the user to enter their choice as an int. Again you can use InputUtil to do this. When the user selects a part type, call that part’s static input method such as CPU.input(). Add the part that is returned to the database. Continue to ask for the user’s choice until the user enters 5.
- newWishList() : void
Constructs a new WishList and calls WishListMenu with it as an argument.
- wishListMenu(wishList : WishList) : void
Print out the menu in the form:
---- Wish List ----
1. Add From Database
2. Show Wish List
3. Remove from Wish List
4. Save and Close Wish List
Ask the user to enter their choice as an int. You can use InputUtil to do this. 1. Add from Database should print the database then ask you for the name of the part you want to add. If the name matches a part in the database, it should be added to the wish list. 2. Show Wish List should print the contents of the wish list. 3. Remove from Wish List should ask you to enter the name of the part you want to remove. If the name matches a part in the wish list it should be removed. 4. Save and Close Wish List should ask you to enter the name of the wish list. If it is not an empty string the wish list should be saved in CSV format to a file with the input file name + “.txt”.
- openWishList(name : String) : void
Open and read the CSV file with the argument name and, if it exists, parse its contents into a new WishList.
Call WishListMenu with this WishList as an argument.

HOW TO START

We suggest you write your assignment in the following order:

  • Write the constructors, getters and setters for ComputerPart class and its children: CPU, GraphicsCard, Memory and Storage.
  • Write the input method and toCSVString method for each of the ComputerPart child classes. Test these methods are working correctly.
  • Write the PartList class including the saveToCSVFile method. Write a main method to check that you can add and remove items from the PartList and save the PartList to a CSV file.
  • Extend PartList into WishList and add the calculateTotal, isComputer and toString methods. Test these are working in a main method.
  • Go back to each of the CPU, GraphicsCard, Memory and Storage classes and write a parse method in each of them that takes a CSV string as an argument an uses its values to construct and return a new instance of the appropriate type. The CPU parse method should return a new CPU, the Memory parse method should construct and return a new Memory and so on
  • Write your CommandPrompt constructor and populateDatabase method. Write a main method to test that populateDatabase is able to read the database.txt file into the database PartList.
  • Write your menu prompt and addToDatabase methods. Make sure this is working in a main method.
  • Write your newWishList and wishListMenu methods. Ensure these are working and that you can save your WishList to a CSV file.
  • Write your openWishList method. Ensure you can reopen the WishList that you saved previously.
  • Ensure that the output from your CommandPrompt main method matches the section titled Sample Output.
  • Clean up your code and add comments to explain any interesting code.

SAMPLE OUTPUT

---- Main Menu ----
1. New Wish List
2. Open Wish List
3. List Database
4. Add Part to Database
5. Close
Enter an option (1-5): 0
ERROR: less than 1
Enter an option (1-5): 6
ERROR: greater than 5
Enter an option (1-5): abc
ERROR: Not an integer
Enter an option (1-5): 1
---- Wish List ----
1. Add From Database
2. Show Wish List
3. Remove from Wish List
4. Save and Close Wish List
Enter an option (1-4): 1
---- Database ----
---- Part List ----
Intel Core i9, 18 cores @ 2.6GHz for $2,005.00
Intel Xeon Platinum, 28 cores @ 2.0GHz for $13,000.00
AMD Ryzen Threadripper, 16 cores @ 3.5GHz for $899.99
AMD EPYC, 64 cores @ 2.0GHz for $4,324.00
NVIDIA TITAN V CEO Edition, 32GB @ 1200MHz for
$2,999.00
NVIDIA TITAN Xp, 12GB @ 1405MHz for $1,200.00
AMD Radeon R9 Fury, 4GB @ 1000MHz for $399.99
G-Skill Ripjaws V, 8GB, DDR4 @ 3200MHz for $112.23
Corsair Vengeance LED, 16GB, DDR4 @ 3000MHz for $239.00
Toshiba P300, 3000GB HDD for $115.00
Seagate FireCuda, 1000GB SSHD for $105.00
-------------------
Enter the name of the part to add: Seagate FireCuda
Added Seagate FireCuda, 1000GB SSHD for $105.00
---- Wish List ----
1. Add From Database
2. Show Wish List
3. Remove from Wish List
4. Save and Close Wish List
Enter an option (1-4): 1
---- Database ----
---- Part List ----
Intel Core i9, 18 cores @ 2.6GHz for $2,005.00
Intel Xeon Platinum, 28 cores @ 2.0GHz for $13,000.00
AMD Ryzen Threadripper, 16 cores @ 3.5GHz for $899.99
AMD EPYC, 64 cores @ 2.0GHz for $4,324.00
NVIDIA TITAN V CEO Edition, 32GB @ 1200MHz for
$2,999.00
NVIDIA TITAN Xp, 12GB @ 1405MHz for $1,200.00
AMD Radeon R9 Fury, 4GB @ 1000MHz for $399.99
G-Skill Ripjaws V, 8GB, DDR4 @ 3200MHz for $112.23
Corsair Vengeance LED, 16GB, DDR4 @ 3000MHz for $239.00
Toshiba P300, 3000GB HDD for $115.00
Seagate FireCuda, 1000GB SSHD for $105.00
-------------------
Enter the name of the part to add: G-Skill Ripjaws V
Added G-Skill Ripjaws V, 8GB, DDR4 @ 3200MHz for
$112.23
---- Wish List ----
1. Add From Database
2. Show Wish List
3. Remove from Wish List
4. Save and Close Wish List
Enter an option (1-4): 1
---- Database ----
---- Part List ----
Intel Core i9, 18 cores @ 2.6GHz for $2,005.00
Intel Xeon Platinum, 28 cores @ 2.0GHz for $1AMD Ryzen Threadripper, 16 cores @ 3.5GHz for $899.99
AMD EPYC, 64 cores @ 2.0GHz for $4,324.00
NVIDIA TITAN V CEO Edition, 32GB @ 1200MHz for
$2,999.00
NVIDIA TITAN Xp, 12GB @ 1405MHz for $1,200.00
AMD Radeon R9 Fury, 4GB @ 1000MHz for $399.99
G-Skill Ripjaws V, 8GB, DDR4 @ 3200MHz for $112.23
Corsair Vengeance LED, 16GB, DDR4 @ 3000MHz for $239.00
Toshiba P300, 3000GB HDD for $115.00
Seagate FireCuda, 1000GB SSHD for $105.00
-------------------
Enter the name of the part to add: AMD EPYC
Added AMD EPYC, 64 cores @ 2.0GHz for $4,324.00
---- Wish List ----
1. Add From Database
2. Show Wish List
3. Remove from Wish List
4. Save and Close Wish List
Enter an option (1-4): 1
---- Database ----
---- Part List ----
Intel Core i9, 18 cores @ 2.6GHz for $2,005.00
Intel Xeon Platinum, 28 cores @ 2.0GHz for $13,000.00
AMD Ryzen Threadripper, 16 cores @ 3.5GHz for $899.99
AMD EPYC, 64 cores @ 2.0GHz for $4,324.00
NVIDIA TITAN V CEO Edition, 32GB @ 1200MHz for
$2,999.00
NVIDIA TITAN Xp, 12GB @ 1405MHz for $1,200.00
AMD Radeon R9 Fury, 4GB @ 1000MHz for $399.99
G-Skill Ripjaws V, 8GB, DDR4 @ 3200MHz for $112.23
Corsair Vengeance LED, 16GB, DDR4 @ 3000MHz for $239.00
Toshiba P300, 3000GB HDD for $115.00
Seagate FireCuda, 1000GB SSHD for $105.00
-------------------
Enter the name of the part to add: Nividea Titan
Could not find Nividea Titan
---- Wish List ----
1. Add From Database
2. Show Wish List
3. Remove from Wish List
4. Save and Close Wish List
Enter an option (1-4): 1
---- Database ----
---- Part List ----
Intel Core i9, 18 cores @ 2.6GHz for $2,005.00
Intel Xeon Platinum, 28 cores @ 2.0GHz for $13,000.00
AMD Ryzen Threadripper, 16 cores @ 3.5GHz for $899.99
AMD EPYC, 64 cores @ 2.0GHz for $4,324.00
NVIDIA TITAN V CEO Edition, 32GB @ 1200MHz for
$2,999.00
NVIDIA TITAN Xp, 12GB @ 1405MHz for $1,200.00
AMD Radeon R9 Fury, 4GB @ 1000MHz for $399.99
G-Skill Ripjaws V, 8GB, DDR4 @ 3200MHz for $112.23
Corsair Vengeance LED, 16GB, DDR4 @ 3000MHz for $239.00
Toshiba P300, 3000GB HDD for $115.00
Seagate FireCuda, 1000GB SSHD for $105.00
-------------------
Enter the name of the part to add: NVIDIA TITAN V CEO
Edition
Added NVIDIA TITAN V CEO Edition, 32GB @ 1200MHz for
$2,999.00
---- Wish List ----
1. Add From Database
2. Show Wish List
3. Remove from Wish List
4. Save and Close Wish List
Enter an option (1-4): 23,000.00
---- Part List ----
Seagate FireCuda, 1000GB SSHD for $105.00
G-Skill Ripjaws V, 8GB, DDR4 @ 3200MHz for $112.23
AMD EPYC, 64 cores @ 2.0GHz for $4,324.00
NVIDIA TITAN V CEO Edition, 32GB @ 1200MHz for
$2,999.00
-------------------
Total: $7,540.23
Valid Computer
---- Wish List ----
1. Add From Database
2. Show Wish List
3. Remove from Wish List
4. Save and Close Wish List
Enter an option (1-4): 3
Enter the name of the part to remove: G-Skill Ripjaws V
Removed G-Skill Ripjaws V, 8GB, DDR4 @ 3200MHz for
$112.23
---- Wish List ----
1. Add From Database
2. Show Wish List
3. Remove from Wish List
4. Save and Close Wish List
Enter an option (1-4): 2
---- Part List ----
Seagate FireCuda, 1000GB SSHD for $105.00
AMD EPYC, 64 cores @ 2.0GHz for $4,324.00
NVIDIA TITAN V CEO Edition, 32GB @ 1200MHz for
$2,999.00
-------------------
Total: $7,428.00
---- Wish List ----
1. Add From Database
2. Show Wish List
3. Remove from Wish List
4. Save and Close Wish List
Enter an option (1-4): 4
Enter the file name:
ERROR: Please enter at least 1 letter
Enter the file name: Dream Computer
---- Main Menu ----
1. New Wish List
2. Open Wish List
3. List Database
4. Add Part to Database
5. Close
Enter an option (1-5): 4
---- Part Types ----
1. CPU
2. Graphics Card
3. Memory
4. Storage
5. Back
Enter an option (1-5): 3
Enter the name: Corsair Dominator Platinum
Enter the price: 1399.00
Enter the capacity in gigabytes: 64
Enter the frequency in megahertz: 3000
Enter the DDR: Drr4
ERROR: 'Drr4' is not a type of ddr
Enter the DDR: DDR4
---- Part Types ----
1. CPU
2. Graphics Card
3. Memory
4. Storage
5. Back
Enter an option (1-5): 4
Enter the name: WD Red
Enter the price: 107
Enter the capacity in Gigabytes: 0
ERROR: less than 1
Enter the capacity in Gigabytes: 2000
Enter the type (SSD / HDD / SSHD): hard drive
ERROR: 'hard drive' is not SSD, HDD or SSHD
Enter the type (SSD / HDD / SSHD): HDD
---- Part Types ----
1. CPU
2. Graphics Card
3. Memory
4. Storage
5. Back
Enter an option (1-5): 1
Enter the name: Intel Core i7
Enter the price: 679
Enter number of cores: 8
Enter the frequency in gigahertz: 3.6
---- Part Types ----
1. CPU
2. Graphics Card
3. Memory
4. Storage
5. Back
Enter an option (1-5): 2
Enter the name: NVIDIA GTX 1080
Enter the price: 549
Enter the frequency in megahertz: 1607
Enter the memory in gigabytes: 8
---- Part Types ----
1. CPU
2. Graphics Card
3. Memory
4. Storage
5. Back
Enter an option (1-5): 5
---- Main Menu ----
1. New Wish List
2. Open Wish List
3. List Database
4. Add Part to Database
5. Close
Enter an option (1-5): 3
---- Part List ----
Intel Core i9, 18 cores @ 2.6GHz for $2,005.00
Intel Xeon Platinum, 28 cores @ 2.0GHz for $13,000.00
AMD Ryzen Threadripper, 16 cores @ 3.5GHz for $899.99
AMD EPYC, 64 cores @ 2.0GHz for $4,324.00
NVIDIA TITAN V CEO Edition, 32GB @ 1200MHz for
$2,999.00
NVIDIA TITAN Xp, 12GB @ 1405MHz for $1,200.00
AMD Radeon R9 Fury, 4GB @ 1000MHz for $399.99
G-Skill Ripjaws V, 8GB, DDR4 @ 3200MHz for $112.23
Corsair Vengeance LED, 16GB, DDR4 @ 3000MHz for $239.00
Toshiba P300, 3000GB HDD for $115.00
Seagate FireCuda, 1000GB SSHD for $105.00
Corsair Dominator Platinum, 64GB, DDR4 @ 3000MHz for
$1,399.00
WD Red, 2000GB HDD for $107.00
Intel Core i7, 8 cores @ 3.6GHz for $679.00
NVIDIA GTX 1080, 8GB @ 1607MHz for $549.00
-------------------
---- Main Menu ----
1. New Wish List
2. Open Wish List
3. List Database
4. Add Part to Database
5. Close
Enter an option (1-5): 2
Enter the wish list name: Dream
ERROR: Cannot find or open 'Dream.txt'
---- Main Menu ----
1. New Wish List
2. Open Wish List
3. List Database
4. Add Part to Database
5. Close
Enter an option (1-5): 2
Enter the wish list name: Dream Computer.txt
ERROR: Cannot find or open 'Dream Computer.txt.txt'
---- Main Menu ----
1. New Wish List
2. Open Wish List
3. List Database
4. Add Part to Database
5. Close
Enter an option (1-5): 2
Enter the wish list name: Dream Computer
---- Wish List ----
1. Add From Database
2. Show Wish List
3. Remove from Wish List
4. Save and Close Wish List
Enter an option (1-4): 2
---- Part List ----
Seagate FireCuda, 1000GB SSHD for $105.00
AMD EPYC, 64 cores @ 2.0GHz for $4,324.00
NVIDIA TITAN V CEO Edition, 32GB @ 1200MHz for
$2,999.00
-------------------
Total: $7,428.00
---- Wish List ----
1. Add From Database
2. Show Wish List
3. Remove from Wish List
4. Save and Close Wish List
Enter an option (1-4): 1
---- Database ----
---- Part List ----
Intel Core i9, 18 cores @ 2.6GHz for $2,005.00
Intel Xeon Platinum, 28 cores @ 2.0GHz for $13,000.00
AMD Ryzen Threadripper, 16 cores @ 3.5GHz for $899.99
AMD EPYC, 64 cores @ 2.0GHz for $4,324.00
NVIDIA TITAN V CEO Edition, 32GB @ 1200MHz for
$2,999.00
NVIDIA TITAN Xp, 12GB @ 1405MHz for $1,200.00
AMD Radeon R9 Fury, 4GB @ 1000MHz for $399.99
G-Skill Ripjaws V, 8GB, DDR4 @ 3200MHz for $112.23
Corsair Vengeance LED, 16GB, DDR4 @ 3000MHz for $239.00
Toshiba P300, 3000GB HDD for $115.00
Seagate FireCuda, 1000GB SSHD for $105.00
Corsair Dominator Platinum, 64GB, DDR4 @ 3000MHz for
$1,399.00
WD Red, 2000GB HDD for $107.00
Intel Core i7, 8 cores @ 3.6GHz for $679.00
NVIDIA GTX 1080, 8GB @ 1607MHz for $549.00
-------------------
Enter the name of the part to add: Corsair Dominator
Platinum
Added Corsair Dominator Platinum, 64GB, DDR4 @ 3000MHz
for $1,399.00
---- Wish List ----
1. Add From Database
2. Show Wish List
3. Remove from Wish List
4. Save and Close Wish List
Enter an option (1-4): 2
---- Part List ----
Seagate FireCuda, 1000GB SSHD for $105.00
AMD EPYC, 64 cores @ 2.0GHz for $4,324.00
NVIDIA TITAN V CEO Edition, 32GB @ 1200MHz for
$2,999.00
Corsair Dominator Platinum, 64GB, DDR4 @ 3000MHz for
$1,399.00
-------------------
Total: $8,827.00
Valid Computer
---- Wish List ----
1. Add From Database
2. Show Wish List
3. Remove from Wish List
4. Save and Close Wish List
Enter an option (1-4): 4
Enter the file name: Dream Computer
---- Main Menu ----
1. New Wish List
2. Open Wish List
3. List Database
4. Add Part to Database
5. Close
Enter an option (1-5): 5
Goodbye
Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.