Question
I need help studying and these are some of the JAVA questions that I am stuck on: 1. Write a class called rectangle that has
I need help studying and these are some of the JAVA questions that I am stuck on:
1. Write a class called rectangle that has a field called width, height, and area.
1a. Create constructors (create a default constructor and different argument constructors), getter and setter methods, increase width by 5 methods, and increase height by 5 method.
1b. Create a testRectangle class that tests each constructor and method.
2. Print all prime numbers from 1-100
3. Write a program that prints out a breakdown of an integer into a sum of numbers that have just one non-zero digit. For example, given 43018 it should print 40000 + 3000 + 10 + 8.
4. Write a class called Coffee that has fields called type_of_coffee, size, price.
4a. Create constructors (create a default constructor and different argument constructors), getter and setter methods, increase price method, and decrease price method.
4b. Create a tester class to test each constructor and method.
5. Print the numbers from 1 to 100. For every number that is divisible by 4 and 5, print divisible
6. Print every even number from 1- 100. When the number is also divisible by 3, print java.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started