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

  Java program to ask user to enter favorite color

Write a Java program to ask the user to enter favorite color, a favorite food, favorite animal, and first name of a friend or relative.

  Java program use breadth-first search closest broadcast

Write the java program which will use breadth-first search (which you implement as part of your program) to determine the closest broadcast vertex for each vertex in graph.

  Write a functions that takes an array of doubles

1. Write a function that is passed a single integer and then calculates the factorial of that number. A factorial is the product of the integer times all of the integers below it stopping at 1. So n!= n*(n-1)*(n-2).......3.2.1

  Write java program to compute how much federal need to pay

Write a java application to calculate how much federal and state tax you need to pay. The program should accomplish the following task.

  Elements from a html document

Function test Count List Elements should simply retrieve an array of all list elements on the page and assert that their total count is 3.

  Creates an array named odds

Write code that creates an array named odds and stores all odd numbers between -6 and 38 into it using a loop. Make the array's size exactly large enough to store the numbers.

  Java program for line item application

This exercise explains you the process of testing and enhancing Line Item application. Open LineItemApp, Validator, Product, LineItem, and ProductDB classes that are in the c:java1.6ch06LineItem directory and review this code.

  Given an array with 100,000 entries to sort

Sorting  given an array with 100,000 entries to sort. Under what circumstances would you use each of the following: insertion sort,mergesort'quicksort

  Develop java code to compute monthly rent for housing units

Develop a java code that computes monthly rent for 3 housing units namely Bungalows,Apartments and hostels. All housing units have got size,color and monthly rental rate.

  Create java applet to input miles driven and gallons used

Create the Java applet which will input miles driven and gallons used (both as integers) for each tankful. Program must compute and display miles per gallon obtained for each tankful.

  Java program to compute invoice for client

You need a java program to compute the invoice for client and then print out invoice to the screen. The consulting rate is $200 per hour.

  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.

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