Question: Exercises Create a class with the name Lab 2 _ IT 2 1 4 and write a method with the following signature: multilicationOfNumber (

Exercises
Create a class with the name "Lab2_IT214" and write a method with the following
signature: multilicationOfNumber(int number, int bound). The method prints the
multiplication table for any number passed through the parameter. Then call the
multilicationOfNumbe(..) with different examples in the main method.
multilicationOfNumber(5,10);// will print:
5*1=5
5*2=10
5*3=15
5*4}=2
5*5=25
5*6=30
5*7=35
5*8=40
5*9=45
5*10=50
In the class Lab2_IT214, write a method "generateRandNumberLessThan(int
intParameter)". It generates a random number that is less than intParameter. Then call the
method with different examples in the main method.
Hint: utilize Java libraries such as Random, or Math class to generate the random
number.
In the class Lab2_IT214, write a method "sumEven (int intParameter)". It returns integer
number that is the sum of all even numbers until the intParameter. Then call the method
with different examples in the main method.
In the class Lab2_IT214, write a method "getMax (int firstNumber, int secondNumber,
int third)". It returns maximum number out of the three number. Then call the method
with different examples in the main method.
In the class Lab2_IT214, write a method "multilicationMenu()". The method asks the
user to enter " m " followed by a number such as " m " that prints the multiplication of 5.
The method does not care if its small or capital, so the output for "M 5" is similar to "m
5". The menu continues to ask the user for new entry but will exit if " e " is entered.
Hint: for simplicity, the multilicationMenu prints the multiplication of a number till 10.
Write a class to represent cars called "Car", and a vehicle owner class (name, age,
address) to allow a person to own a car or more. The car class has the following:
a. Make
b. Name
c. Year
d. Mileage
e. isAutomatic
f. color
g. type
h. plate (digits and letters)
i. VIN: 17 characters (digits and letters) that act as a unique identifier for the
vehicle.
Note:
Write setters and getters for each attribute.
A vehicle owner class should have an array of cars as an attribute. Max car can be
set to 100.
A vehicle owner class should have a method to store the cars that he owns by
using a method "ownCar(Car aNewCar)". The method adds a new car to the cars
that the owner already has.
A vehicle owner cannot own two cars, which have identical VIN.
Use different examples of cars and owners in the main method.
Exercises Create a class with the name "Lab 2 _

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!