Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 4 out of 172 pages
Summary

Samenvatting Programmeren 1 - theorie OO concepten (periode 1 en 2)

Document preview thumbnail
Preview 4 out of 172 pages

Een samenvatting van de theorie van OO concepten, een subvak van programmeren 1 uit toegepaste informatica aan kdg.

Content preview

PROGRAMMEREN
1-P1




KDG | 2021

,Inhoudsopgave

H1: Inleiding .......................................................................................................................5
1.1 Omzetten 3GL naar binair ................................................................................................ 6
1.2 Toepassingen.................................................................................................................... 8

H2: Java Development Kit ...................................................................................................8
2.1 JRE .................................................................................................................................... 8
2.2 JDK .................................................................................................................................... 9

H3: Het eerste Java programma..........................................................................................9
3.1 Compileren van de broncode ......................................................................................... 10
3.2 Uitvoeren van de bytecode ............................................................................................ 10

H4: Programmeeralgoritmen ............................................................................................ 11
4.1 Algoritme omzetten naar Java ....................................................................................... 12
4.2 Volledige broncode ........................................................................................................ 13

H5: De Java Programmeertaal .......................................................................................... 13
5.1 Variabelen en literals ..................................................................................................... 13
5.1.1 Variabele .................................................................................................................. 13
5.1.1.2 Naam variabele ..................................................................................................... 14
5.1.1.3 Opmerkingen ........................................................................................................ 15
5.1.1.4 Code convention.................................................................................................... 15
5.1.2 Literals ........................................................................................................................ 15
5.1.2.1 Een final variabele ................................................................................................. 17
5.1.2.2 Conversie tussen de types ..................................................................................... 17
5.2 Operatoren ..................................................................................................................... 18
5.2.1 Rekenkundige operatoren ........................................................................................ 18
5.2.2 Relationele operatoren ............................................................................................ 19
5.2.3 Logische operatoren................................................................................................. 19
5.2.4 Toekenningsoperatoren ........................................................................................... 20
5.2.5 Conditionele operatoren .......................................................................................... 21
5.2.6 Overige operatoren (voor volledigheid) ................................................................... 21
5.2.7 Prioriteitsregels ........................................................................................................ 21
5.3 Uitdrukkingen, statement en codeblok .......................................................................... 22
5.3.1 Uitdrukkingen........................................................................................................... 22


1

, 5.3.2 Statement ................................................................................................................ 22
5.3.3 Codeblokken ............................................................................................................. 23
5.3.4 Scope ........................................................................................................................ 24

5.4 Constructies ................................................................................................................ 25
5.4.1 If statement ................................................................................................................. 25
Syntax ............................................................................................................................... 26
Schematische voorstelling................................................................................................. 26
5.4.2 If … else statement ...................................................................................................... 26
Syntax ............................................................................................................................... 26
Schematische voorstelling................................................................................................. 27
Genestelde if ..................................................................................................................... 27
5.4.3 Switch statement ........................................................................................................ 28
Syntax ............................................................................................................................... 28
5.4.4 While lus ...................................................................................................................... 29
Syntax ............................................................................................................................... 29
Schematische voorstelling................................................................................................. 29
Opmerkingen .................................................................................................................... 30
5.4.5 Do while lus ................................................................................................................. 30
Syntax ............................................................................................................................... 31
Schematische voorstelling................................................................................................. 31
5.4.6 For lus .......................................................................................................................... 31
Syntax ............................................................................................................................... 32
Schematische voorstelling................................................................................................. 32
Opmerkingen .................................................................................................................... 32
5.4.7 Soorten codeblokken .................................................................................................. 33

H6 Object georiënteerd programmeren ............................................................................ 33
6.1 Inleiding .......................................................................................................................... 33
6.1.1 Objecten ................................................................................................................... 34
6.1.2 Boodschappen .......................................................................................................... 34
6.1.3 Klassen ..................................................................................................................... 35
6.2 Werken met objecten .................................................................................................... 36
6.2.1 Objecten maken ....................................................................................................... 36
6.2.2 Random .................................................................................................................... 37
6.2.3 Referentie ................................................................................................................. 39
6.2.4 Pakket ...................................................................................................................... 40


2

, 6.2.5 Garbage collection ................................................................................................... 42
6.3 Eenvoudige objecten ...................................................................................................... 42
6.3.1 De klasse string ........................................................................................................ 42
6.3.2 String creatie ............................................................................................................ 43
6.3.3 String methoden ...................................................................................................... 44
6.3.4 Strings samenvoegen ............................................................................................... 45
6.3.5 De klasse Stringbuilder ............................................................................................. 46
6.4 Formatteren ................................................................................................................... 47

H7: Klassen ....................................................................................................................... 49
7.1 Inleiding .......................................................................................................................... 49
7.2 Naamgeving.................................................................................................................... 49
7.3 Nieuwe klasse ................................................................................................................. 49
7.3.1 Wat schrijven we zoal in de body van een klasse? ................................................... 50

H8 Arrays .......................................................................................................................... 79
8.1 inleiding .......................................................................................................................... 79
8.2 Creatie van een array ..................................................................................................... 80
8.2.1 Arrays met objecten erin .......................................................................................... 81
8.2.2 Niet opgevulde arrays .............................................................................................. 81
8.2.3 Length ...................................................................................................................... 81
8.3 Arrays uitlezen................................................................................................................ 82
8.4 For each lus .................................................................................................................... 82
8.5 Toepassingen arrays ....................................................................................................... 84
8.6 Geheugenstructuur arrays en primitieve types ............................................................. 85
8.7 Arrays in arrays............................................................................................................... 85
8.7.1 Tweedimensionale arrays ........................................................................................ 85
8.7.2 Jagged arrays ........................................................................................................... 87
8.7.3 Driedimensionale arrays .......................................................................................... 87




3

Document information

Study
Uploaded on
January 19, 2023
Number of pages
172
Written in
2021/2022
Type
Summary
$12.51

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Sold
30
Followers
6
Items
21
Last sold
1 month ago




Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions