100% tevredenheidsgarantie Direct beschikbaar na je betaling Lees online óf als PDF Geen vaste maandelijkse kosten 4,6 TrustPilot
logo-home
Samenvatting

Summary Programming Logic and Design Ch 4

Beoordeling
-
Verkocht
-
Pagina's
4
Geüpload op
15-11-2025
Geschreven in
2025/2026

This document provides an in depth and thorough summary of chapter 4 of Programming Logic and Design. It is ready for exam and tests. Everything is laid out as it is in the textbook. All needed information is provided in short. It is written in an easy to study format and reads easy. I got distinctions in exams and tests.

Meer zien Lees minder
Instelling
Vak








Oeps! We kunnen je document nu niet laden. Probeer het nog eens of neem contact op met support.

Gekoppeld boek

Geschreven voor

Instelling
Vak

Documentinformatie

Heel boek samengevat?
Nee
Wat is er van het boek samengevat?
4
Geüpload op
15 november 2025
Aantal pagina's
4
Geschreven in
2025/2026
Type
Samenvatting

Onderwerpen

Voorbeeld van de inhoud

Chapter 4

Describe the selection structure
 Boolean expressions can only be true or false (yes or no / 1 or 0) - used in every selection
structure
 Dual-alternative (binary) selection structure- action for each possible outcome-
true/false (if-then-else)
 Single-alternative (unary) selection structure- actions for only one outcome (if-then) -
otherwise null
 if then clause- holds action executed when condition in decision is true
 else clause- executes only when tested condition in decision is false


List the relational comparison operators
 Relational comparison operators
 Two values compared could be variables or constants
 Variables have to be the same data type

= > < >= <= <>
equal greater less than greater or less or not equal
(==) than equal equal (! =)

  Restrict use of "if without else" - only take action when comparison is false (best to use
positive (true) outcome)
 Sometimes code is clearest in negative "if without an else"
if customerZipCode <> LOCAL_ZIP_CODE then
total = total + deliveryCharge
endif
 Trivial expression (currentTotal = previousTotal)
 Will always evaluate to the same result, never use
 Example: true for 20 = 20 / false for 30 = 40
 Common mistakes when using relational operators
 missing boundary for selection, double check – saying over 65, is it >65 or >= 65?


Use AND logic
 Compound condition - ask multiple questions before outcome is determined
 AND decision
 Requires that both of the two tests evaluate to true
 Requires a nested if or a cascading if statement


 Nesting AND decision for efficiency
 With nesting decisions, either selection can come first
 Performance time can be improved by asking questions in the right order
€3,25
Krijg toegang tot het volledige document:

100% tevredenheidsgarantie
Direct beschikbaar na je betaling
Lees online óf als PDF
Geen vaste maandelijkse kosten


Ook beschikbaar in voordeelbundel

Maak kennis met de verkoper

Seller avatar
De reputatie van een verkoper is gebaseerd op het aantal documenten dat iemand tegen betaling verkocht heeft en de beoordelingen die voor die items ontvangen zijn. Er zijn drie niveau’s te onderscheiden: brons, zilver en goud. Hoe beter de reputatie, hoe meer de kwaliteit van zijn of haar werk te vertrouwen is.
tanjanel1303 Rosebank College (Pretoria)
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
10
Lid sinds
1 jaar
Aantal volgers
2
Documenten
47
Laatst verkocht
2 maanden geleden

5,0

2 beoordelingen

5
2
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

Veelgestelde vragen