Skip to content

Instantly share code, notes, and snippets.

View kenechiokolo's full-sized avatar

KC Okolo kenechiokolo

View GitHub Profile
@kenechiokolo
kenechiokolo / Breakout
Created April 3, 2015 14:18
CS106A Assignment 3
/*
* File: Breakout.java
* -------------------
* Name:
* Section Leader:
*
* This file will eventually implement the game of Breakout.
*/
import acm.graphics.*;
import acm.program.*;
public class String_Methods extends ConsoleProgram {
public void run() {
while (true) {
String digits = readLine("Enter a numerical string: ");
if (digits.length() == 0) break;
println(addCommasToNumericString(digits));
}
}
@kenechiokolo
kenechiokolo / Hangman (Under Construction)
Created April 11, 2015 10:13
CS106A Assignment 4 - Hangman
import acm.graphics.*;
import acm.program.*;
import acm.util.*;
import java.awt.*;
public class Hangman_II extends ConsoleProgram {
public HangmanLexicon lexicon = new HangmanLexicon(); // creates an object of type HangmanLexicon
private final static int N_HANGMAN_PARTS = 8; // number of parts to draw to complete hangman drawing
@kenechiokolo
kenechiokolo / Hangman Game (Console Game)
Created April 12, 2015 14:36
Hangman Game (CS106A Assignment 4 Part I)
import acm.graphics.*;
import acm.program.*;
import acm.util.*;
import java.awt.*;
public class Hangman_II extends ConsoleProgram {
public HangmanLexicon lexicon = new HangmanLexicon(); // creates an object of type HangmanLexicon
private final static int N_HANGMAN_PARTS = 8; // number of parts to draw to complete hangman drawing
@kenechiokolo
kenechiokolo / Hangman_II.java
Created April 17, 2015 12:10
Hangman Game (Complete) (CS106A Assignment)
import acm.graphics.*;
import acm.program.*;
import acm.util.*;
import java.awt.*;
public class Hangman_II extends ConsoleProgram {
private final static int N_HANGMAN_PARTS = 8; // number of parts to draw to complete hangman drawing
@kenechiokolo
kenechiokolo / HangmanCanvas.java
Created April 17, 2015 12:12
Hangman Canvas (CS106A Assignment 4)
/*
* File: HangmanCanvas.java
* ------------------------
* This file keeps track of the Hangman display.
*/
import acm.graphics.*;
public class HangmanCanvas extends GCanvas {
@kenechiokolo
kenechiokolo / HangmanLexicon.java
Created April 17, 2015 12:13
Hangman Lexicon (CS106A Assignment 4)
/*
* File: HangmanLexicon.java
* -------------------------
* This file contains a stub implementation of the HangmanLexicon
* class that you will reimplement for Part III of the assignment.
*/
import java.util.*;
import java.io.*;
@kenechiokolo
kenechiokolo / Code for CoreData Video Walkthrough
Created August 26, 2015 16:13
CoreData to CSV file code walkthrough
// MARK: Export functions
func createExportString() -> String {
var date: NSDate? = NSDate()
var worktime: Double?
var breaktime: Double?
var studyRate: Double?
var studyQuota: Double?
var hoursLeft: Int?
var distractionCount: Int?
@kenechiokolo
kenechiokolo / OurTableViewController.swift
Last active March 18, 2016 21:01
Dynamic TableView Tutorial Example
//
// OurTableViewController.swift
// TableView Tutorial
//
// Created by Kc on 02/11/2015.
// Copyright © 2015 Kenechi Okolo. All rights reserved.
//
import UIKit
@kenechiokolo
kenechiokolo / ViewController.swift
Created February 22, 2016 14:01
Code for NSTimer Tutorial
//
// ViewController.swift
// NSTimerTutorial
//
// Created by Kc on 22/02/2016.
// Copyright © 2016 Kenechi Okolo. All rights reserved.
//
import UIKit