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
}
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).
|