Solved

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

Posted on 2016-07-21
4
21 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]
Comment Utility
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
Comment Utility
lynda.com. I am self learning. So this is my homework, not school homework
0
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
This exercise is about for the following scenario: Dmgr and One node with 2 application server. Each application server contains it owns application. Application server name as follows server1 contains app1 server2 contains app1 Prereq…
The viewer will learn how to implement Singleton Design Pattern in Java.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

744 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now