Common Computer Science References
Create a new AWS Instance for Unit 2:
use your dotfiles to recreate your PDE
―――――――――――――――
At the end of this lesson, you will be able to:
understand and create a basic class, then create an object from the class
structured programming
Functional Programming: only use items passed into it and have a return value(s)
History of Object Oriented Programming
around 1965, super recent!
read "Using OOP", Chapter 8, Computer Based Problem Solving
read "What is an Object"
go over Bicycle Class example:
Bicycle Example - TypeScript
Bicycle Example - Java
read over what a "Stack" is
consider a basic 3-number combination lock
taking into account what you read above, answer (on today's page) each of the questions that follow?
What is the lock's function?
Keeping in mind your answer to question number 1, what properties or characteristics would you use to describe the lock?
Describe the lock's behaviours - again, keep in mind what the function of the lock is and how it would perform that function?
re-create the MrCoxallStack:
we will continue to improve it over several days
make sure the "MrCoxallStack" class is in a separate file from the use of the stack class (your main)
ENSURE you include correct DocStrings as comments:
for now, make your class implement pushItem(stringItem) and showStack() -> stringValues
make your stub program just create a stack instance at this point and then use the "push" method
you will get some Linting errors for Java, that is OK for now
we will learn why shortly!
see below
do the above in a second language
mr_coxall_stack.py
main.py
output
Yes, I am so old that I also started programming in Pascal in high school and 1st year university. I also took a course in the early 90's with SmallTalk and did not really understand what and Object and Class were. It was totally strange concept after years of functional programming.
(And yes the SmallTalk I used had these strange windows and a mouse that were also totally strange to use!)
🐁 or🖱️?