Solved

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

Posted on 2016-07-21
4
24 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 143

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 143

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 27

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

Create the perfect environment for any meeting

You might have a modern environment with all sorts of high-tech equipment, but what makes it worthwhile is how you seamlessly bring together the presentation with audio, video and lighting. The ATEN Control System provides integrated control and system automation.

Question has a verified solution.

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

Suggested Solutions

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…
Upgrading Tomcat – There are a couple of methods to upgrade Tomcat is to use The Apache Installer is to download and unzip and run the services.bat remove|install Tomcat6 Because of the App that we are working with, we can only use Tomcat 6.…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

820 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