Tik-76.138 Programming methodology - examination 28 August 1995
Merkitse koepaperiin kurssin nimi, päivämäärä, koko nimesi, koulutusohjelma ja opintokirjan numero. [Write the following information on your paper: The name of the course, date, your full name, your study programme and your study book number.]
1/4. Selitä lyhyesti seuraavat käsitteet (tai anna esimerkki): [Explain briefly the following concepts (or give an example):] (max 6 p.)
(a) Abstrakti kantaluokka [Abstract base class]
(b) Automaattinen muistinhallinta eli roskankeruu [Automatic memory management or garbage collection]
(c) C++ -luokan staattinen jäsenfunktio [Static member function of a C++ class]
(d) Funktion ylikuormitus C++:ssa [Function overloading in C++]
(e) Vakiojäsenfunktio C++:ssa [Constant member function in C++]
(f) Ystäväluokka C++:ssa [Friend class in C++]
2/4. Tietojen piilottaminen C++ -luokassa [Data hiding in C++ classes] (max 6 p.)
3/4. Heikko ja vahva tyypitys olio-ohjelmointikielissä. [Weak and strong typing in object-oriented programming languages.] (max 6 p.)
4/4. Piirrä oliokaavio seuraavista käsitteistä [Draw an object diagram with the following entities] (max 6 p.):
· Talo on kerrostalo tai omakotitalo. [A house is either a block of flats or a detached house.]
· Talolla on attribuuttina osoite. [A house has an address as attribute.]
· Kerrostalo koostuu huoneistoista, joilla on attribuuttina huoneiston numero. [A block of flats consists of flats, which have a flat number as attribute]
· Huoneisto koostuu huoneista. [A flat is composed of rooms.]
· Omakotitalo koostuu huoneista. [A detached house is composed of rooms.]
· Huone on keittiö, olohuone tai makuuhuone. [A room is a kitchen, living room or bedroom.]
· Huone liittyy yhteen tai useampaan viereiseen huoneeseen. Huoneiden välisen yhteyden attribuuttina on seinän paksuus. [A room is related to one or more adjacent rooms. The relationship has an attribute for the thickness of the wall.]