Geschreven door studenten die geslaagd zijn Direct beschikbaar na je betaling Online lezen of als PDF Verkeerd document? Gratis ruilen 4,6 TrustPilot
logo-home
College aantekeningen

If you like this tell me I will upload more

Beoordeling
-
Verkocht
-
Pagina's
113
Geüpload op
20-02-2025
Geschreven in
2022/2023

It is a good notes for Java

Instelling
Vak

Voorbeeld van de inhoud

NEED FOR OOP PARADIGM:

Object-Oriented Programming:

Object-oriented programming is at the core of Java. In fact, all Java programs are object-oriented
this isn’t an option the way that it is Therefore, this chapter begins with a discussion of the theoretical
aspects of OOP.

Two Paradigms of Programming:

As you know, all computer programs consist of two elements: code and data. Furthermore,a
program can be conceptually organized around its code or around its data. That is, some
programs are writtenhappening‖aroundand―whatothersis are wri affected.‖ These are the two
paradigms that g
The first way is called the process-oriented model. This approach characterizes a program as a
series of linear steps (that is, code). The process-oriented model can be thought of as code acting
on data. Procedural languages such as C employ this model to considerable success. Problems
with this approach appear as programs grow larger and more complex. To manage increasing
complexity, the second approach, called object-oriented programming, was conceived.

Object-oriented programming organizes a program around its data (that is, objects) and a set of
well-defined interfaces to that data. An object-oriented program can be characterized as data
controlling access to code. As you will see, by switching the controlling entity to data, you can
achieve several organizational benefits.

Procedure oriented Programming:
In this approach, the problem is always considered as a sequence of tasks to be done. A number
of functions are written to accomplish these attention on data.


There are many high level languages like COBOL, FORTRAN, PASCAL, C used for
conventional programming commonly known as POP.

POP basically consists of writing a list of instructions for the computer to follow, and organizing
these instructions into groups known as functions.




A typical POP structure is shown in below: Normally a flowchart is used to organize these
actions and represent the flow of control logically sequential flow from one to another. In a
multi-function program, many important data items are placed as global so that they may be
accessed by all the functions. Each function may have its own local data. Global data are more
vulnerable to an in advent change by a function. In a large program it is very difficult to identify
what data is used by which function. In case we need to revise an external data structure, we
should also revise all the functions that access the data. This provides an opportunity for bugs to
creep in.

,Drawback: It does not model real world problems very well, because functions are action
oriented and do not really corresponding to the elements of the problem.




Characteristics of POP:
Emphasis is on doing actions.
Large programs are divided into smaller programs known as functions.
Most of the functions shared global data.
Data move openly around the program from function to function.
Functions transform data from one form to another.
Employs top-down approach in program design.

OOP:

OOP allows us to decompose a problem into a number of entities called objects and then builds
data and methods around these entities.

DEF: OOP is an approach that provides a way of modularizing programs by creating portioned
memory area for both data and methods that can used as templates for creating copies of such
modules on demand.

That is ,an object a considered to be a partitioned area of computer memory that stores data and
set of operations that can access that data. Since the memory partitions are independent, the
objects can be used in a variety of different programs without modifications.

OOP Chars:

Emphasis on data .
Programs are divided into what are known as methods.
Data structures are designed such that they characterize the objects.
Methods that operate on the data of an object are tied together .
Data is hidden.
Objects can communicate with each other through methods.
Reusability.
Follows bottom-up approach in program design.

,Organization of OOP:




method
method




method




Evolution of Computing and Programming: Computer use is increasing in almost every field
of endeavor. Computing costs have been decreasing dramatically due to rapid developments in
both hardware and software technologies. Computers that might have filled large rooms and cost
millions of dollars decades ago can now be inscribed on silicon chips smaller than a fingernail,
costing perhaps a few dollars each. Fortunately, silicon is one of the most abundant materials on
earth it is an ingredient in common sand. Silicon chip technology has made computing so
economical that about a billion general-purpose computers are in use worldwide, helping people
in business, industry and government, and in their personal lives. The number could easily
double in the next few years. Over the years, many programmers learned the programming
methodology called structured programming.
You will learn structured programming and an exciting newer methodology, object-oriented
programming. Why do we teach both? Object orientation is the key programming methodology
used by programmers today. You will create and work with many software objects in this text.
But you will discover that their internal structure is often built using structured-programming
techniques. Also, the logic of manipulating objects is occasionally expressed with structured
programming.

Language of Choice for Networked Applications: Java has become the language of choice for
implementing Internet-based applications and software for devices that communicate over a network.
Stereos and other devices in homes are now being networked together by Java technology. At the
May 2006 JavaOne conference, Sun announced that there were one billion java-enabled mobile
phones and hand held devices! Java has evolved rapidly into the large-scale applications arena. It’s
the preferred-wide programming needs. Java has evolved so rapidly that this seventh edition of Java
How to Program was published just 10 years after the first edition was published. Java has grown so
large that it has two other editions. The Java Enterprise Edition (Java EE) is geared toward
developing large-scale, distributed networking applications and web-based applications. The Java
Micro Edition (Java ME) is geared toward developing applications for small, memory constrained
devices, such as cell phones, pagers and PDAs.

, Data Abstraction

An essential element of object-oriented programming is abstraction. Humans manage
complexity through abstraction. For example, people do not think of a car as a set ofte ns of
thousands of individual parts. They think of it as a well-defined object with its own unique
behavior. This abstraction allows people to use a car to drive to the grocery store without being
overwhelmed by the complexity of the parts that form the car. They can ignore the details of how
the engine, transmission, and braking systems work. Instead they are free to utilize the object as
a whole.
A powerful way to manage abstraction is through the use of hierarchical classifications.
This allows you to layer the semantics of complex systems, breaking them into more manageable
pieces. From the outside, the car is a single object. Once inside, you see that the car consists of
several subsystems: steering, brakes, sound system, seat belts, heating, cellular phone, and so on.
In turn, each of these subsystems is made up of more specialized units. For instance, the sound
system consists of a radio, a CD player, and/or a tape player. The point is that you manage the
complexity of the car (or any other
complex system) through the use of hierarchical abstractions.

Encapsulation
An object encapsulates the methods and data that are contained inside it .the rest of the system
interacts with an object only through a well defined set of services that it provides.

Inheritance

I have more information about Flora –not necessarily because she is a florist but because
she is a shopkeeper.
One way to think about how I have organized my knowledge of Flora is in terms of a
hierarchy of categories:




Fig : A Class Hierarchy for Different kinds of Material objects

Geschreven voor

Instelling
Vak

Documentinformatie

Geüpload op
20 februari 2025
Aantal pagina's
113
Geschreven in
2022/2023
Type
College aantekeningen
Docent(en)
John
Bevat
Alle colleges

Onderwerpen

$10.99
Krijg toegang tot het volledige document:

Verkeerd document? Gratis ruilen Binnen 14 dagen na aankoop en voor het downloaden kun je een ander document kiezen. Je kunt het bedrag gewoon opnieuw besteden.
Geschreven door studenten die geslaagd zijn
Direct beschikbaar na je betaling
Online lezen of als PDF

Maak kennis met de verkoper
Seller avatar
tradertherule

Maak kennis met de verkoper

Seller avatar
tradertherule Sastra
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
-
Lid sinds
1 jaar
Aantal volgers
0
Documenten
1
Laatst verkocht
-

0.0

0 beoordelingen

5
0
4
0
3
0
2
0
1
0

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Bezig met je bronvermelding?

Maak nauwkeurige citaten in APA, MLA en Harvard met onze gratis bronnengenerator.

Bezig met je bronvermelding?

Veelgestelde vragen