Sale!

(Solved) : Need Java Class Storing Last Ten Integers Added Class Named Lastten Class Implement Two Pu Q34196813

$ 16.00

Answer to I need this in Java: /** * Class for storing the last ten integers added. * * Your class should be named LastTen. * * Yo…

SKU: a9385b2569c9 Category:

Description

I need this in Java:

/**
* Class for storing the last ten integers added.
*
* Your class should be named LastTen.
*
* Your class should implement two public methods as describedbelow:
* 1. void add(int newValue):
* add a new integer to the values that we are rememebring
* 2. int[] getLastTen():
* return the last ten values that were added using add, in anyorder.
* If fewer than ten values were added, you should return zeros intheir
* place.
*
* Examples:
* 1. add(1), add(2)
* getLastTen: [1, 2, 0, 0, 0, … ]
* 2. add(0), add(1), add(2), … add(10)
* getLastTen: [1, 2, 3, 4, … 10]
*<... View full description