Question

Consider a class Plane with 3 subclasses: Glider, PropPlane and Jet. What instance data would you think of putting in Plane a

0 0
Add a comment Improve this question Transcribed image text
Answer #1

`Hey,

Note: Brother in case of any queries, just comment in box I would be very happy to assist all your queries

Plane might include instance data such as size, weight, age, cost, carryingCapacity and maxSpeed. Glidermight have instance data of maxAltitude and amountOfWindNeeded, PropPlane might have instance data of typeOfFueland numberOfProps and Jet might have instance data of typeOfFuel, numberOfNacelles, and minimumSpeed.

Kindly revert for any queries

Thanks.

Add a comment
Know the answer?
Add Answer to:
Consider a class Plane with 3 subclasses: Glider, PropPlane and Jet. What instance data would you...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Java Eclipse Coding question: Use data abstraction (real-world modeling) to come up with 3 instance variables...

    Java Eclipse Coding question: Use data abstraction (real-world modeling) to come up with 3 instance variables and 2 effectors for a new data type – the class HospitalPatient. You have the freedom to design the instance variables and effectors. instance variables effectors 1. 1. 2. 2. 3. Write the code for class HospitalPatient, according to the requirement above. Include the default constructors with no argument, and the constructor with all arguments. Provide a getter and setter for each individual instance...

  • Create a UML diagram to help design the class described in exercise 3 below. Do this...

    Create a UML diagram to help design the class described in exercise 3 below. Do this exercise before you attempt to code the solution. Think about what instance variables will be required to describe a Baby class object; should they be private or public? Determine what class methods are required; should they be private or public? Write Java code for a Baby class. A Baby has a name of type String and an age of type integer. Supply two constructors:...

  • Given the following problem, explain what instance variables and methods you would create, what parameters would...

    Given the following problem, explain what instance variables and methods you would create, what parameters would be sent to each method (if any) and what values would be returned (if any), and an overview of what the method will do. You should explain why you have chosen to break the problem down as you have. You are required to write a program in JAVA which will fill an array with names entered by the user. You must be able to...

  • JAVA MCQ QUESTION WHAT IS THE ANSWER AND WHY 22. Consider the following code: public class...

    JAVA MCQ QUESTION WHAT IS THE ANSWER AND WHY 22. Consider the following code: public class C public int myVar; public void outerMethod) int myVar--1 Something x- new SomethingO public void myMethod O How do you write values to the instance variable myVar from inside myMethod? A. this.myVar - B. myVar. C. super.myVar D. C.this.myVar E. super ) .myVar

  • Create a UML diagram to help design the class described in exercise 3 below. Do this...

    Create a UML diagram to help design the class described in exercise 3 below. Do this exercise before you attempt to code the solution. Think about what instance variables will be required to describe a Baby class object; should they be private or public? Determine what class methods are required; should they be private or public? 3. Write Java code for a Baby class. A Baby has a name of type String and an age of type integer. Supply two...

  • Question 1. (Magician.java, Healer.java, Fighter.java, HeroTester.java) Consider the abstract hero class and the three subclasses shown...

    Question 1. (Magician.java, Healer.java, Fighter.java, HeroTester.java) Consider the abstract hero class and the three subclasses shown below. Review the hero class to see how it works (it’s in the project/package for you already). Your job is to implement the following subclasses. Each of the subclasses has an extra data field that relates to their specific hero talent. Some help with these special talents and other methods are below. Fighter: ‐The fighter has an extra data field called Strength and a...

  • Consider the following Account class and main function: class Account: acct_num=1000 #Constructor for Account class (default...

    Consider the following Account class and main function: class Account: acct_num=1000 #Constructor for Account class (default values for balance #and annual interest rate are 100 and e, respectively). #INITIALIZER METHOD HEADER GOES HERE #MISSING CODE def getId(self): return self._id def getBalance(self): #MISSING CODE def getAnnualInterestRate(self): return self.___annualInterestRate def setBalance(self, balance): self. balance - balance def setAnnualInterestRate(self,rate): #MISSING CODE def getMonthlyInterestRate(self): return self. annualInterestRate/12 def getMonthlyInterest (self): #MISSING CODE def withdraw(self, amount): #MISSING CODE det getAnnualInterestRate(self): return self. annualInterestRate def setBalance(self,...

  • Write the Java code for the class WordCruncher. Include the following members:

    **IN JAVAAssignment 10.1 [95 points]The WordCruncher classWrite the Java code for the class WordCruncher. Include the following members:A default constructor that sets the instance variable 'word' to the string "default".A parameterized constructor that accepts one String object as a parameter and stores it in the instance variable. The String must consist only of letters: no whitespace, digits, or punctuation. If the String parameter does not consist only of letters, set the instance variable to "default" instead. (This restriction will make...

  • 1-Suppose you write an application in which one class contains code that keeps track of the...

    1-Suppose you write an application in which one class contains code that keeps track of the state of a board game, a separate class sets up a GUI to display the board, and a CSS is used to control the stylistic details of the GUI (for example, the color of the board.) This is an example of a.Duck Typing b.Separation of Concerns c.Functional Programming d.Polymorphism e.Enumerated Values 2-JUnit assertions should be designed so that they a.Fail (ie, are false) if...

  • Case Study 2: Proposing a Data Gathering Approach at TLG Solutions

    Case Study 2: Proposing a Data Gathering Approach at TLG SolutionsHead the 116 Solutions case and consider the following questions:1. What is the client requesting? What goal does the client have for this project2. What are the presenting problems? What do you think maybe any underlying problems? Which of these underlying problems is most likely, in your view?3. What data would illustrate whether these underlying problems are occurring? Which method of data gathering would you use and why? (Consider using...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT