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

  Implement an intrusion detection system in java

You are to implement an intrusion detection system in java. Calculate a threshold for detecting an intrusion. The threshold is 2*(Sums of weights).

  Create your own date class

You are to write a program that determines the day of the week for New Year's Day in the year 3000. To do this, you must create your own date class (MyDate) and use the following interface and main program:

  Write java application to input three integers from user

Write Java application that inputs three integers from user and displays sum, average, product, smallest, and largest of the numbers.

  Determine the java application on web

Determine the Java application on Web and explain how program structure functions. Explain the application in as much detail as possible.

  Display student details and classes in applet

Display student details and classes they have enrolled in Applet. The Applet should have following features. Update and View.

  Design and implement a small and simple email server

Design and implement a small and simple email server using the concept of web based information system (WBIS).

  A program called invoice that will prompt the user for items

write a program called invoice that will prompt the user for items on and invoice and then print the total of the invoice

  Write a java program to register students for a college

Project is for designing and developing a College Registration program. Write a Java program to register students for a college

  Compute area and perimeter of a polygon

Create a project that would let a user compute area and perimeter of a polygon

  Create web application uses visual web java server

Create the Web application which uses Visual Web Java Server Faces framework and either Apache Tomcat or Glassfish as the server.

  Distributed systems

Build robust, secure distributed systems using advanced programming techniques

  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.

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