Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 37
  • Last Modified:

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

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
rgb192
Asked:
rgb192
  • 2
1 Solution
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
we are not answering homework questions like this.
but post what you think what objects you find and we can comment on that
0
 
rgb192Author Commented:
lynda.com. I am self learning. So this is my homework, not school homework
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
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
 
dpearsonCommented:
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now