Category Archives: Activity

Euclidean Points

Screen Shot 2015-09-07 at 9.38.05 PM   Screen Shot 2015-09-07 at 9.41.17 PM

ADTs refresher Project
Euclidean points. Create a data type EuclideanPoint (prefix your file with your initials YI_EuclideanPoint.java) that represents a d-dimensional point.
1. Write a method so that p.distanceTo(q) returns the Euclidean distance between points p and q.
2. Write a method so that p.midPoint(q) returns the Euclidean mid-point between points p and q.
3. Include a test class with at least three pair of points with different dimensions.
4. Before you start the implementation, use paper and pencil to show few examples using illustrations and computations.

screen-shot-2016-09-19-at-5-25-49-pm

Philadelphia Classic Spring 2016 Contest

November 23rd, 2015

Screen Shot 2015-11-22 at 7.23.19 PM

Philadelphia Classic Spring 2016 Contest

Start from problems 4 on in class and for homework.
Work with a partner. DO NOT LOOK FOR THE SOLUTIONS

Pay special attention to the following:
1. Make sure you read the instructions in the first 2 pages.
2. Read the problem many times before you get started.
3. Draft a plan on paper or a document before you start.
4. Test parts of the code before you develop the “whole” program.
5. Do not use outside help of any sort.
6. All students have to turn in the assignments to edmodo.com

Previous Contest Problems

Shellsort story

from Maha Hadaya

Once upon a time, Yami Yugi had a huge array of yugioh cards that needed to be sorted . Since he had collected them all, there were too many for a deck, so , he decided to go and separate his cards into stacks. Each deck could only hold 40 cards, since any more cards would decrease his drawing power. Having a limited amount of time , Yami realized he could not just trust the heart of the cards, such that it was up to him to sort his cards out manually. He broke the cards into stacks of 40 , in order to prevent the deck from spilling over when he used his deck box to separate the stacks. Now he had all the stacks, and decided to sort all of his stacks going from the top of the deck and comparing the second card and continuing with n to n+1. Spells and Traps had 0 atk, so they were moved to the top of the sets of 40. Now that Yami had his sets of yugioh cards sorted, he could sort everything by comparing stacks in the style of insertion sort as he had each individual stack.

yamiyugioh

Pi Day Activity

pi1

Monday is Pi Day – We will have a pi-day activity ending on Monday.

There are many algorithms designed to calculate the digits of pi.
1. Find at least 4 of them and show their time and space complexity. Explain their complexity.
2. List them from least efficient to most efficient.
3. Describe how you would implement the most efficient.

DOCUMENT YOUR MATHEMATICAL EXPRESSION AND THE LINK TO THE RESOURCE.