Java graphic application, JAVA Programming

I need to draw cars and trucks and background with road and a house with sky.

I have to use Vehicle class as a parent class. To draw pictures, i should draw fun things coming up with different drawings. the problem is that it is a "hard code".

I need to create a car class and a truck class as a children of Vehicle class.

the following UML classes shows the required elements in each class:

Vehicle class contains:

-x:int

-y:int

-color: Color

+Vehicle(in x:int, in y:int, in c:Color)

>>> Vehicle class to represent an automobile. there are 2 types of automobile: "car" and "truck". the draw method uses these values to draw the corresponding object.

>>> the draw() method is responsible of all the drawings of the Vehicles. it contains all the logic for drawing.

Car Class Contains:

-doors: int

+draw(in g:Graphics)

+Car(in x: int, in y: int, in c c:Color, in d: int)

+move()

>>> the move() methods move the car across the screen. it simply update the position of the car.

Truck Class Contains:

-type: string

+move()

+draw(in g: Graphics)

+Truck(in x: int, in y: int, in c:Color, in type: string)

DrawPanel Class Contains:

+paintComponent(in g: Graphics)

>>> the drawpanel class should contain Timer object that is responsible of making things move of all Vehicles that i create.

TestDraw class contains nothing its only runs the classes.

Posted Date: 2/21/2013 5:36:53 AM | Location : United States







Related Discussions:- Java graphic application, Assignment Help, Ask Question on Java graphic application, Get Answer, Expert's Help, Java graphic application Discussions

Write discussion on Java graphic application
Your posts are moderated
Related Questions
The purpose of this assignment is to give you practice working with one dimensional arrays. It will also introduce you to one of the oldest mathematical algorithms in the world. No

Implement your design in the Java programming language. Your main program file must be called MIPSim.java. Your simulator should implement the MIPS instruction set with the rest

Project Description: I am planning to prepare a website which caters the services to online internet users. I have already prepared most HTML5 pages by own and wanted to impl

Javascript validation, JAVA Programming 1. Obtaining the new script: Download and save the attached comment CGI mailer script form-mail2.pl to your server''s cgi-bin directory, and

Develop an E-commerce website I prefer this website to be coded with JAVA since I have heard this is safer than PHP is. Though, if this is not possible I am willing to go with P

Each time an object is operated in Java, it goes into the area of memory named as heap. The Java heap is named the garbage collectable heap. The garbage collection may not be force

Task - Defining a Student class The below illustration will explain how to write a class. We want to write a "Student" class which - should be able to store the below charac

The benefits of Spring are as follows: ? Spring has layered architecture. Use what you require and leave you don't require now. ? Spring Enables POJO Programming. There is no

New Fishing App Project Description: A new app for iPhone providing a GPS connected map of the fishery you are fishing at and other logged in users who are also fishing at th

how to write java programe and example programe