DiamondDagger590 / Lesson1

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Lesson1

The goal of this lesson is to review basic computer science principles and prepare for the upcoming test.

Part 1

Reviewing Variables

  1. Difference between public and private

  2. What is the type of a variable and what does it mean?

  3. How is data saved?

  4. Difference between == and .equals()

  5. Scope of variable

Part 2

Reviewing Methods

  1. Difference between public and private methods

  2. What is the return type of a variable

  3. What happens to data inside a method after execution

  4. Usages of 'return'

Part 3

Reviewing Classes and Objects

  1. How to write a class

  2. What is an object

  3. Comparing objects

  4. How do methods in a class work?

  5. How do variables in a class work?

  6. Interfaces/Class heirarchy

Practice

  1. We want our bakery to contain a stack of cakes to sell.
  2. When you create a new bakery, the stack should be empty
  3. We want the bakery to be able to "bake a cake" (create a new cake object) (costs some of the profit)
  4. We want to store profits
  5. We want to get profits
  6. We want to be able to sell slices of cake
  7. We want to be able to tell if there is cake to sell.
  8. We want the cake interface to be able to tell us how many slices are eaten
  9. We want the cake interface to let us eat slices (why not a set slices method)?
  10. We want chocolate cake to implement the interface methods
  11. We want chocolate cake to store how many slices eaten
  12. When we create a new chocolate cake, we want it to be sliced a random amount
  13. In our Demo, we want to ask how many customers should be served.
  14. Use a for loop to serve all of the customers and print out the profit by the end of the day.

Part 4

Linked Structures

  1. Usages

  2. Visual Example

About


Languages

Language:Java 100.0%