Skip to content

code-workshops/pairing_demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pair Programming Demo

Rehearse as needed before class. Its a super simple demo but even 1 practice session will go a long way.

Code Snippets

For expedience, here are the snippets needed to get all the tests to pass. Any modifications should be rehearsed!

public class Number {
    private int value;

    public Number(int value) {
        this.value = value;
    }

    public Number plus(Number num) {
        return new Number(5);
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof Number)) return false;
        Number number = (Number) o;
        return value == number.value;
    }

    @Override
    public int hashCode() {
        return Objects.hash(value);
    }
}

About

Java demo for instructors to perform

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages