Question: Write a simple Java program that 1:) Asks the user to pick a shape: (Square, Triangle, or Circle) 2:) Asks what color they would like

Write a simple Java program that

1:) Asks the user to pick a shape: (Square, Triangle, or Circle)

2:) Asks what color they would like their shape (Red, Blue, or Green)

3:) Asks the user how many they would like (1, 2, or 3)

Then using paint() method as well as drawString() method. Here are some more specifics and guidelines for this prompt:

Your paint() method should be implemented as follows:

1. Your paint() method should display the logo in the window for the user.

2. Your logo should use at least three colors. Regardless of the users input, the drawing should always have at least three distinct colors.

3. The details of the logo should reflect the choices that the user made.

4. The elements of the drawing should be recognizable

5. Make sure your logo has a title that is drawn using the drawString() method.

Second Helper Method You should implement a helper method that draws a particular element of your logo at a given location.

1. Create a method that, when given a Graphics object and x and y coordinates (as two ints), draws a particular element of the logo at the given position. You are welcome to write your method so that it requires additional arguments such as a size and/or color. The starter file shows an example of a method to draw a tree. Your program should do something different.

2. It should be possible to run your program so that your paint() method calls your helper method at least twice with different arguments. It's ok if some user input will cause the method to only be called once or not at all, as long as some user inputs will create two or more calls to your helper method.

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 Databases Questions!