Computer Science, asked by debabanisahu, 1 month ago

List any 10 software object and state their 5 properties and 3 methods of each.

Answers

Answered by raviravinder06603
1

Explanation:

What is a software object?

* A software object. Software objects are conceptually similar to real-world objects: they too consist of state and related behavior. An object stores its state in fields (variables in some programming languages) and exposes its behavior through methods (functions in some programming languages).

What is a property?

* A property is an attribute of an object or an aspect of its behavior. For example, properties of a document include its name, its content, and its save status, and whether change tracking is turned on. To change the characteristics of an object, you change the values of its properties.

To set the value of a property, follow the reference to an object with a period, the property name, an equal sign, and the new property value. The following example turns on change tracking in the document named "MyDoc.doc".

VBCopy

Sub TrackChanges() Documents("Sales.doc").TrackRevisions = True End Sub

In this example, Documents refers to the collection of open documents, and the name "Sales.doc" identifies a single document in the collection. The TrackRevisions property is set for that single document.

Some properties cannot be set. The Help topic for a property indicates whether that property can be set (read/write) or can only be read (read-only).

You can return information about an object by returning the value of one of its properties. The following example returns the name of the active document.

VBCopy

Sub GetDocumentName() Dim strDocName As String strDocName = ActiveDocument.Name MsgBox strDocName End Sub

In this example, ActiveDocument refers to the document in the active window in Word. The name of that document is assigned to the variable refers to the document in the active window in Word. The name of that document is assigned to the variable strDocName.

What is a method?

* A method is an action that an object can perform. For example, just as a document can be printed, the Document object has a PrintOut method. Methods often have arguments that qualify how the action is performed. The following example prints the first three pages of the active document.

VBCopy

Sub PrintThreePages() ActiveDocument.PrintOut Range:=wdPrintRangeOfPages, Pages:="1-3" End Sub

In most cases, methods are actions and properties are qualities. Using a method causes something to happen to an object, while using a property returns information about the object or causes a quality about the object to change.

What are objects give five examples?

* Objects are identifiable entities that have a set of attributes, behaviour and state. Five examples of objects are car, pen, mobile, email, bank account.

Similar questions