- 1 mouse function
- 1 “helperf” function
- at least 15 total lines of code
In addition to the required Unit 2 Creative Task, if you want some extra credit, you can do the following assignment:
Research how groups work in CMU ( see the docs)
Write a program that
You can write this in one of empty creative a tasks.
For this creative task,
After you are done this, maybe you want to try this.
<!-- Required meta tags -->
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<!-- jQuery -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
Quarter 4 project
Prior iterations : https://mrmonline.org/supa-2020/ , https://mrmonline.org/web-design-programming-18-19/
Getting Starting with Solving Mazes
Soon we will be doing more challenging Mazes here : https://mrmonline.org/maze-activities-1/
Your maze should be able to be solved by 1 loop. You are allowed to add a few lines after the loop to “clean up” the solution if you want but the bulk of the maze should be solvable using a single while loop.
Submit both the map and your solution.
Let’s write a program for something like PowerSchool that helps organize a seating chart for students. There is a tester file at the page’s bottom.
First class : Student , from https://mrmonline.org/student-class/
This class mainly manages a 2-d array of student objects. Note: an empty seat in the chart will be designated by a null value.
private Student chart ; // rows and columns for where kids are
private String rosterName; //name of this roster
private String teacherName;
private int period ; //which period is this chart associated
public static final int DEFAULT_ROWS = 10;
public static final int DEFAULT_COLS = 10;
public int countEmptySeats() ; //returns the number of empty seats. As noted earlier, an empty seat is represented by a null value in the 2-d array of student s
Student getStudentChart() @returns chart
public int indexOf(Student stu); returns a 2 element array representing the row and column position of stu in chart ; [-1][-1] should be returned if stu is not in chart
public boolean setSeat(int row, int col, Student stu) - places Student Stu at that row and column . This can only be done if there is no student in that location. If a student already inhabits that row and column then the method should return false and not make any changes to chart .
public void swap(Student s1, Student s2) // this swaps the locations of s1 and s2
public Student getStudent(int row, int col) returns the student at the given row and col ; or null if the seat is empty
public void removeStudentAt(int row, int col) sets value of object at row and col to null
public boolean equals(SeatingChart other) // returns true if all aspects of other are equivalent to self.
public String toString(); //follow the conventions we have been using
public Student oldest() // returns the student object with the greatest age
public void randomize() // this randomizes the chart. This extra credit method is only available if you first meet with me to explain what I expect out of this.