Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use Java programming language Problem Definition: Write a Java application that allows its user to create 2D shapes and manipulate them. Detailed Requirements First, your

Use Java programming language

image text in transcribed

image text in transcribed

Problem Definition: Write a Java application that allows its user to create 2D shapes and manipulate them. Detailed Requirements First, your program should ask the user if he/she wants to load previous drawing work. If the user answers by yes, the previous drawing should be loaded from the text file drawing.txt saved during the last session and displayed; otherwise, the users starts with a blank canvas (drawing area) The program should then display the following menu Please, type: 1. To draw a new 2D shape 2. To remove an existing shape 3. To modify an existing shape 4. To quit If the user types 1, your program should ask for the type of the 2D shape to draw (line, rectangle, oval, arc, or polygon). Then it should get from the user all needed information for drawing the shape (color, filled or not, position, etc.) and save them in a list of drawings to be used by paint) when drawing existing 2D shapes If the user types 2, your program should ask for the ID of the shape to be removed and remove it. The ID of a shape is the order in which it has been created. If the user types 3, your program should ask for the ID of the shape to be modified and for the kind of modification to be done (change shape, change color, change position, change fill status, make the shape invisible/visible, etc.) then it executes the user request. If the user types 4, the program should ask the user if he/she would like to save the final drawing in drawing.txt, execute the user request and stop Problem Definition: Write a Java application that allows its user to create 2D shapes and manipulate them. Detailed Requirements First, your program should ask the user if he/she wants to load previous drawing work. If the user answers by yes, the previous drawing should be loaded from the text file drawing.txt saved during the last session and displayed; otherwise, the users starts with a blank canvas (drawing area) The program should then display the following menu Please, type: 1. To draw a new 2D shape 2. To remove an existing shape 3. To modify an existing shape 4. To quit If the user types 1, your program should ask for the type of the 2D shape to draw (line, rectangle, oval, arc, or polygon). Then it should get from the user all needed information for drawing the shape (color, filled or not, position, etc.) and save them in a list of drawings to be used by paint) when drawing existing 2D shapes If the user types 2, your program should ask for the ID of the shape to be removed and remove it. The ID of a shape is the order in which it has been created. If the user types 3, your program should ask for the ID of the shape to be modified and for the kind of modification to be done (change shape, change color, change position, change fill status, make the shape invisible/visible, etc.) then it executes the user request. If the user types 4, the program should ask the user if he/she would like to save the final drawing in drawing.txt, execute the user request and stop

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

Pro SQL Server Wait Statistics

Authors: Enrico Van De Laar

1st Edition

1484211391, 9781484211397

More Books

Students also viewed these Databases questions

Question

What is a new-venture team?

Answered: 1 week ago

Question

1.Which are projected Teaching aids in advance learning system?

Answered: 1 week ago

Question

What is the Definition for Third Normal Form?

Answered: 1 week ago

Question

Provide two examples of a One-To-Many relationship.

Answered: 1 week ago