Question about Computers & Internet

1 Answer

How to make a class - Computers & Internet

Posted by on

Ad

1 Answer

  • Level 2:

    An expert who has achieved level 2 by getting 100 points

    All-Star:

    An expert that got 10 achievements.

    MVP:

    An expert that got 5 achievements.

    Novelist:

    An expert who has written 50 answers of more than 400 characters.

  • Expert
  • 222 Answers

Public class Phred {

final static int ZERO = 0;

static void main( String [] args ) {

System.println("Hello, World!);

}
}

Posted on Oct 17, 2013

  • John Austin
    John Austin Oct 17, 2013

    Phred fred = new Phred(); // make instance of the class

×

Ad

1 Suggested Answer

6ya6ya
  • 2 Answers

SOURCE: I have freestanding Series 8 dishwasher. Lately during the filling cycle water hammer is occurring. How can this be resolved

Hi,
a 6ya expert can help you resolve that issue over the phone in a minute or two.
Best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.
the service is completely free and covers almost anything you can think of.(from cars to computers, handyman, and even drones)
click here to download the app (for users in the US for now) and get all the help you need.
Goodluck!

Posted on Jan 02, 2017

Ad

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

1 Answer

What is the difference between different GPON board?


Board GPON Type Port Quantity Optical Module Maximum Split Ratio ONU based shaping H802GPBD 1G-GPON 8 SFP(Class B+ and Class C+) 1:128 No H805GPBD
H806GPBD 1G-GPON 8 SFP(Class B+ and Class C+) 1:128 Yes H802GPFDH805GPFD 1G-GPON 16 SFP(Class B+ and Class C+) 1:128 Yes H806GPBHH807GPBH 1G-GPON 8 SFP(Class B+ and Class C+) 1:128 Yes H802XGBC 10G-GPON 4 XFP 1:128 Yes Huawei GPBD Board Thunder link com

Nov 25, 2016 | Televison & Video

1 Answer

What is difference between a class and an object with respect to Java?


This kind of question is a test of your knowledge of the terminology associated with object oriented programming. You should note that this question could just as well be asked in the context of a C++ programmer interview, or any programming position that requires object oriented programming for that matter.
The terms 'class' and 'object' are definitely related to one another, but each term holds its own distinct meaning. Let's start out by explaining what the term "class" means in the context of OOP. The term 'class' refers to the actual written piece of code which is used to define the behavior of any given class. So, a class is a static piece of code that consists of attributes which don't change during the execution of a program - like the method definitions within a class.
An object is an instance of a class The term 'object', however, refers to an actual instance of a class. Every object must belong to a class. Objects are created and eventually destroyed - so they only live in the program for a limited time. While objects are 'living' their properties may also be changed signficantly.
An example will help clarify what we've said. Suppose we have a class called 'Animal'. All Animals have bodies and brains - and these could be the attributes of our fictional Animal class. We can also add some methods that would be common to all Animals - like "movement", because all animals can move (maybe you can think of a better example for methods, but hopefully you get the point). So, the idea you really want to enforce in your own mind is that this very general 'template' of an Animal does not change - it's simply just some lines of code that define the Animal class.
An instance of the Animal class would be a specific animal - like a lion, a cat, or a zebra. These instances of the Animal class would be called objects. Whereas the Animal class is a general concept, the instances of that class - the lions, cats, etc - take that general concept and create a real instance of it. That is why programmers define constructors for their classes - so that when someone wants to create an object of the class, he/she can just pass in the actual properties that he/she wants the object to have - like what kind of animal it is, the name, the weight, etc. So, you can think of a constructor as something that brings the class to life - which is why it is called a constructor, because it constructs a specific instance of a class.
Objects have a lifespan but classes do not And, as our Animal example clearly shows, every object has a lifespan associated with it - a cat or zebra can not live forever. And, the properties of those objects can change as well while they 'live'; if we have a 'size' variable defined in the class that would of course change as the cat object grows bigger.
Object versus class summary So, we can say that whereas a class is a general concept (like an Animal), an object is a very specific embodiment of that class, with a limited lifespan (like a lion, cat, or a zebra). Another way of thinking about the difference between a class and an object is that a class provides a template for something more specific that the programmer has to define, which he/she will do when creating an object of that class.
Objects have a lifespan but classes do not And, as our Animal example clearly shows, every object has a lifespan associated with it - a cat or zebra can not live forever. And, the properties of those objects can change as well while they 'live'; if we have a 'size' variable defined in the class that would of course change as the cat object grows bigger.
Object versus class summary So, we can say that whereas a class is a general concept (like an Animal), an object is a very specific embodiment of that class, with a limited lifespan (like a lion, cat, or a zebra). Another way of thinking about the difference between a class and an object is that a class provides a template for something more specific that the programmer has to define, which he/she will do when creating an object of that class.

Jul 16, 2014 | Computers & Internet

1 Answer

Differentiate between nested and inner classes.Explain with examole


best shot that can attempt, hope it helps

Nested Classes vs. Inner Classes
A nested class is a class whose definition appears inside the definition of another class, as if it were a member of the other class. For example, if a program contains class A { class B { // fields, methods of class B... } // fields, methods of class A... } then class B is a nested class of class A. Code outside of the methods of class A can refer to class B by calling it A.B, using the same dot notation as for field and method references. Within the methods of class A class B can be used without qualifying the name. B could be hidden from code outside of class A by declaring it private, just as with fields and methods.
A nested class like B is known as an inner class. An inner class has access to the fields of an instance of its enclosing class. For this reason, an instance of B can only be created in association with an instance of A, using the expression /it instanceA.new A.B(...) outside of A's methods, where instanceA is an instance of A, and
new B(...) inside of A's methods. The new instance of B also knows about the enclosing instance of A, and can refer to it using the expression
A.this We can think of an instance of an inner class as having two this pointers, one for itself and one for its enclosing instance. An inner class may be nested within another inner class, so an inner class can even have multiple levels of this pointers. A nesting depth more than one level is quite uncommon, however, and should usually be avoided.
A nested class can be declared static, in which case it has reduced access to its enclosing class. For example, if B were declared static above, it could no longer access the instance variables of A, and there would be no associated instance A.this. Static nested classes are known as nested top-level classes, because they are exactly like classes declared outside any other class, except for the way they are named. Instances of a static nested class are created using regular new, as in new A.B(...)

Jun 09, 2010 | Sun Java Programming Language (cdj-275)

1 Answer

I need a user manual


Hi,

i provide you user manual for NX-542 in portable TV,

Product MPN

MPN NX542

Key Features

TV Type   Portable Screen Size   13 inch Display Type Color

Other Features

Remote Control   With Remote Control AV Inputs Composite 1 Sleep Timer   With Sleep Timer Antenna Capability   External

Physical Characteristics

Power Source DC Adapter, AC Adapter Type Portable Display Type Color Screen Size   13 inch Depth 14.75 in. Height 14 in. Width 14.75 in.

Miscellaneous

UPC 840005000977 Product ID 77523163
i hope this is helpful to you.
Thanks,

Dec 04, 2009 | Naxa Electronics NX-542 13 in. Portable TV

1 Answer

In cpp programming why do we go for abstract base class?


Virtual keyword allows the program to dynamically decide which function to call. That is, when derived class is inherited from a base class the function in derived class can perform a completely different action from the one in Base class. Hence the function call via a pointer or reference maps to different functions based on the type of the object.

Abstract base class is used, so that anyone who is inherting from this class should implement that interface. Because the base class may not have a meaningful implementation for that interface. For example to design a program for computing area of different shapes like rectangle, triangle, hexagon etc. base class can be thought of as Shape. In addition the base class can be made abstract by declaring Area to be a pure virtual function. Then the different shapes like Rectangle, Triangle classes can inherit from Shape and implement Area interface based on their formulae.

Apr 06, 2009 | Microsoft Computers & Internet

1 Answer

Schema classes and attributes


Every directory object you create is an instance of an object class contained in the schema. Each object class contains a list of associated attributes that determine the information the object can contain. Classes and attributes are defined independently, so that a single attribute can be associated with multiple classes. All schema classes and attributes are defined by the classSchema and attributeSchema objects, respectively.

Classes

ClassSchema objects are used to define classes in the schema. A classSchema object provides the template for building directory objects of that class. Examples of classSchema include User and Server. A classSchema object contains, among other things, the following information:
Class type (structural, abstract, or auxiliary)

Common name and Lightweight Directory Access Protocol (LDAP) display name

Lists of the "must contain" and "may contain" attributes for instances of the object

Relative distinguished name attribute

A list of possible parent classes

Class types

Three different types of classes exist in the schema:Class type Purpose

Structural
Used to instantiate objects (users, servers and so on) in the directory.

Abstract
Provides templates for deriving structural classes

Auxiliary
Contains predefined lists of attributes that can be included in structural and abstract classes

Attributes

AttributeSchema objects are used to define attributes in the schema. An attributeSchema object determines the allowable contents and syntax for instances of that attribute in the directory. Examples of attributeSchema include User-Principal-Name and Telex-Number. An attributeSchema object contains, among other things, the following information:•
Common name and LDAP display name

Syntax rules

Data constraints (single versus multivalued, minimum, and maximum values)

Whether and how the attribute is indexed

Jul 17, 2008 | Microsoft Windows Server Standard 2003 for...

Not finding what you are looking for?
Computers & Internet Logo

Related Topics:

29 people viewed this question

Ask a Question

Usually answered in minutes!

Top Computers & Internet Experts

Doctor PC
Doctor PC

Level 3 Expert

7733 Answers

kakima

Level 3 Expert

102366 Answers

David Payne
David Payne

Level 3 Expert

14161 Answers

Are you a Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...