Question: 1 . Use Eclipse IDE to do the following: a . Start Eclipse. b . Please create a new project and name your new project

1. Use Eclipse IDE to do the following:
a. Start Eclipse.
b. Please create a new project and name your new project as:
COSC241_Project3_
c. Under this project folder, create a Project3 Java file. In Project3 class you will
create a class method called test. In the test method do the following first:
Vector";
vector.add(primitiveInt);
vector.add(wrapperInt);
vector.add(str);
vector.add(2,2138);
System.out.println("The elements of vector: "+ vector);
System.out.println("The size of vector is: "
+ vector.size());
System.out.println("The elements at position 2 is: "
+ vector.elementAt(2));
System.out.println("The first element of vector is: "
+ vector.firstElement());
System.out.println("The last element of vector is: "
+ vector.lastElement());
vector.removeElementAt(1);
System.out.println("The elements of vector: "+ vector);
System.out.println("The size of vector is: "
+ vector.size());
System.out.println("The elements at position 2 is: "
+ vector.elementAt(2));
System.out.println("The first element of vector is: "
+ vector.firstElement());
System.out.println("The last element of vector is: "
+ vector.lastElement());
Note: Please type in the above lines by yourself and think about why it can
work this way and add appropriate import statements.
COSC241 Project 3
Page 2 of 2
d. Insert three random integers into the vector and print out all the elements of the
vector.
e. Remove all the elements at the odd indices (about half of the elements) of the
vector and print out all the elements left in the vector.
f. Under the same project folder, please create a new Java file named: Main.
g. Please create a static void main method inside the Main class.
h. In the main method of the Main class pass the command line arguments to the
test method of the Project3 class: Project3.test().
i. Save your files, test the above program, and debug if needed.

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!