4 Replies - 342 Views - Last Post: 06 October 2011 - 08:26 AM Rate Topic: -----

#1 mastdesi  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 13
  • Joined: 21-September 11

Can't figure out how to start my java assignment

Posted 06 October 2011 - 07:55 AM

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.

Attached File(s)


This post has been edited by mastdesi: 06 October 2011 - 08:01 AM

Is This A Good Question/Topic? 0
  • +

Replies To: Can't figure out how to start my java assignment

#2 Fuzzyness  Icon User is offline

  • Comp Sci Student
  • member icon

Reputation: 669
  • View blog
  • Posts: 2,438
  • Joined: 06-March 09

Re: Can't figure out how to start my java assignment

Posted 06 October 2011 - 07:57 AM

There is no file uploaded and a majority of people in this forum will not actually download the files.

Here is what I need you to do, make a list of things you need to do, and then how you are thinking about approaching it. Then we will give feedback if there is a better way and then you can start the code and we go from there, ok?

List Example:
1. First item you need to do
- How you intended on approaching it

This post has been edited by Fuzzyness: 06 October 2011 - 07:57 AM

Was This Post Helpful? 0
  • +
  • -

#3 mastdesi  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 13
  • Joined: 21-September 11

Re: Can't figure out how to start my java assignment

Posted 06 October 2011 - 08:05 AM

I have attached the file now. it is a clean pdf file. 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:
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:
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;
	}
	

}


Was This Post Helpful? 0
  • +
  • -

#4 Fuzzyness  Icon User is offline

  • Comp Sci Student
  • member icon

Reputation: 669
  • View blog
  • Posts: 2,438
  • Joined: 06-March 09

Re: Can't figure out how to start my java assignment

Posted 06 October 2011 - 08:15 AM

Why are you having Car extend vehicle and then never use its constructor at all? Are you supposed to be extending that file?

And as I said a majority of people will not risk opening a file, you will have better luck putting it in a post. If they are long instructions use this format

Program Instructions
[spoiler] <Instructions here> <End the spoiler tag with /spoiler inside of []
Was This Post Helpful? 0
  • +
  • -

#5 mastdesi  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 13
  • Joined: 21-September 11

Re: Can't figure out how to start my java assignment

Posted 06 October 2011 - 08:26 AM

I think we have to use the extend.

This the assignment explanation in screen shots of the pdf:
http://imageshack.us...11006at112.png/
http://imageshack.us...11006at112.png/
http://imageshack.us...11006at112.png/
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1