Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Object-Oriented Programming OvalDraw Plus Summary: Create a graphical application with Java that that draws an oval Prerequisites: Java, VS Code, and Terminal Create a graphical

Object-Oriented Programming

OvalDraw Plus

Summary: Create a graphical application with Java that that draws an oval

Prerequisites: Java, VS Code, and Terminal

Create a graphical Java application that runs on Microsoft Windows and MacOS that draws an oval centered in the main application window when the programming starts. The oval should automatically resize and reposition itself when the window is resized.

In this activity you will start with our OvalDraw application in our sample code, review the code, and then make incremental improvements to the application. Be sure to make the resulting application uniquely your own by adding standard comments at the top application (i.e. your name, class, etc.), changing the names of variables, and adding small features. Finally, be sure to save your work as you will often be asked to submit it as part of an assignment.

Be sure to review the example OvalDraw project in the Java section of our example code repository.

Requirement 1: Create an application that:

1. Is implemented in a single Java (.java) file named OvalDrawPlus.java

2. Successfully compiles with javac *.java" and successfully executes with java OvalDrawPlus

3. Has a simple yet an aesthetically pleasing user interface

Requirement 2: Be sure that the application also:

1. Opens a resizable main window with an initial height of 500 and a width of 400

2. Positions the upper left corner of the main window at 250 units from the left and 150 units from the top of the screen

3. Prints Starting OvalDrawPlus... in the terminal window when the application starts

Requirement 3: Enhance the application so that it:

1. Draws an oval with a filled color other than red, blue, or black when the application starts

2. Centers the oval so that it touches each edge of the window

3. Resizes the oval when the application window is resized

Requirement 4: Finally enhance the application so that it:

1. Draws a dark blue rectangle directly behind the oval

2. Utilizes constants at the top of the file to define the rectangle color

3. Prints Closing OvalDrawPlus... in the terminal window when the application is exited

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Explain the sources of recruitment.

Answered: 1 week ago

Question

Differentiate sin(5x+2)

Answered: 1 week ago

Question

Compute the derivative f(x)=1/ax+bx

Answered: 1 week ago

Question

What is job enlargement ?

Answered: 1 week ago