Algorithms – Chapter 4

Introduction Mathematical intuition The logic of everyday life. (Common sense) It is easy to see that some human problems cannot be solved by mathematics. For example compare involvement and its counterpart,“If it rains, I take my umbrella.”“If I don’t take my umbrella, it doesn’t rain”Or the argued conjunction,“I don’t take my umbrella, so it doesn’t …

Read moreAlgorithms – Chapter 4

Algorithms – Chapter 3

The conditions A program does not always run sequentially. Normally it makes a decision at some point to execute only part of itself. Programming languages provide instructions on how to make these choices. Among these instructions we have conditional instructions. Conditional instruction (simple) Alternative (conditional) instruction Flowcharts were one of the important tools for writing …

Read moreAlgorithms – Chapter 3

Object-Oriented Programming with Java, part I – Exercise 58

This program accepts user input and adds it to a list until the user inputs the same word twice at which point it stops. My Code Model Code Comments I’ll count that as somewhat of an epic failure. My boolean variable could have been replaced by a simple break in the if statement and the …

Read moreObject-Oriented Programming with Java, part I – Exercise 58