Your Perfect Assignment is Just a Click Away

We Write Custom Academic Papers

100% Original, Plagiarism Free, Customized to your instructions!

glass
pen
clip
papers
heaphones

Programming in Java ArrayLists Polymorphism Presentation

Programming in Java ArrayLists Polymorphism Presentation

Description

In this project, you will create a very simple drawing app. The focus is on ArrayLists, exception
handling, and the use of mouse listeners. Your solution will also make use of Encapsulation, Association,
Inheritance, and Polymorphism.

The app you create must be capable of drawing two kinds of shapes on a canvas. The two shapes should
inherit from a common superclass (you can use the Square, Circle, and GeometricObject classes given or
you can create your own). The user must be able to configure the parameters of the shape and must be
able to draw it by pressing a button or by clicking or dragging the mouse on the canvas.

Below is a UML class diagram for the code you are given for this assignment. You can adapt it as you
wish to suit your needs. At the very least, you will need to add lines to throw exceptions if the user tries
to create a shape with out of range or null parameters.
You don’t have to hand in a class diagram and you don’t have to implement what is shown below
exactly. In this example, PaintApp would store shapes in an ArrayList<GeometricObject> object.

The screen capture below shows a very bare-bones version of the app. Your app should not look exactly
like the one below. You should try to put some thought into what would make an attractive and usable
design.

The user must be able to configure the color, size and location of a shape and then draw it. The location
fields will only be used when the Draw button is pressed. Otherwise, it uses the mouse location.
If the user presses the Square or Circle button, drawing changes from squares to circles. When the user
presses the Undraw button, it removes the last shape drawn (it’s in the ArrayList) and then clears the
canvas and redraws everything to remove the shape. It should be possible to keep pressing Undraw and
removing shapes until the canvas is empty.

It should be impossible for the user to trigger an exception. When the user clicksDraw, clicks on the

canvas, or drags the mouse on the canvas, any possible exceptions (badly formatted fields, out of range
color values, etc.) should be caught and the user should get an error message in a label that specifies:
1. The name of the field that caused the error.
2. The nature of the error (out of range vs. non-numeric)
If more than one field causes an error, you only need to describe one of them in the label.
You will need to throw exceptions from constructors and setters in your shape classes for this work.

When the user successfully draws a shape, the error label should be reset to “No Errors” or something
similar. The color of the label should change to indicate errors vs. no errors.

Optional Extras
There is so much more that you could do with this! All the ideas below are optional.
Add more shapes
Set colors using a color chooser or some other method
Set the location fields with a mouse click
Clear all shapes
Highlight error fields by changing their colors
Add effects to the drawing (gradients, reflections, etc.)
Allow the user to click and change objects
Allow the user to ctrl-click and drag to draw and size at the same time
Etc…


NOTE: Just follow all the instructions and please it should be written by you only and by any AI tool. In my last JAVA project which was done by you, the AI detector was showing me that you have copied some lines of code from “Github” and other sites. So, please make sure it is written by you only. And just follow all the instructions. Thank You!

Order Solution Now

Our Service Charter

1. Professional & Expert Writers: Writers Hero only hires the best. Our writers are specially selected and recruited, after which they undergo further training to perfect their skills for specialization purposes. Moreover, our writers are holders of masters and Ph.D. degrees. They have impressive academic records, besides being native English speakers.

2. Top Quality Papers: Our customers are always guaranteed papers that exceed their expectations. All our writers have +5 years of experience. This implies that all papers are written by individuals who are experts in their fields. In addition, the quality team reviews all the papers before sending them to the customers.

3. Plagiarism-Free Papers: All papers provided by Writers Hero are written from scratch. Appropriate referencing and citation of key information are followed. Plagiarism checkers are used by the Quality assurance team and our editors just to double-check that there are no instances of plagiarism.

4. Timely Delivery: Time wasted is equivalent to a failed dedication and commitment. Writers Hero is known for timely delivery of any pending customer orders. Customers are well informed of the progress of their papers to ensure they keep track of what the writer is providing before the final draft is sent for grading.

5. Affordable Prices: Our prices are fairly structured to fit all groups. Any customer willing to place their assignments with us can do so at very affordable prices. In addition, our customers enjoy regular discounts and bonuses.

6. 24/7 Customer Support: At Writers Hero, we have put in place a team of experts who answer all customer inquiries promptly. The best part is the ever-availability of the team. Customers can make inquiries anytime.