Question: 1 . Use Eclipse IDE to do the following: a . Start Eclipse. b . Please create a new project and name your new project
Use Eclipse IDE to do the following:
a Start Eclipse.
b Please create a new project and name your new project as:
COSCProject
c Under this project folder, create a Project Java file. In Project class you will
create a class method called test. In the test method do the following first:
Vector";
vector.addprimitiveInt;
vector.addwrapperInt;
vector.addstr;
vector.add;
System.out.printlnThe elements of vector: vector;
System.out.printlnThe size of vector is:
vector.size;
System.out.printlnThe elements at position is:
vector.elementAt;
System.out.printlnThe first element of vector is:
vector.firstElement;
System.out.printlnThe last element of vector is:
vector.lastElement;
vector.removeElementAt;
System.out.printlnThe elements of vector: vector;
System.out.printlnThe size of vector is:
vector.size;
System.out.printlnThe elements at position is:
vector.elementAt;
System.out.printlnThe first element of vector is:
vector.firstElement;
System.out.printlnThe 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.
COSC Project
Page of
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 Project class: Projecttest
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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
