Beruflich Dokumente
Kultur Dokumente
Pemrograman Dasar 2
TEKNIK KOMPUTER @2018
Informasi Mata Kuliah
Pre Test
Ketrampilan/Keahlian: 50%
Post Test 1 : 25%
Post Test 2 : 25%
Pointer
A pointer is a variable whose value is the address of
another variable. Like any variable or constant, you must
declare a pointer before you can work with it.
Review Singkat
Dynamic Memory
Until now, in all our programs, we have only had as much
memory available as we declared for our variables, having
the size of all of them to be determined in the source
code, before the execution of the program. But, what
if we need a variable amount of memory that can only be
determined during runtime? For example, in the case
that we need some user input to determine the necessary
amount of memory space.
Data Structures
C/C++ arrays allow you to define variables that combine
several data items of the same kind, but structure is
another user defined data type which allows you to
combine data items of different kinds.
Structures are used to represent a record, suppose you
want to keep track of your books in a library. You might
want to track the following attributes about each book:
Title
Author
Subject
Book ID
Review Singkat
Class
A class is used to specify the form of an object and it
combines data representation and methods for
manipulating that data into one neat package. The data
and functions within a class are called members of the
class.
Inheritance
A key feature of C++ classes is inheritance. Inheritance
allows to create classes which are derived from other
classes, so that they automatically include some of its
"parent's" members, plus its own. For example, we are
going to suppose that we want to declare a series of
classes that describe polygons like our CRectangle, or like
CTriangle. They have certain common properties, such as
both can be described by means of only two sides:
height and base.
Review Singkat
Polymorphism
The word polymorphism means having many forms.
Typically, polymorphism occurs when there is a hierarchy
of classes and they are related by inheritance.
C++ polymorphism means that a call to a member
function will cause a different function to be executed
depending on the type of object that invokes the function.
Review Singkat
Visual Programming
Pre Test (40 menit)