Create a new class, called ConstantList that stores a "constant" list of integers (ints).Dnce created the list is fixed (none of the items can be changed, no items can be added or removed, the order...


Create a new class, called ConstantList that stores a

Extracted text: Create a new class, called ConstantList that stores a "constant" list of integers (ints).Dnce created the list is fixed (none of the items can be changed, no items can be added or removed, the order is fixed). Use an array to store your list. Your class will have a single constructor that takes an array of ints as input that will be used to specify the constant list. You must provide appropriate methods to give the user of your class access to the list elements. A user should be able to access individual elements (by position) and the entire list of numbers. Your class must use encapsulation. Explain how your solutions solves the problem. That is, explain why your ConstantList really is a constant list of numbers.

Jun 08, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here