Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 7 additions & 11 deletions src/main/java/IntroLab.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,15 @@ public static String printLabMessage(String greeting, String name,
return message_to_print + message;
}

/* TODO: In the space below, write your our method.
* The method should be named with your utorID and should call
* printLabMessage with some parameters.
*
/*
* As a reference, we've provided the sample method exampleStudent.
* Make sure you document your method properly!
*/

public static String pedronic() {
return printLabMessage("Hello", "Nicholas", true,
"Welcome to CSC207!");
}
/**
* An example method that calls on printLabMessage.
*/
Expand All @@ -53,16 +54,11 @@ public static String exampleStudent() {
public static void main(final String[] args) {
System.out.println(exampleStudent());

/* TODO: Add a call to the method you wrote in this main method,
* and print the results of it.
*
/*
* As a reference, we've provided a sample call to exampleStudent
* above. Afterwards: run this file to see the output!
*/

System.out.println(pedronic());

}

// TODO: Go to test/java/IntroLabTest.java afterwards and complete the TODO.

}
12 changes: 9 additions & 3 deletions src/test/java/IntroLabTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,15 @@ public void testExampleStudent() {
assertEquals(expected, actual);
}

/* TODO: Write a test case for the method you wrote in IntroLab.
* If done properly, you should be able to run IntroLabTest and see
* the test results.
/*
* As a reference, we've included testExampleStudent above.
*/

@Test()
public void testPedronic(){
String expected = "Hello! My name is Nicholas! " +
"I like cats more than dogs! Welcome to CSC207!";
String actual = IntroLab.pedronic();
assertEquals(expected, actual);
}
}