Public float usefulload()

Assignment Help JAVA Programming
Reference no: EM13161003

This lab makes use of the GraphicsFrame class and the Drawable interface. 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.

Make sure you look at the example of GraphicsFrame. 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: EM13161003

Questions Cloud

Interpersonal relationships : What type of power is typically exercised within interpersonal relationships?
Piece of code that allows a buffer : Give an example of piece of code that allows a buffer over run to occur. Assuming a program contains absolutely no buffer over runs. What other control flow-related problems may it have.
Script that will graphically show the range of frequency : the script that will graphically show the range of frequencies for which the ouput amplitude is less than 70% of the input amplitude. The original problem statement
Westerns or comedies : Can documentaries and their components be measured the same as other film genres, such as Westerns or comedies? 150 word
Public float usefulload() : 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.
What is the biological advantage of an operon organization : In bacteria, it is common fortwo or more structural genes to be arranged together in an operon.Discuss the arrangement of genetic sequences within an operon. What is the biological advantage of an operon organization?
How many will result if the wild-type codon is ggu : A glycine residue ecists at position 210 of the tryptophan synthetase enzyme of wild-type E.coli. If the codon specifying glycine is GGA, how many single-base substitutions will result in an amino acid at position 210, and what are they? How many ..
Reads in a list of integers : Write a program in C++ that reads in a list of integers into and array with base type int. Provide the facility to either read this array from the keyboard or from a file, at the user's option. If the user chooses file input, the program should reque..
Generate a sphere of diameter 3. create 3 vectors : Generate a sphere of diameter 3. Create 3 vectors representing the translation of this sphere along the x, y, and z axes. Generate the correct vectors given the description below: The sphere should be translated to (-10, -10, -10).

Reviews

Write a Review

JAVA Programming Questions & Answers

  Write java program to reverse contents of original array

Write down the Java program method named reversal which returns the new array which is a reversal of original array. Use [5.0, 4.4, 1.9, 2.9, 3.4, 3.5] to test method.

  Prepare address book java application

Prepare an application that reads the contents of your address book file and prepare a user guide that includes a description of the functionality of your overall address book system.

  Sequence of method in vector class

Construct a Vector class implementing a number of vector operations as methods along with a testing program to verify the class is working.

  Java program to find a value at in index

Construct a main class named Array Program that generates an array of 50-integers, all ranging from one to one hundred.

  Create a java program

UserApp and PrettyPrintUtility multiple times (supplying different TransData test file names), the AutoTesterUtility PROGRAM will be the driver program.

  Simulate a simple multiuser computer system

Prepare a java program to simulate a simple multiuser computer system

  Create and implement class called date to store month

Create and Implement the class called Date which has data members to store month (as a number), day, year, and name of month.

  Design a course registration system

Create an application which represents a simplified course registration system using ArrayLists and HashMaps.

  Describe how an eavesdropped can gain access

Describe how an eavesdropped can gain access to the remote server with a relatively modest number of guesses ( Hint:  The eavesdropped starts guessing after the original user has typed all but one character of the password.

  Design a program to help a videorental store

Design classes (class video, class customer, etc) based on your analysis above, using LINKED LISTS for the database elements read into the main memory.

  Write program with jframe to enter series of names

Write a program with JFrame which permits user to enter series of friends' names and phone numbers and creates file from entered data.

  Create the working applet to compute tax

Write down a java applet. Your applet assits to find out how much federal tax we require to pay suppose the tax rate is 12%. Create and implement the working applet to compute tax.

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