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:



-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)


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

Truck Class Contains:

-type: string


+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
Create a class called DeckOfCards that stores 52 objects of the Card class. Include methods to shuffle the deck, deal a deck, and report the number of cards left in the deck. The s

System Program Project Description: I want someone who can study my existing program and from there the updates may be done Skills required: Java, Oracle, MySQL, Softwa

The Post Office Protocol is an application-level protocol within an intranet which is used by the local e-mail clients to send and retrieve e-mails from a remote server those are l

1.   final - it is a constant declaration. 2.   finally - handles exception. The finally block is optional and gives a mechanism to clean up regardless of what occurs within

iPhone /Android app implemented on a website Project Description: I need someone to implement an iPhone/Android app onto a website page, So users can be able to use the Ap

Question Using 3 level of nested for loop, write a program that will produce the output as below.

Explain The Applet in java? The reason people are excited about Java as more than just another OOP language is because it allows them to write interactive applets on the web.

What is Bullseye explain with an example? This is a easy applet that draws a series of filled, concentric circles alternating red and white, instead a bullseye. import java.ap

What is casting? There are two types of casting, casting among primitive numeric types and casting among object references. Casting among numeric types is used to convert large