Practical Approach to Object Oriented Programming By M Usman

This forum is aimed at students with little or no programming experience. It aims to provide students with an understanding of the role computation can play in solving problems.
Forum rules
This forum aims to provide material related to computer programming languages, tools and designs.

Practical Approach to Object Oriented Programming By M Usman

Unread postby UCERD.COM » Sat Jan 18, 2014 8:30 pm

Please Promote Our Work and website through yoursocial and professional network. We would highly appreciate your help.
Find us on FaceBook,Like and Share Please
User avatar
UCERD.COM
Site Admin
Site Admin
 
Posts: 958
Joined: Wed Jun 20, 2012 3:01 pm
Location: Barcelona
Has thanked: 13 times
Been thanked: 14 times
Blog: View Blog (1)

Re: Practical Approach to Object Oriented Programming By M Usman

Unread postby Faheem Ajaz » Wed Apr 29, 2015 8:18 pm

ASSIGNMENT NO=2
FAHEEM AJAZ
CMS=14669

DEFINTION:
In a computer network system, memory is one or more sets of chips that store data or program instructions, either temporarily or permanently. Memory is a critical processing component in any computer. Two most important types of memory are called random access memory (RAM) and read-only memory (ROM).
1. Random Access Memory (RAM):

The most common type of memory is called random access memory (RAM). The term memory is typically used to mean RAM. RAM holds data and program instructions while the CPU works with them. When a program is launch, it is loaded into and run from memory. Data is both written to and read from this memory. That’s why RAM is also sometimes called read-write memory.
RAM is volatile memory. Its mean that it loses its content when the computer is shut off or if there is a power failure. Therefore, RAM needs a constant supply of power to hold its data. RAM has a tremendous impact on the speed and power of a computer. Generally, the more RAM a computer has, the more it can do and the faster it can perform certain tasks.
The most common measurement unit for describing a computer’s memory is the ‘byte’. When referring to a computer's memory, the numbers are often so large that it is helpful to use terms such as kilobyte (KB), megabyte (MB), gigabyte (GB), and terabyte (TB) to describe the values.

2. Random Only Memory (ROM):
Unlike RAM, read-only memory (ROM) permanently stores its data, even when the computer is shut off. ROM is called non-volatile memory because it never loses its content even when the computer is shut off.. ROM holds instructions that the computer needs to operate. Whenever the computer's power is turned on, it checks ROM for directions that help it start up, and for information about its hardware devices.
Faheem Ajaz
 
Posts: 1
Joined: Wed Apr 29, 2015 7:44 pm
Has thanked: 0 time
Been thanked: 0 time

Practical approach to Object Oriented Programming

Unread postby 13745 » Mon May 04, 2015 8:36 pm

Practical approach to Object Oriented Programming

Object-oriented programming:-
Object-oriented programming language (OOPL) is a high-level programming language based on the object-oriented programming (OOP) model.
OOPL incorporates logical classes, objects, methods, relationships and other processes with the design of software and applications.
Example:-
1.Java
2.C language
3.C++
4.Smalltalk
5.PHP etc.

Brief History:-
SIMULA was the first object language. As its name suggests it was used to create simulations.It was developed by Kristen Nygaard and Ole-Johan Dahl in Norway.
The term "object oriented programming " was first used by Xerox PARC in their Smalltalk programming language.The idea of object-oriented programming gained momentum in the 1970s and in the early 1980s Bjorn Stroustrup integrated object-oriented programming into the C language. The resulting language was called C++ and it became the first object-oriented language to be widely used commercially.
In the early 1990s a group at Sun led by James Gosling developed a simpler version of C++ called Java that was meant to be a programming language for video-on-demand applications.

Advantage:-
One of the principal advantages of object-oriented programming techniques over procedural programming techniques is that they enable programmers to create modules that do not need to be changed when a new type of object is added. A programmer can simply create a new object that inherits many of its features from existing objects. This makes object-oriented programs easier to modify.

Basic Concepts used in the Object-Oriented Programming language:-
Object:
In programming terms, an object is a self-contained component that contains properties and methods needed to make a certain type of data useful.
Class:
A class represents description of objects that share same attributes and actions.
Data Abstraction:
Abstraction is design oriented while abstraction is implementation oriented. The focus of abstraction is on the interface.
Encapsulation:
It is a technique to hide the properties and behaviours of an object.
Polymorphism:
In it multiple types of objects might be able to work in a given situation.
Inheritance:
Inheritance enables new classes to receive.
Message passing:
In OOPs, Message Passing involves specifying the name of objects, the name of the function, and the information to be sent.
Dynamic binding:
In OOPs, Dynamic Binding refers to linking a procedure call to the code that will be executed only at run time. The code associated with the procedure in not known until the program is executed, which is also known as late binding.
User avatar
13745
 
Posts: 3
Joined: Mon Mar 30, 2015 1:45 pm
Has thanked: 0 time
Been thanked: 0 time
Blog: View Blog (3)

Re: Practical Approach to Object Oriented Programming By M Usman

Unread postby shahzeb tanveer » Fri May 15, 2015 3:39 pm

:SALAM:

Practical Approach By Object Oriented Programming.


What is Object Oriented Programming?

• Object-oriented programming is a method of implementation in which programs are organized as cooperative collections of objects, each of which represents an instance of some class, and Whose classes are all members of a hierarchy of Classes united via inheritance relationships.
As computers grew in computational power, so did the complexity of the software that came with them. To help manage the growing size of software development projects, researchers developed the concept of object oriented programming.
Object-oriented programming has proved to be extremely popular and has been widely adopted by the programming community. It has been shown to improve the understandability, maintainability, and reusability of the software artifacts. Programs are now structured as collections of classes that model things in the real world, and program execution amounts to a large number of instances of these classes (objects) working together to achieve a common goal.
One of the characteristics of object-oriented programs is that there area large number of objects present inside the program’s memory during its execution. Objects are connected to each other via references and objects utilise these references to issue commands or send messages to other objects with which they cooperate. Thus, the contents of a typical program’s memory can be thought of as a directed graph of objects, known as an object graph.
Software engineering, among many things, is concerned with software reliability. Given that the object graph lies at the foundation of most modern software products, understanding its behaviour and guaranteeing its reliable operation forms one of the essential tasks for researchers.

An Object-Oriented Program Example.

public class Map extends Object {
private Vector nodes;
void put(Comparable key, Object value) {
nodes.add(new Node(key, value));
}
Object get(Comparable k) {
Iterator i = nodes.iterator();
while (i.hasNext()) {
Node mn = (Node) i.next();
if (((Comparable) mn.key).equals(k))
return mn.value;
}
return null;
}
}
class Node {
public Object key; public Object value;
Node(Object key, Object value) {
this.key = key; this.value = value;
}
}
User avatar
shahzeb tanveer
 
Posts: 6
Joined: Sat Apr 25, 2015 11:27 am
Has thanked: 0 time
Been thanked: 0 time

Re: Practical Approach to Object Oriented Programming By M Usman

Unread postby shahzeb tanveer » Fri May 15, 2015 9:32 pm

Shahzeb Tanveer
cms 13618
section A.


Practical Approach To Object Oriented Programming

Object-oriented programming (OOP) is a programming paradigm based on the concept of "objects", which are data structures that contain data, in the form of fields, often known as attributes; and code, in the form of procedures, often known as methods. A distinguishing feature of objects is that an object's procedures can access and often modify the data fields of the object with which they are associated (objects have a notion of "this"). In OO programming, computer programs are designed by making them out of objects that interact with one another. There is significant diversity in object-oriented programming, but most popular languages are class-based, meaning that objects are instances of classes, which typically also determines their type.

Many of the most widely used programming languages are multi-paradigm programming languages that support object-oriented programming to a greater or lesser degree, typically in combination with imperative, procedural programming. Significant object-oriented languages include Python, C++, Objective-C, Smalltalk, Delphi, Java, C#, Perl, Ruby and PHP.
Object-oriented programming languages typically share low-level features with high-level procedural programming languages (which were invented first). The fundamental tools that can be used to construct a program include:

Variables which can store information formatted in a small number of built-in data types like integers and alphanumeric characters. This may include data structures like strings, lists and hash tables that are either built-in or result from combining variables using memory pointers
Procedures - also known as functions, routines, or subroutines - that take input, send output, and manipulate data. Modern languages include structured programming constructs like loops and conditionals.

Modular programming support provides the ability to group procedures into files and modules for organizational purposes. Modules are namespaced so code in one module doesn't need to worry about accidentally using the same procedure or variable name as another module.


An Object-Oriented Program Example
public class Map extends Object {
private Vector nodes;
void put(Comparable key, Object value) {
nodes.add(new Node(key, value));
}
Object get(Comparable k) {
Iterator i = nodes.iterator();
while (i.hasNext()) {
Node mn = (Node) i.next();
if (((Comparable) mn.key).equals(k))
return mn.value;
}
return null;
}
}
class Node {
public Object key; public Object value;
Node(Object key, Object value) {
this.key = key; this.value = value;
}
}
User avatar
shahzeb tanveer
 
Posts: 6
Joined: Sat Apr 25, 2015 11:27 am
Has thanked: 0 time
Been thanked: 0 time

Next

Return to Computer Sciences & Programming

Who is online

Users browsing this forum: Bing [Bot] and 1 guest

cron