Skip to content

Commit

Permalink
feat(5.3): finish unit 5 lesson 3 activities
Browse files Browse the repository at this point in the history
  • Loading branch information
101zh committed Nov 13, 2023
1 parent 6d8178b commit 6545928
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/main/java/Unit5/U5_L3_Activity_One.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// /* Lesson 3 Coding Activity Question 1 */

// import java.util.Scanner;
// import shapes.*;

// public class U5_L3_Activity_One
// {

// /* Add the method makeEqTriangle here */

// // You can uncomment and add to the main method to test your code
// // You will need to remove/comment out this method before submitting your code

// public static void makeEqTriangle(RegularPolygon poly){
// poly.setNumSides(3);
// }

// // public static void main(String[] args){

// // }

// }
24 changes: 24 additions & 0 deletions src/main/java/Unit5/U5_L3_Activity_Three.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// /* Lesson 3 Coding Activity Question 3 */

// import java.util.Scanner;
// import shapes.*;

// public class U5_L3_Activity_Three
// {

// /* Add the method updateNumSides here */

// // You can uncomment and add to the main method to test your code
// // You will need to remove/comment out this method before submitting your code

// public static void updateNumSides(RegularPolygon poly, int sides){
// poly.setNumSides(sides);

// }

// /*
// public static void main(String[] args){

// }
// */
// }
40 changes: 40 additions & 0 deletions src/main/java/Unit5/U5_L3_Activity_Two.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// /* Lesson 3 Coding Activity Question 2 */

// import java.util.Scanner;
// import shapes.*;
// import testing.Math;

// public class U5_L3_Activity_Two {

// /* Add the method randomize here */

// // You can uncomment and add to the main method to test your code
// // You will need to remove/comment out this method before submitting your code

// public static void randomize(Rectangle rect) {
// int width = ((int) (Math.random() * 4) * 2) + 7;
// int length = ((int) (Math.random() * 6) * 2) + 10;

// rect.setWidth(width);
// rect.setLength(length);
// }

// /*
// public static void main(String[] args) {
// Rectangle rect = new Rectangle();
// System.out.println(rect);
// randomize(rect);
// System.out.println(rect);
// randomize(rect);
// System.out.println(rect);
// randomize(rect);
// System.out.println(rect);
// randomize(rect);
// System.out.println(rect);
// randomize(rect);
// System.out.println(rect);
// randomize(rect);
// System.out.println(rect);
// }
// */
// }

0 comments on commit 6545928

Please sign in to comment.