Create the class airplane

Assignment Help JAVA Programming
Reference no: EM13161616

 

Your missions is to create the class Airplane. Each Airplane object should store the following information (fields):

manufacturer
modelNumber
maximumSpeed // in knots
maximumFuel // in gallons
grossWeight // in lbs
emptyWeight

Each airplane object should have the following behaviors (methods):

public float usefulLoad() // this is the grossWeight - emptyWeight
public float usefulLoadWithFuel( in gallons ) // this is the useful load - gallons x 6. The programmer user will pass in the number of gallons on board.

public void draw( Graphics g ) // this method will make a line drawing of an airplane. You don't have to get fancy. Do use drawString() to display the Airplanes information.

You will also need a constructor to initialize the fields.

You will need to put the GraphicsFrame, Drawable, Airplane, and the test driver all in one folder. The files need to 'see' each other. You can just add on the the test driver for the example.

Some starter code for the Airplane class:

public class Airplane implements Drawable

{

// fields

// constructor or constructors

// general methods

}

 

 

Reference no: EM13161616

Questions Cloud

Construct a map of the genes : In a test cross of a femal drosophila heterozygous for three linked, recessive genes, the following phenotypes of progeny were obtained.
Imagine a silica microsphere is coated with a thin gold : Imagine a silica microsphere half of which is coated with a thin gold coating and having a trimethylammoniumpropanethiol molecule anchored to the gold.
Construct an accurate genetic map of chromosome : A kidney bean shaped eye is produced by a recessive allele [k] on the third chromosome of Drosophila. Orange eye color, called "cardinal" is produced by the recessive allele [cd] on the same chromosome.
Explain barium can combine with sulfate : he maximum contaminant level (MCL) for barium (Ba) in drinking water is 2.0 mg/L. Barium can combine with sulfate (SO42-) to form BaSO4(s), which precipitates out of the water. This can be achieved by adding Na2SO4
Create the class airplane : Your missions is to create the class Airplane. Each Airplane object should store the following information (fields):
How the differences in chromosome between chimps and humans : What can you say about the relationship between chimp and human chromosomes? Explain how the differences in chromosome number between chimps and humans represented an opportunity to test a prediction of common ancestry?
Depict the lewis structure of tartaric and malic acids : Draw the Lewis structure of tartaric and malic acids in a way that shows the geometry of the acid functional groups. Indicate the hybridization of each carbon
What is the marginal opportunity cost : Given the above prices, will the firm adopt a new method which involves 10 units of land, 3 of labor, 2 of capital, and 2 of entrepreneurial ability?
Multiple choice question on c programming : Create a function to print "88 is a great port number" function name is yourName_PrintFunction no input no return type print "88 is a great port number"

Reviews

Write a Review

JAVA Programming Questions & Answers

  Method called wordlengths that accepts a scanner

Write a method called wordLengths that accepts a Scanner representing an input file as its argument. Your method should read from the given file.

  Represent one book in java

Represent one book in java

  Hasanodddigit that returns whether any digit

d named hasAnOddDigit that returns whether any digit of a positive integer is odd. Your method should return true if the number has at least one odd digit and false if none of its digits are odd. 0, 2, 4, 6, and 8 are even digits, and 1, 3, 5, 7, 9 a..

  Write a recursive method to produce a pattern

Write a recursive method to produce a pattern of n lines of asterisks.

  Determine the decision of java

Determine the decision of Java as the platform to develop this program. Identify the Java-based technologies utilized in this project and analyze each of them. Then, provide discussion on the purpose of each of the Java-based technologies utiliz..

  Write a recursive instance method

Write a recursive instance method

  Prepare executable program and a dictionary program

Prepare executable program and a dictionary Program.

  Create a project in eclipse

Create a new project

  Design a single class that expresses the commonality

Design a single class that expresses the commonality of these concepts.

  Simulate a simple multiuser computer system

Prepare a java program to simulate a simple multiuser computer system

  Compute the temperature in centigrade

Compute the temperature in Centigrade - Display the temperatures in both Centrigrade and Fahrenheit with appropriate labels, using the + operator to concatenate the labels with the variables

  Write program in java to calculate interest

Write a program in java to do the following : the following data is stored for each customer in the bank: account number,average balance and number of transaction for each customer it is required to calculate the interest earn

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