ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 103 Weeks Ago, 3 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 28 Apr 2017 My Price 9.00

A zipped Java project

Assignment Objectives

  • Learn how to use Action Listeners
  • Learn how to use Mouse Listeners
  • Learn how to use paintComponent

Deliverables

  • A zipped Java project according to theHow to submit Labs and Assignments guide.

O.O. Requirements

  • use static variables and methods only if needed
  • encapsulation: make sure you protect your class variables and provide access to them through methods

Graphics Requirements

  • Start with a simple class with the main method.
    • the only thing this class will do is to create the first JFrame
    • then the Frame class will create the first Panel
  • Use Listeners as specified in the lesson:
    • using the 1-2-3 rule: (1) "implement a Listener interface", (2) implement the abstract methods, and (3) add a Listener
  • In short, follow the lesson examples and notes
  • Use ArrayLists to save your drawings. 

Contents

Create a graphic application similar to MS Paint.

You can/should use or reuse classes from previous labs, assignments and examples.

The layout has to be organized with at least 3 panels, one for drawing, one for the options, one for status.

As the user drags the mouse, it should draw pixels on the screen. 

VERY IMPORTANT:

  • It should use the methodpaintComponent to redraw the screen when the panel is updated (with resizing, minimizing/maximizing). You will save andredraw geometric objects(Points, rectangles, ovals, shapes).You cannot save or redraw IMAGES.
  • OPPORTUNITY FOR EXTRA POINTS,NOT REQUIRED:
    • if you save your drawings on files, and let the user pick and choose the ones to restore, you might get 1 to 3 extra points. This does not wave the paintComponent requirement above for when the screen is updated. 

The options for drawing should include

  • choice of color.
  • choice of brush shape (square or oval)
  • choice of pixel size
  • anything else you might want to add

Below a picture of MS Paint to be used only as an illustration of the basic idea.

Your lab can have the layout of your choice and will have much less functionality of course.

Attachments:

Answers

(11)
Status NEW Posted 28 Apr 2017 02:04 AM My Price 9.00

-----------

Not Rated(0)