Question

Java Which of the followings are components for an object class? a.variable(s) b.Constructor c.Methods to describe...

Java

Which of the followings are components for an object class?

a.variable(s)

b.Constructor

c.Methods to describe behaviors and services

d.The main() method

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

a.variable(s)

b.Constructor

c.Methods to describe behaviors and services

A class can contain fields and methods to describe the behavior of an object. Methods are nothing but members of a class that provide a service for an object or perform some business logic.

if you have any doubt then please ask me without any hesitation in the comment section below , if you like my answer then please thumbs up for the answer , before giving thumbs down please discuss the question it may possible that we may understand the question different way and we can edit and change the answers if you argue, thanks :)

Add a comment
Know the answer?
Add Answer to:
Java Which of the followings are components for an object class? a.variable(s) b.Constructor c.Methods to describe...
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 Create a Java project to implement a simple Name class. This class will have the...

    JAVA Create a Java project to implement a simple Name class. This class will have the following class variable: First Name, Middle Name, Last Name, and Full Name Create the accessor/getter and mutator/setter methods. In addition to these methods, create a toString() method, which overrides the object class toString() method. This override method prints the current value of any of this class object. Create a main() method to test your project.

  • Java Framework Collection Assign. Create a class called ArrayListExample Create a ArrayList object called languageList which...

    Java Framework Collection Assign. Create a class called ArrayListExample Create a ArrayList object called languageList which accept type of String Add English, French, Italian and Arabic strings into languageList array object Print languageList using Iterator object Sort ArrayList object alphabetically Print languageList using Iterator object Solution will produce following: ArrayListExample class ArrayList object called languageList ArrayListExampleTest class with main method

  • Considering JAVA, Give an example of a class and an example of an object. Describe what...

    Considering JAVA, Give an example of a class and an example of an object. Describe what a class is, what an object is, and how they are related. Use your examples to illustrate the descriptions. Your Discussion should be at least 250 words in length, but not more than 750 words.

  • Java object lifecycle: Describe the lifecycle of the objects created within the method listed below. Discuss whether th...

    Java object lifecycle: Describe the lifecycle of the objects created within the method listed below. Discuss whether this program (assume that this method is embedded in a class) will fail with an out of memory error. And Explain when a stack overflow error can occur in Java, using an example program. public static void main(String[] args) throwsException {     java.util.Set set = new java.util.HashSet();     while(set.size()>-1) {         set = new java.util.HashSet();         Thread.sleep(1000); // wait 1 s         for (int i=0;i<1000000;i++) {             set.add(newObject());         }    ...

  • In C++ write a class. The requirements for the class are define as followings: Class StudentMergeSorter...

    In C++ write a class. The requirements for the class are define as followings: Class StudentMergeSorter – This class will have the following methods with their signatures as listed below: Sort() Java - This method will receive an array of Student records to be sorted. It will sort the records by Student ID(s). It will also return the sorted array of Student records. C++ - This method will have two parameters. The first parameter will be an array of Student...

  • 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 - Object Oriented Programming From the game slither.io Identify objects that you can see ...

    Java - Object Oriented Programming From the game slither.io Identify objects that you can see on the picture. Pick one object from part a. Create a class (Java code) for that object which contain data member, method and constructor. Implement the class inside main function by creating that object.

  • Java: Create a main method for your class, and then add another method to your class...

    Java: Create a main method for your class, and then add another method to your class (above the main method) named fallingDistance. This method accepts an integer into its parameter t, which is the amount of time, in seconds, that an object has been falling. This method returns the distance, in meters, that the object has fallen during the time interval. When an object s falling because of gravity, we use the following formula to determine the distance the object...

  • in JAVA Which of the following attributes would be MOST appropriate for a class called Book,...

    in JAVA Which of the following attributes would be MOST appropriate for a class called Book, that represents a book in a library? libraryName, location, libraryHours title, author, typeOfBook pages, cost, shipping anything, anytime, anywhere Which of the following statements is FALSE regarding constructors? A constructor allows you to set up an object once it is instantiated. A constructor does not have a return type. A constructor must have the same name as the name of the class. You can...

  • This is Java 0) Create a project called Lab2-Areas 1) Create a java class called Areas...

    This is Java 0) Create a project called Lab2-Areas 1) Create a java class called Areas (do not include the main method in this class) 2) Create a method for the following: - areaCircle - areaSquare - areaTriangle - areaRectangle - areaTrapezoid 3) Create another class called CalculateAreas 4) Have the main method in this class. Instantiate/Construct the Area object 5) Initialize variables for the appropriate sides (base, height, etc.) 6) Initialize variables for the 5 areas from the Area...

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