You are on page 1of 3

Workshop 1

1. Write a Java program:


• Find the index of an array element.
• Remove a specific element from an array.
• Insert an element (specific position) into an array.
• Find the maximum value of an array.
• Find the minimum value of an array.
• Find the duplicate values of an array of integer values.
2. Write a Java program:
• Enter the full name.
• Split the full name into first name and last name.
• Capitalize the full name.

Workshop 2
1. A class called Point is designed as shown in the following class diagram.
It contains:
• Two private instance variables: x (of the type double) and y (of the type
double), with default 0.0 and 0.0, respectively.
• Two overloaded constructors: a default constructor with no argument, and
a constructor that takes 2 double arguments for x coordinate and y coordinate.
• Two public methods: getX() and getY(), which return the x coordinate and
the y coordinate of this instance, respectively.
Implement Point class based on the definition.

2. Implement the Triangle class is defined as the following figure.

You might also like