- Install JDK 11 on MacBook Pro with Retina Display from https://www.oracle.com/technetwork/java/javase/downloads/jdk11-downloads-5066655.html
- Install IntelliJ IDEA 2018.3.4 (Ultimate Edition) on a MacBook Pro with Retina Display
- Use IntelliJ IDEA open this project
- Right click App.java(assignment4tdd-sz/src/main/java/assignment4/App.java)
- Click "Run 'App.main()'"
This is Assignment 4 for CMPUT 402.
You need to enter integer numbers from 1 to 9 to a 3 by 3 grid.
Each number can be only used once.
You need to make the sum of each row and column and the two diagonal be 15.
- Enter your name.
- Enter "a" to add a number. Or Enter "d" to delete a number.
- Enter the row number of the cell.
- Enter the column number of the cell.
- If you enter "a" to add a number, it will ask you to enter the number that you want to add.
- After you fulfill the board, if you win, it will show a message saying that you win, which is followed by a score board.
- If your answer is not correct, it will ask you keep playing until you find the correct answer.
- The score board list all the players' name and their play time in seconds. They are sorted in ascending order. The player who uses the least time will appear at the top.
For more details please see http://www.dr-mikes-math-games-for-kids.com/3x3-magic-square.html
- Shuonan Pei
- Zhimao Lin
You can contact us through our ualberta email.
- http://tutorials.jenkov.com/java-date-time/system-currenttimemillis.html
- https://beginnersbook.com/2013/12/java-arraylist-of-object-sort-example-comparable-and-comparator/
- https://stackoverflow.com/questions/2279030/type-list-vs-type-arraylist-in-java
- https://stackoverflow.com/questions/1119385/junit-test-for-system-out-println
- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-test/2.1.2.RELEASE
- https://stackoverflow.com/questions/13364406/mock-a-constructor-with-parameter
- https://stackoverflow.com/questions/36119627/call-constructor-with-and-without-parameter-with-powermockito
- https://www.baeldung.com/mockito-void-methods
- https://stackoverflow.com/questions/15904584/mockito-gives-unfinishedverificationexception-when-it-seems-ok
- https://mvnrepository.com/artifact/org.powermock/powermock-api-mockito/1.7.3
- https://mvnrepository.com/artifact/org.powermock/powermock-module-junit4/1.7.4
- https://stefanbirkner.github.io/system-rules/
- powermock/powermock#901