U1: 0.6/1.0
U2: We taught
U3: 0.9/1.0
U4: 0.9/1.0
U5: 0.94/1.0
U6: 0.9/1.0
U7: 0.95/1.0
U8: 0.9/1.0
U9: -
U10: -
Topic 3.5 This was a silly mistake.
x=7 y=3
(x < 10) && (y < 0) is not true…
Value is 7/3 = 2
There are no decimal points because we are doing integer division, thus there is no remainder.
Topic 6.4
My Answer: 7 2 5 3 3 0 THis would be true if arr[k] and arr[k + 1] were printed instead of k and arr[k]
arr = {7, 2, 5, 3, 0, 10}
k = 0 arr[0] > arr[1] => 7 > 2 print(0 7 )
k = 1 arr[1] > arr[2] => 2 > 5
k = 2 arr[2] > arr[3] => 5 > 3 print(2 5 )
k = 3 arr[3] > arr[4] => 3 > 0 print(3 3 )
k = 4 arr[4] > arr[5] => 0 > 10
Answer: 0 7 2 5 3 3
Topic 6.2
My Answer: I and II
I. has control variable k that starts at 1 and increments by 1. The loop ends when k reaches data.length
II. has control variable k that starts at 0 and increments by 1 until data.length.
An ArrayIndexOutOfBoundsException
will occur when checking data[data.length – 1] and data[data.length – 1 + 1]
III. does check correctly.
Answer: I only
[“bear”, “zebra”, “bass”, “cat”, “koala”, “baboon”]
Going backwards in the list, if the animal’s name starts with b, remove the animal from that index, and put it at index 6 - k.
k = 5 “baboon” starts with b animal.size() - k => 6 - 5 = 1 [“bear”, “baboon”, “zebra”, “bass”, “cat”, “koala”]
k = 4 “koala” does not start with b
k = 3 “cat” does not start with b
k = 2 “bass” does not start with b animal.size() - k => 6 - 2 = 4 [“bear”, “zebra”, “bass”, “cat”, “koala”, “baboon”]
k = 1 “zebra” does not start with b
Answer: [“bear”, “zebra”, “bass”, “cat”, “koala”, “baboon”]
Topic 8.1
Silly mistake
New Array: 1 4 7 2 5 8 3 6 9
newArray[0][2] = 7
I forgot my rows and columns.
Topic 5.4
A rectangular box fits inside another box if its height, width, and depth of smaller box are less than corresponding value of larger box
I. provides getHeight, getWidth, getDepth II. methods smallerHeight, smallerWidth, and smallerDepth III. provides get SurfaceArea and getVolume (does not mean it is smaller)
Answer: I and II
Topic 4.1
mystery(6)
x = 1 y = 1
6 > 2 x = 1 + 1 = 2 y = 2 - 1 = 1 n = 5
5 > 2 x = 2 + 1 = 3 y = 3 - 1 = 2 n = 4
4 > 2 x = 3 + 2 = 5 y = 5 - 2 = 3 n = 3
3 > 2 x = 5 + 3 = 8 y = 8 - 3 = 5 n = 2
return x = 8
Topic 4.1
sum = 0 k = 1
sum < 12 or k > 4 0 < 12 sum = 1
k is always greater than 4, therefore there will be an infinite loop.
Topic 5.2
Point constructor!
I. center = new Point(); Has no parameter
II. center = new Point (a, b); Correctly uses parameters
III. center = new Point(); center.x = a; center.y = b; Tries to update x and y, but they are private variables and cannot be accessed.
Topic 3.6
Silly mistake: distributed operators wrong
(y > 10000) | (x > 1000 && x < 1500) |
((y > 10000) | (x > 1000)) && ((y > 10000) | (x < 1500)) |
Working with Big Tracta:
Overall, I enjoyed the time spent with my team. We worked together well most of the time. Our team worked collaboratively. I think what was unique about our team was that we each had our own strengths. Rachit was good at frontend. Theo was good at coming up with ideas. Kaiden and I focused on frontend. Our group worked collaboratively and got along, which allows us to bring new ideas to the table and further advance our project. I am proud of our resulting Stocktify project and think our features integrated together very well. However, I think our team could have done better job communicating. Next trimester, to fix communication issues, I think it would be beneficial for my group to start with aun update to begin every class to keep everybody up to date on the status of our project.
Things I have learned:
Future Plans: