GBIS710 - Project 2 - Specifications

Click Refresh (F5) to make sure you have the latest version of this page

In this project, you are going to write three independent classes.

Step 1. Write class TriangleDisplay() -- (10 points)

Step 2. Write class FileReverse() -- (20 points)

Step 3. Write class SliderDemo() -- (10 points)

Step 4. Compile and Test all your classes.

Step 5. Zip all you java files and your bat file into a single zip archive named Project200.zip.

Step 6. Submit your zip archive to Blackboard.

Step 7: Watch videos (10 points)

TriangleDisplay specifications:

Write an application that displays five randomly generated triangles in different colors.
Each triangle shold be filled with a different color.
Use class GeneralPath and moethod fill of class Graphics 2D to draw the triangles.

FileReverse specifications

Write a program that inputs a file named prj2.txt and uses a stack to display the words in the file in reverse order.
Store file prj2.txt in the same directory as your java source code and class files
Display the results any way you want.
The above will get you 15 points of out the 20 possible points
Next, enhance your program so that is does not display any punctuation marks
Build an array of punctuation marks to be excluded and then use this array.
This will earn you the final 5 points.

SliderDemo specifications:

Write a program that uses the paintComponent method to draw the current value of a Jslider on a subclass on Jpanel.
In addition, provide a JTextField where a specific value can be entered.
The JTextField should display the current value of the JSlider at all times.
Changing the value in the JTextField should also update the JSlider.
A JLabel shuld be used to identify the JTextField.
The JSlider methods setValue and getValue should be used
Note: The setValue method is a public method that does not return a value and takes one integer argument, the JSlider value, which determines the position of the thumb