Elevens lab: Install – Sorts Class Activity

CLASS ACTIVITY

NOTE: YOU CAN USE ANY RESOURCES
Quicksort Trace 1 through 10:
Gavin, Jackson, Philip, and Eric
IDENTIFY PIVOTS

Quicksort Trace 10 through 1:
Crystal, Ibhan, James, and Leon
IDENTIFY PIVOTS

Insertion sort trace 1 through 10:
David Cohen, Martha, Sam, and Aidan

Enactment of Quicksort: 25, 32, 5, 15, 100, 2, 75, 80
Larry, Nick, Harry, Alex, Erina, David Choo, Mo, David H, and Justin
IDENTIFY PIVOTS

Enactment of Mergesort: 25, 32, 5, 15, 100, 2, 75, 80
Daphne, Andy, Andrew, Mark, Adam, Peter, Steph, Jack and Niandong

Homework:
The Elevens game – installed the data and download the pdf.

Screen Shot 2015-02-23 at 2.26.16 PM

Tying up lose ends for the AP Exam

What is null in Java?

There is also a special null type, the type of the expression null, which has no name. Because the null type has no name, it is impossible to declare a variable of the null type or to cast to the null type. The null reference is the only possible value of an expression of null type. The null reference can always be cast to any reference type. In practice, the programmer can ignore the null type and just pretend that null is merely a special literal that can be of any reference type.

Autoboxing and Unboxing

Review Wish list:
built in types >> primitive data type
hexadecimal and octal numbers
stacks and cues
operators >> assignment
escape sequences: \n \” \
boolean algebra
STATIC (everything)
try catch exceptions (throwing exceptions)
INHERITANCE
POLYMORPHISM
type compatibility (down casting abstract classes)
Wrapper class
syntax for arrays vs array list
2d array syntax
tracing recursive methods
SORTS >> selection, insertion, merge, quick
SEARCHES >> binary, sequential
Big O Notation

AP Exam Review: Concepts Refresher

May 1st, 2015
Screen Shot 2014-09-17 at 12.56.56 PM

Classwork and Homework posted on edmodo.com
Lab review questions.
AP Exam 2009, questions 1, 3 and 4.

Concepts Refresher:

Screen Shot 2015-04-30 at 9.11.51 PM
Default Constructor:
The default constructor is the no-argument constructor automatically generated unless you define another constructor. It initialises any uninitialised fields to their default values. For your example, it would look like this assuming that the types are String, int and int:


public Module()
{
  super();
  this.name = null;
  this.credits = 0;
  this.hours = 0;
}

This is exactly the same as


public Module()
{}

And exactly the same as having no constructors at all. However, if you define at least one constructor, the default constructor is not generated.

Screen Shot 2015-04-30 at 9.26.09 PM

Method Overloading and Method Overriding.

1) In Method Overloading your method calls to the methods are decided by the compiler in the sense that which function is going to be called is decided by your compiler at compile time. Hence being EARLY BINDING.

2) In method Overriding, it is decided at RUNTIME which method is going to be called. So it is reffered as LATE BINDING.

Magpie Lab 1

April 9th, 2015

Magpie Lab

magpie

Classwork: Activity 4
Responses to Transform Statements

Turing-test

The Turing Test: Computing Machinery and Intelligence

As Stevan Harnad notes, the question has become “Can machines do what we (as thinking entities) can do?” In other words, Turing is no longer asking whether a machine can “think”; he is asking whether a machine can act indistinguishably from the way a thinker acts.

2014 University of Reading competition
On 7 June 2014 a Turing test competition, organized by Huma Shah and Kevin Warwick to mark the 60th anniversary of Turing’s death, was held at the Royal Society London and was won by the Russian chatter bot Eugene Goostman. The bot, during a series of five-minute-long text conversations, convinced 33% of the contest’s judges that it was human. Judges included John Sharkey, a sponsor of the bill granting a government pardon to Turing, AI Professor Aaron Sloman and Red Dwarf actor Robert Llewellyn.

goostman

The competition’s organisers believed that the Turing test had been “passed for the first time” at the event, saying that “some will claim that the Test has already been passed.

Screen Shot 2015-04-09 at 1.57.56 PM

Homework: Finish the activity.

The Magpie Lab 2

March 23rd, 2015

The Magpie Chatbot Lab
Visit edmodo.com for the student guide.

Screen Shot 2015-03-23 at 12.57.30 AM

Classwork:
Exploration
Have several conversations with your chatbot and answer the following questions:
• How does it respond to “where do you come from”?
• What is the most interesting response?
• What is the most peculiar response?
• How does it respond to “asdfghjkl;”? Exercises
Work with another group and have two different chatbots converse with each other.

Homework:
2 Questions
Simple chatbots act by looking for key words or phrases and responding to them.
1. Can you identify keywords to which your chatbot responds?
2. Think of several keywords and the responses they might cause.