Skip to content

Instantly share code, notes, and snippets.

rooZzz

Block or report user

Report or block rooZzz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View 6a.rb
class Coordinate
attr_accessor :id, :x, :y, :area, :blacklisted
def initialize(x, y, id)
@id = id
@x = x
@y = y
@area = 0
@blacklisted = false
View 6b.rb
class Coordinate
attr_accessor :id, :x, :y, :area, :blacklisted
def initialize(x, y, id)
@id = id
@x = x
@y = y
@area = 0
@blacklisted = false
View Dog.java
Dog(String name) {
this.name = DEFAULT_NAME;
}
View Dog.java
package pet;
class Dog {
private static final String DEFAULT_NAME = "Spot";
private String name;
Dog(String name) {
if (null == name) {
View InductionCounterTest.java
@Test
public void whenDecrementTwice_thenCounterIsMinusTwo() {
final int expected = -2;
final int actual = sut.decrement().decrement().getCounter();
assertEquals(expected, actual);
}
View Counter.java
package math;
class Counter {
private int counter;
Counter() {
counter = 0;
}
You can’t perform that action at this time.