Reference no: EM13161453
This program 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
}
Write a c function void print_triangle(int n)
: Write a C function void print_triangle(int n) that prints a triangular pattern of asterisks of height n and width 2 * n + 1 with one asterisk in the first line, three in the second line, etc.,
|
Program to do the enciphering
: Write a program to do the enciphering. It should prompt the user for a message, and print out both the entered message and its corresponding ciphertext.
|
Evaluate the ph during the titration
: Calculate the pH during the titration of 100.0 mL of 0.200 M HCl with 0.400 M NaOH. First what is the initial pH (before any NaOH is added
|
How genotype and phenotype are determined in normal
: Explain why phenotype of the cloned mammoth would be similar to the wooly mammoth and not to the elephant egg donor or surrogate elephant mother. Compare and contrast how genotype and phenotype are determined in normal sexual reproduction with how..
|
Pass in the number of gallons on board
: 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 are the highest and lowest payments
: What are the highest and lowest payments from the writer that the bookkeeper farmer team will accept for the 6th day?
|
Write a c program that asks for and reads in two integers
: Write a C program that asks for and reads in two integers and then reports if one is a multiple of the other.
|
State what are the partial pressures of no2 and n2o4
: N2O4 is introduced into an empty 2.14L container, what are the partial pressures of NO2 and N2O4 after equilibrium has been achieved at 45 degree celsius? Pn2o4, Pno2=?
|
Create a chart listing animals from the different classes
: Create a chart listing animals from the different classes of vertebrates at the National Zoo. Include one example from each class. You should find information about the common characteristics of animals classified in this phylum. Describe their di..
|