The class provided represents a item. Information about a item includes the name of the item and the count of items in Inventory (inventory count). When ordering items they are ordered in descending order by the inventory count. If items have the same inventory count then they are ordered in ascending alphabetical order by their name (a-z). Here is an example set of items: 7 Camera 5 Bicycle 5 Lego 5 Robot 3 Tricycle The Item class is missing a required method. Write the missing method in the space provided below. public class Item implements Comparable private String name; private int count; public Item (String nameIn, int count In) ( name In; } name count count In;

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter10: Introduction To Inheritance
Section: Chapter Questions
Problem 9RQ
icon
Related questions
Question
100%
The class provided represents a item. Information about a item includes the name of the item and
the count of items in inventory (inventory count). When ordering items they are ordered in descending order
by the inventory count. If items have the same inventory count then they are ordered in ascending
alphabetical order by their name (a-z). Here is an example set of items:
7 Camera
5 Bicycle
5 Lego
5 Robot
3 Tricycle
The Item class is missing a required method. Write the missing method in the space provided below.
public class Item implements Comparable<Item> {
private String name;
private int count;
public Item (String nameIn, int count In) {
name
name In;
count countIn;
}
Transcribed Image Text:The class provided represents a item. Information about a item includes the name of the item and the count of items in inventory (inventory count). When ordering items they are ordered in descending order by the inventory count. If items have the same inventory count then they are ordered in ascending alphabetical order by their name (a-z). Here is an example set of items: 7 Camera 5 Bicycle 5 Lego 5 Robot 3 Tricycle The Item class is missing a required method. Write the missing method in the space provided below. public class Item implements Comparable<Item> { private String name; private int count; public Item (String nameIn, int count In) { name name In; count countIn; }
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Reference Types in Function
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT