1.Implement the CashRegister class so that it keeps track of the total price as an integer. For example, instead of storing a floating-point 17.29, store the integer 1729. Do not change the public interface of the class.

2. Implement a test class for it

3.Implement the class IntSequence that receives an unknown number of inputs from a user. Inputs will be whole numbers only. The user should input the value 0 to signify the input of values is complete. Once all values have been input, the following should be displayed: 1) The average value of all inputs 2) The smallest value input 3) The largest value input 4) The range (largest smallest) of values input. IntSequence - caveats The code for inputting numbers from the user should only be written once The program should not use arrays to store values input, or for any other reason. Because of the simple nature of the program additional methods are not required, however they can be used. It can be assumed the user will only enter whole numbers and will enter at least one number, error checking for other cases is not required.

4.Write a program that enters Bicycles into a system designed in a similar way to Boris Bikes . When new cycles are entered they will automatically be assigned a unique ID, but will not be at a pick up point (docking station). You will have to assign a docking station ID to each new cycle entered. Enter three cycles into your program. Print out each cycles ID number and location. If the location is set at zero, it is presumed the cycle is out for hire. Finally print out the number of cycles in the system. The Cycle class should have the variables: Private data: Two instance variables ID which represents a unique ID of the cycle. dockingStationID which represents an ID of the docking station if the cycle is parked or 0 if it is in use. One class variable lastAssignedNumber which stores the last number assigned to a newly created instance of Cycle.

5.Implement the method reverseArray2 that reverses the sequence of elements in an array: For example, if you call the method with 1 4 9 16 9, the array is changed to 9 16 9 4 1. Note: For this method you are storing the reversed values back into the original array, not creating a new array.

6.Implement a method that returns the alternating sum of all elements in an array (that is, the sum of all elements with odd indexes minus the sum of all elements with even indexes). For example, if you call it with 1 4 9 16 9 then it returns 1 - 4 + 9 - 16 + 9 = -1.

7.Implement a class Person (a person has a name and a year of birth). Change the class student so that it extends Person. Then implement another subclass Tutor of Person (a tutor has a salary). For the classes, write the class declarations, the constructors and the method toString() for all classes. Implement a program that tests these classes and methods.

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.