Giter Club home page Giter Club logo

120_oop's Introduction

Object Oriented Programming

A repository for all exercises and notes for course 120 on OOP.

Lesson 1: OO Readings

Introduction - 6/1/18

OO Book - 14/1/18

Chapter 1: The Object Model

  • exercises 1 & 2 - 6/1/18

Chapter 2: Classes and Objects Pt 1

  • exercises 1 to 3 - 10/1/18

Chapter 3: Classes and Objects Pt 2

  • exercises 1 to 3 - 10/1/18

Chapter 4: Inheritance

  • exercises 1 to 8 - 14/1/18

Lesson 2: Object Oriented Programming

  • Introduction - 17/1/18
  • Lecture: Classes and Objects - 21/1/18
  • Lecture: Inheritance - 21/1/18
  • Lecture: Collaborator Objects - 21/1/18
  • Lecture: Modules - 21/1/18
  • Rubocop File - 22/1/18
  • Assignment: OO Rock Paper Scissors - 22/1/18
  • Walk-through: OO Rock Paper Scissors - 22/1/18
  • Walk-through: OO RPS Design Choice 1 - 22/1/18
  • Walk-through: OO RPS Design Choice 2 - 22/1/18
  • Rubocop OO RPS - 27/1/18
  • Coding Tips - 27/1/18
  • Rubocop: Assignment Branch Condition Size - 27/1/18
  • Finished in Late April

Lesson 3: More OO Ruby

  • Finished Lesson 3 on 16/05/2018

Lesson 4: OO Practice Problems

  • Intro - 16/05/2018
  • Easy 1 - 16/05/2018
  • Easy 2 - 16/05/2018
  • Easy 3 - 24/05/2018
  • Medium 1 - 24/05/2018
  • Hard 1 - 24/05/2018
  • Summary - 24/05/2018

Lesson 5: Slightly Larger OO Programs

  • Intro - 25/05/2018
  • Assignment: OO Tic Tac Toe - 26/05/2018
  • Walk-through: OO TTT Spike - 26/05/2018
  • Assignment: Some Improvements - 27/05/2018
  • Lecture: Discussion on OO TTT Code - 27/05/2018
  • Rubocop OO TTT - 27/05/2018
  • Assignment: OO TTT Bonus Features - 30/05/2018
  • Assignment: OO Twenty-One - 06/06/2018
  • Reference Implementation: OO Twenty-One - 06/06/2018
  • Rubocop OO Twenty-One - 06/06/2018

120_oop's People

Contributors

magneticregulus avatar

Watchers

James Cloos avatar

120_oop's Issues

RPS: Prevent more invalid entries for the Human's name

Currently, the only invalid entry allowed for the human when entering their name is an empty name. This does not account for:

  1. Spaces as names
  2. Names with trailing whitespace
  3. Automatically capitalising names (is this a desired feature?)
def set_name
    answer = nil
    loop do
      puts "What's your name?"
      answer = gets.chomp
      break unless answer.empty?
      puts 'Sorry, you must enter a name.'
    end
    self.name = answer
  end

Must be resolved before posting final file: Rock, Paper, Scissors, Lizard, Spock

RPS: Accept move initials when human chooses a move

Currently, the user must enter the full word for the move when making a choice. Add initials: r, p, sc, l, sp.

Should this be displayed to the Human player? Or should it be assumed that the user will try it?

  def choose
    choice = nil
    loop do
      puts "Please choose #{joiner(Move::CHOICES, ', ', 'or')}:"
      choice = gets.chomp.capitalize
      break if Move::CHOICES.include?(choice)
      puts 'Invalid choice.'
    end
    self.move = Move.new(choice)
  end

Must be resolved before posting final file: Rock, Paper, Scissors, Lizard, Spock

RPS: Allow Human player to enter "yes" and "no".

Currently, the program will only accept "y" and "n" as valid entry for the below method. Expand this by allowing the user to type in "yes" and "no".

  def play_again?
    answer = nil

    loop do
      puts 'Would you like to play again? (y/n)'
      answer = gets.chomp
      break if %w[y n].include?(answer.downcase)
      puts 'Invalid answer. Please choose y or n.'
    end

    answer.downcase == 'y'
  end

Must be resolved before posting final file: Rock, Paper, Scissors, Lizard, Spock

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.