Click here to Skip to main content
15,913,587 members
Home / Discussions / Java
   

Java

 
GeneralRe: help: equals() method to compare the attributes Pin
Nagy Vilmos7-Oct-11 4:36
professionalNagy Vilmos7-Oct-11 4:36 
GeneralRe: help: equals() method to compare the attributes Pin
mastdesi7-Oct-11 5:20
mastdesi7-Oct-11 5:20 
GeneralRe: help: equals() method to compare the attributes Pin
Nagy Vilmos7-Oct-11 7:12
professionalNagy Vilmos7-Oct-11 7:12 
GeneralRe: help: equals() method to compare the attributes Pin
mastdesi7-Oct-11 8:52
mastdesi7-Oct-11 8:52 
AnswerRe: help: equals() method to compare the attributes Pin
Nagy Vilmos6-Oct-11 22:43
professionalNagy Vilmos6-Oct-11 22:43 
GeneralRe: help: equals() method to compare the attributes Pin
mastdesi7-Oct-11 5:17
mastdesi7-Oct-11 5:17 
GeneralRe: help: equals() method to compare the attributes Pin
Nagy Vilmos7-Oct-11 7:14
professionalNagy Vilmos7-Oct-11 7:14 
QuestionPlease help with java assignment Pin
mastdesi6-Oct-11 4:43
mastdesi6-Oct-11 4:43 
I really need help with my assignment for java. Please give me a little push start with this assignment. I am really bad with getting the concept of the arrays. Please give me the starting part for a couple of classes and the driver class. Once i get started i am sure i can figure it out.

Please check this assignment file and I would appreciate whatever help you guys give me.

Assignment pdf file can be downloaded here : http://www.2shared.com/document/pKqvuo_K/A2help.html

This is the assignment explanation in screen shots of the pdf:
http://imageshack.us/photo/my-images/525/screenshot20111006at112.png/
http://imageshack.us/photo/my-images/13/screenshot20111006at112.png/
http://imageshack.us/photo/my-images/441/screenshot20111006at112.png/


I tried to start this but i am not sure if i need to use arrays in the classes and how to use them.

Vehicule class:
Java
package Package1;

public class Vehicule {
	String fuelT;
	double consum;
	int price;
	
	public Vehicule ()
	{
		fuelT = "";
		consum = 0.0;
		price = 0;
	}
	
	public Vehicule(String f, double c, int p)
	{
		this.fuelT = f;
		this.consum = c;
		this.price = p;
	}
	

}


Car class:
Java
package Package2;

import Package1.Vehicule;

public class Car extends Vehicule {
	private String carBrand;
	private String carMake;
	private int year;
	
	public Car()
	{
		carBrand = "";
		carMake = "";
		year = 0;
	}
	
	public Car(String b, String m, int y, String f, double c, int p)
	{
		this.carBrand = b;
		this.carMake = m;
		this.year = y;
	}
	

}


modified 6-Oct-11 11:29am.

AnswerRe: Please help with java assignment Pin
Nagy Vilmos6-Oct-11 5:46
professionalNagy Vilmos6-Oct-11 5:46 
GeneralRe: Please help with java assignment Pin
mastdesi6-Oct-11 6:19
mastdesi6-Oct-11 6:19 
GeneralRe: Please help with java assignment Pin
TorstenH.6-Oct-11 19:44
TorstenH.6-Oct-11 19:44 
GeneralRe: Please help with java assignment Pin
Nagy Vilmos6-Oct-11 23:31
professionalNagy Vilmos6-Oct-11 23:31 
GeneralRe: Please help with java assignment Pin
mastdesi6-Oct-11 6:33
mastdesi6-Oct-11 6:33 
GeneralRe: Please help with java assignment Pin
Nagy Vilmos6-Oct-11 23:58
professionalNagy Vilmos6-Oct-11 23:58 
AnswerRe: Please help with java assignment Pin
I.explore.code12-Oct-11 4:31
I.explore.code12-Oct-11 4:31 
QuestionMultilevelqueue Pin
jhencer1111085-Oct-11 12:40
jhencer1111085-Oct-11 12:40 
AnswerRe: Multilevelqueue Pin
Richard MacCutchan5-Oct-11 21:49
mveRichard MacCutchan5-Oct-11 21:49 
AnswerRe: Multilevelqueue Pin
Nagy Vilmos5-Oct-11 22:35
professionalNagy Vilmos5-Oct-11 22:35 
QuestionTroubble with "new" Pin
Tor Danielsen4-Oct-11 11:00
Tor Danielsen4-Oct-11 11:00 
AnswerRe: Troubble with "new" Pin
DaveAuld4-Oct-11 12:03
professionalDaveAuld4-Oct-11 12:03 
GeneralRe: Troubble with "new" Pin
Tor Danielsen4-Oct-11 12:28
Tor Danielsen4-Oct-11 12:28 
GeneralRe: Troubble with "new" Pin
DaveAuld4-Oct-11 13:37
professionalDaveAuld4-Oct-11 13:37 
AnswerRe: Troubble with "new" Pin
Luc Pattyn4-Oct-11 13:40
sitebuilderLuc Pattyn4-Oct-11 13:40 
AnswerRe: Troubble with "new" Pin
Nagy Vilmos4-Oct-11 21:47
professionalNagy Vilmos4-Oct-11 21:47 
AnswerRe: Troubble with "new" Pin
Richard MacCutchan4-Oct-11 21:50
mveRichard MacCutchan4-Oct-11 21:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.