Java graphic application, JAVA Programming

Assignment Help:

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.


Related Discussions:- Java graphic application

What is jms administered object, A preconfigured JMS object (a resource man...

A preconfigured JMS object (a resource manager connection factory or a destination) formed by an administrator for the use of JMS clients and placed in a JNDI namespace

What are the role of keywords in java, What are the role of Keywords in jav...

What are the role of Keywords in java? Keywords are identifiers such as public, static and class in which have a special meaning inside Java source code and outside of comments

What is bandwidth, What is bandwidth? In a general way Bandwidth is a c...

What is bandwidth? In a general way Bandwidth is a capacity of communication channel of carrying data.

Application for minesweeper, This program will help you start doing GUI pro...

This program will help you start doing GUI programming, and is a good example of 2D arrays. Mine Sweeper is a classic game that is played on a 2D grid of cells. At the beginning of

Programming, write a Java program that accept two integers and determine we...

write a Java program that accept two integers and determine weather they are Coprime or not

What is the core container module, This module is gives the fundamental fun...

This module is gives the fundamental functionality of the spring framework. In this module BeanFactory is the heart of any spring-based application. The whole framework was built o

Create a usercontrol called loginpasswordusercontrol, (Login User Control) ...

(Login User Control) Create a UserControl called LoginPasswordUserControl that contains a Label (loginLabel) that displays string "Login:", a TextBox (loginTextBox), where the user

What is spring, Spring is an open source framework created to address the d...

Spring is an open source framework created to address the difficulty of enterprise application development. One of the chief benefits of the Spring framework is its layered archite

What is documentation for the class library, What is Documentation for the ...

What is Documentation for the class library Sun gives a large amount of documentation for the classes, interface's and exceptions in the class library. If you've installed the

What does wan stand for, What does WAN stand for? Wide Area Network - A...

What does WAN stand for? Wide Area Network - A network in that computers are separated through great distances classically across cities or even continents.

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd