Solved

JAVA Question: which is the Object and which is the Class?

Posted on 2016-07-21
4
23 Views
Last Modified: 2016-07-23
classorobject.png
In this photo, which section of the code would be the Object and Class. If there are multiple objects/classes, please list them all.
0
Comment
Question by:rgb192
  • 2
4 Comments
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 41723233
we are not answering homework questions like this.
but post what you think what objects you find and we can comment on that
0
 

Author Comment

by:rgb192
ID: 41723282
lynda.com. I am self learning. So this is my homework, not school homework
0
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 41723298
it does not change anything
if we post the plain answers, there is no learning effort done by you.
try to find what a class is and what an object is.
using those definitions, look at the code and it should become easy.
0
 
LVL 26

Accepted Solution

by:
dpearson earned 500 total points
ID: 41723491
Well I think it's fair to help get you started:

WeatherService ws = new MockWeatherService() ;

Open in new window


In that statement, "MockWeatherService" is the name of a Class.
"WeatherService" is a type - which can be either the name of a class or the name of an interface.
"ws" is an instance of that class and so "ws" is an object.

Does that help?  Can you try to follow that pattern for the rest of the file?

Doug
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Java Timer (static) 9 43
Java Options in Zimbra Server 2 54
even odd program using while loop 3 40
hibernate insert example 13 29
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
This article is about some of the basic and important steps to be used to improve the performance in web-sphere commerce application development. 1) Always leverage the Dyna-caching facility provided by the product 2) Remove the unwanted code …
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question