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 "LabIT and write a method with the following
signature: multilicationOfNumberint 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; will print:
In the class LabIT write a method "generateRandNumberLessThanint
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 LabIT 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 LabIT 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 LabIT write a method "multilicationMenu The method asks the
user to enter m followed by a number such as m that prints the multiplication of
The method does not care if its small or capital, so the output for M is similar to m
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
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: 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
A vehicle owner class should have a method to store the cars that he owns by
using a method "ownCarCar 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.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
