Your Perfect Assignment is Just a Click Away

We Write Custom Academic Papers

100% Original, Plagiarism Free, Customized to your instructions!

glass
pen
clip
papers
heaphones

I need help for my java homework

I need help for my java homework

Question Description

I will provide more information later, but the assignment is

This is a very short assignment whose purpose is having you add several methods to the existing Tally class as defined in Tally.java and available as a file as part of this assignment. Your task is to add instance methods to the Tally class as specified below.

Specifications:
Add an instance method and variable that will allow the Tally class to place a maximum limit on the count possible. Modify the Tally class code to allow a maximum to be set after object instantiation. Also modify Tally class code so the constructor can take an argument that is the maximum size for a counter object. You should make sure that any other methods that change the count will not go above the limit. Notify the user they try to go over the maximum limit.

Add another instance method that undoes the last count increment operation. Be sure to check the value of the count and do NOT let it ever be less than zero. Be sure to notify the user if they try to make the count less than zero.

Lastly, add an instance method to the Tally class code that will report back the remaining space in our counter. (for instance, if the maximum count is 100 and the current count is 20, there is room for 80 more tallies.

You should test your class file with the TallyHoTester.java program provided with this assignment. You can add tests and see that all your class instance methods work correctly.

Write you modifications and rename the class and file with the new name TallyHo.java with the public class TallyHo. Submit your assignment with the name TallyHo.java.

This is a short assignment and should take only an hour. The total lines of code to write is less than 20 lines.

Order Solution Now

Our Service Charter

1. Professional & Expert Writers: School Assignment only hires the best. Our writers are specially selected and recruited, after which they undergo further training to perfect their skills for specialization purposes. Moreover, our writers are holders of masters and Ph.D. degrees. They have impressive academic records, besides being native English speakers.

2. Top Quality Papers: Our customers are always guaranteed papers that exceed their expectations. All our writers have +5 years of experience. This implies that all papers are written by individuals who are experts in their fields. In addition, the quality team reviews all the papers before sending them to the customers.

3. Plagiarism-Free Papers: All papers provided by School Assignment are written from scratch. Appropriate referencing and citation of key information are followed. Plagiarism checkers are used by the Quality assurance team and our editors just to double-check that there are no instances of plagiarism.

4. Timely Delivery: Time wasted is equivalent to a failed dedication and commitment. School Assignment is known for timely delivery of any pending customer orders. Customers are well informed of the progress of their papers to ensure they keep track of what the writer is providing before the final draft is sent for grading.

5. Affordable Prices: Our prices are fairly structured to fit all groups. Any customer willing to place their assignments with us can do so at very affordable prices. In addition, our customers enjoy regular discounts and bonuses.

6. 24/7 Customer Support: At School Assignment, we have put in place a team of experts who answer all customer inquiries promptly. The best part is the ever-availability of the team. Customers can make inquiries anytime.