Question

JAVA Design a class for three of these: A College; An Automobile; A Teacher; or A...

JAVA

Design a class for three of these: A College; An Automobile; A Teacher; or A House. No need to provide any functionality, just a design; you may stub out any methods to get it to compile. Have each appear in an inheritance hierarchy.

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

public class College
{
String[] departmentNames;
String Principal;
String[] facultyNames;
String[] cources;
double admissionFee;
  
}

public class Automobile
{
String automobileType;
Integer engineCapacity;
Integer noOfSeats;
float topSpeed;
float mileage;
  
}

public class Teacher
{
String name;
Integer age;
float experience;
String subjectName;
float fees;
long contactNo;
  
}

public class House
{
int rooms;
int floors;
int windows;
int doors;
String address;
  
}

Add a comment
Know the answer?
Add Answer to:
JAVA Design a class for three of these: A College; An Automobile; A Teacher; or A...
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 code for the following inheritance hierarchy figure.. 1. Create class Point, with two private instance...

    Java code for the following inheritance hierarchy figure.. 1. Create class Point, with two private instance variables x and y that represented for the coordinates for a point. Provide constructor for initialising two instance variables. Provide set and get methods for each instance variable, Provide toString method to return formatted string for a point coordinates. 2. Create class Circle, its inheritance from Point. Provide a integer private radius instance variable. Provide constructor to initialise the center coordinates and radius for...

  • IN JAVA Design and code a class hierarchy that demonstrates your understanding of inheritance and polymorphism....

    IN JAVA Design and code a class hierarchy that demonstrates your understanding of inheritance and polymorphism. Your hierarchy should contain at least 5 classes and one driver program that instantiates each type of object and runs multiple methods on those objects. Inheritance and Polymorphism must be apparent in the project. Please keep in mind that polymorphism was in chapter 37, so you will need to have read both chapters to understand what goes into this project. Bonus if you add...

  • Can you please pick Automobile For this assignment. Java Programming Second Inheritance OOP assignment Outcome: Student...

    Can you please pick Automobile For this assignment. Java Programming Second Inheritance OOP assignment Outcome: Student will demonstrate the ability to use inheritance in Java programs. Program Specifications: Programming assignment: Classes and Inheritance You are to pick your own theme for a new Parent class. You can pick from one of the following: Person Automobile Animal Based on your choice: If you choose Person, you will create a subclass of Person called Student. If you choose Automobile, you will create...

  • Complex number class:: Question Changed to just the Java portion Design a class in and Java...

    Complex number class:: Question Changed to just the Java portion Design a class in and Java that represents complex numbers and supports important operations such as addition, subtraction, multiplication and division. (the following is for the c++ and python version, not sure if its needed for this) op: Complex × Complex → Complex op: Complex × double → Complex op: double × Complex → Complex Where op is one of +, -, *, or /. In addition, you will need...

  • You are given a specification for some Java classes as follows.   A building has a number...

    You are given a specification for some Java classes as follows.   A building has a number of floors, and a number of windows. A house is a building. A garage is a building. (This isn’t Florida-like … it’s a detached garage.) A room has a length, width, a floor covering, and a number of closets. You can never create an instance of a building, but every object that is a building must have a method that calculates the floor space,...

  • I need this in java please Create an automobile class that will be used by a...

    I need this in java please Create an automobile class that will be used by a dealership as a vehicle inventory program. The following attributes should be present in your automobile class: private string make private string model private string color private int year private int mileage. Your program should have appropriate methods such as: default constructor parameterized constructor add a new vehicle method list vehicle information (return string array) remove a vehicle method update vehicle attributes method. All methods...

  • Create a new Java class called: House public class House Remember that Java is case-sensitive. This...

    Create a new Java class called: House public class House Remember that Java is case-sensitive. This means that the class name Diamond should start with a capital letter, and then the rest of the letters should be all lower-case. It would work if you were to use any combination of upper and lower-case letters, but that idea does not follow the assignment instructions. Write a Java application program that prints, the following house drawing to the screen: The house is...

  • JAVA you will design and write a class that represents a real-world object of your choice....

    JAVA you will design and write a class that represents a real-world object of your choice. In the second part, you will write a program that demonstrates the use of the class. Part I: Select a "real-world" object that has not been used in class lecture and/or the textbook. The object you choose must be defined by at least: Have at least two characteristics (attributes). Have at least two behaviors (operations). The class that you write to represent the object...

  • java. do it on eclipse. the same way its instructed Second Inheritance OOP assignment Outcome: ...

    java. do it on eclipse. the same way its instructed Second Inheritance OOP assignment Outcome:  Student will demonstrate the ability to understand inheritance Program Specifications: Programming assignment: Classes and Inheritance You are to pick your own theme for a new Parent class. You can pick from one of the following:  Person  Automobile  Animal  If you choose Person, you will create a subclass of Person called Student.  If you choose Automobile, you will create a...

  • Class StringImproved public class StringImproved extends java.lang.Object This program replaces the string class with a mutable...

    Class StringImproved public class StringImproved extends java.lang.Object This program replaces the string class with a mutable string. This class represents a character array and provide functionalities need to do basic string processing. It contains an array of characters, representing a textual string. Overview In Java, Strings are a great device for storing arrays of characters. One limitation of Strings in Java, however (there is always at least one), is that they are immutable (ie. they cannot be changed once created)....

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