I want it to do written in Java.
6- (0.12 point) Output the result of the following expression using the System.out.println and refer
to figure below for run
7- (0.1 point) Output the max xcoodinate of the rectangle, see below.
8- (0.07 point) Create an ArrayList object arr1 ;
9- (0.1 points) Add your first name to the arr1, it will be added to the index 0 of the ArrayList
10- (0.2 point) Declare an ArrayList arr2; and then make arr2=arr1; then add your last name to arr2 11- (0.23 point) use get method to get the first element of arr2 and then System.out.println this
element, briefly explain the result.
12- (0.22 point) Use size method to get the number of String that has been added to arr1 and use
that get the last element of arr1
Hi ,
I am sorry I did not submit all the question I want just from 7 to 12 thank you so much
1- (0.07 point) Prompt the use to enter a number to represent the length of a rectangle by using
the system.out.println command. See figure below for the execution of the code
2- (0.23 point) Use the Scanner class and create a scan object that allows you to scan user input,
hint to scan user inputs the Scanner Constructor parameter should be System.in.
Read the user input as integer using the scan object and stored it in a variable length.
3- (0.2 point) Prompt the user to enter the width (you can refer to the code below) and read user
input using the same scan object and store the value in a created width.
4- (0.3 point) Create a Point object locate at (1,2) and create a Dimension object using the length
and width entered by the user. Than create a Rectangle object that uses point1 and dimension
5- (0.15 point) Create an area variable that stores the area of a rectangle and calculate the area of
the rectangle you create in 4 and output the area. Hint to get the length and width use the
getter from the Rectangle class.
6- (0.12 point) Output the result of the following expression! $%&'(
)*+,'(-. using the System.out.println
and refer to figure below for run
7- (0.1 point) Output the max xcoodinate of the rectangle, see below.
8- (0.07 point) Create an ArrayList object arr1 ;
9- (0.1 points) Add your first name to the arr1, it will be added to the index 0 of the ArrayList
10- (0.2 point) Declare an ArrayList arr2; and then make arr2=arr1; then add your last name to arr2
11- (0.23 point) use get method to get the first element of arr2 and then System.out.println this
element, briefly explain the result.
12- (0.22 point) Use size method to get the number of String that has been added to arr1 and use
that get the last element of arr1
1h 4:46 PM Wed 10 Feb high 5- (0.15 point) Create an area variable that stores the area of a rectangle and calculate the area of (vct the rectangle you create in 4 and output the area. Hint to get the length and width use the getter from the Rectangle class. len th x Width 6- (0.12 point) Output the result of the following expression using the System.out.println and refer to figure below for run 7- (0.1 point) Output the max xcoodinate of the rectangle, see below. 8- (0.07 point) Create an ArrayList object arr1 ; 9. (0.1 points) Add your first name to the arr1, it will be added to the index 0 of the ArrayList 10- (0.2 point) Declare an ArrayList arr2; and then make arr2=arri; then add your last name to arr2 11- (0.23 point) use get method to get the first element of arr2 and then System.out.println this element, briefly explain the result. 12- (0.22 point) Use size method to get the number of String that has been added to arr1 and use that get the last element of arr1 Please enter an length tor the rectangle 5 Please enter an width for the rectangle 2 The are of the rectangle is: 10.0 The expression value is: 1 The maxium xcoordinate is: 6.0 arr2 first element is: Ola arri last element is: Tannous