Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Download: http://solutionzip.com/downloads/computerpart-c-sharp/
- Write a ComputerPart class and a ComputerKit class (and a client class (Form) to test them).
- The ComputerPart class has two instance variables: a String representing an item (for instance, “cpu” or “disk drive”), and a double representing the price of that item. The ComputerKit class has just one instance variable: an ArrayList of ComputerPart objects (they make up a computer) representing the list of parts for the computer kit.
- You should include the following methods to the ComputerKit class
- ? a method returning “expensive” if the total of the prices of the ComputerPart objects is greater than 1,000,“cheap”if it is less than 250,“normal”if it is between 250 and 1,000
- ? a method returning true if a certain item is included in the list of parts; false otherwise
- ? a method returning how many times a particular item (for instance,“cpu”, or “memory”) is found in the list of parts
- Download: http://solutionzip.com/downloads/computerpart-c-sharp/
Add Comment
Please, Sign In to add comment