Information Technology Reference
In-Depth Information
Fig. 4.6. This figure illustrates the con-
cept of class inheritance. The properties
of the Account class are the data items.
The methods represent the actions that
we can carry out on the data. For the
Savings_Account class, in addition to
the properties and methods inherited
from the Account class, there is also a
new data item called interest and a new
AddInterest method. In this way we can
construct more complex classes from
simpler ones.
Account
Properties:
Account_Number <integer>
Client name <string>
Balance <real>
Methods:
Withdrawal (real)
Deposit (real)
Savings_Account
Properties:
Interest <real>
Methods:
AddInterest ()
Tr ansfer (real)
One of the most widely used O-O languages today is the C++ program-
ming language. Bell Labs researcher Bjarne Stroustrup ( B.4.5 ) was familiar with
SIMULA and had found the class feature to be useful in large software devel-
opment projects. When he started working at Bell Labs, he explored ways of
enhancing Dennis Ritchie's C language, which was both fast and portable (see
section on C and Unix at the end of this chapter). In 1979, Stroustrup started
by adding classes to C to create what he called “C with Classes.” Over the next
few years, Stroustrup added several other features and renamed the language
“C++.” There is now a C++ software library called the Standard Template Library
(STL) that contains predefined, useful classes that are provided as part of the
C++ programming environment. By incorporating the STL library of classes
into a program, the programmer does not have to explicitly specify these data
structures. Two other examples of widely used object-oriented programming
languages are Java ( B.4.6 ) and C#.
Why do we need software engineering?
B.4.5. Bjarne Stroustrup designed
and implemented the C++ program-
ming language. Over the last two
decades, C++ has become the most
widely used language supporting
object-oriented programming and
has made abstraction techniques
affordable and manageable for main-
stream projects.
As we have seen, computer scientists originally hoped that programming
in a high-level language would, as Backus said, “virtually eliminate coding and
debugging.” 7 For small scientific programs written by one or two researchers,
programming certainly became much easier, with the hard work of converting
a FORTRAN program into efficient assembly code delegated to a computer pro-
gram, the compiler. However, many scientific programs nowadays are complex
simulation codes incorporating many different aspects of the problem under
investigation. Writing and debugging such programs has become much more
B.4.6. James Gosling is credited with the development of Java programming language. The name
can be traced back to the brand of coffee fueling the programming effort. A distinguishing feature
of a Java program is that it does not run directly on the hardware but on software called a “virtual
machine.” This “architecture-independent” implementation enables that movement of the code
from one computer to another without recompiling the code. Thanks to this “write once, run
anywhere” principle Java has become one the most popular programming languages especially for
web applications.
Search WWH ::




Custom Search