CSE116 / CSE504 Introduction to Computer Science II Dr. Carl Alphonce

advertisement
CSE116 / CSE504
Introduction to Computer Science II
Dr. Carl Alphonce
343 Davis Hall
alphonce@buffalo.edu
Office hours:
Thursday 12:00 PM – 2:00 PM
Friday 8:30 AM – 10:30 AM
OR request appointment via e-mail
PROFESSIONALISM
Turn off and put away electronics:
cell phones
pagers
laptops
tablets
etc.
© Dr. Carl Alphonce
ROADMAP
Class today
Guest (Wendy Jansson)
Advice
Clicker dry-run
Writing and running tests
Coming up
Test-Driven Development (TDD)
© Dr. Carl Alphonce
SPECIAL GUEST
Preparing for Technical Interviews
Wendy Jansson
CSE senior
Mondays, 5-6, Davis 338A
wendyjan@buffalo.edu
© Dr. Carl Alphonce
Get involved!
ADVICE
Student organizations
ACM student chapter
SWE student chapter
Robotics Club
Scientista
More at:
www.eng.buffalo.edu/undergrad/resources/clubdirectory
Let faculty know you
Office hours
UG research / projects
Internships / summer jobs
ADVICE
Summer REUs
Research Experiences for Undergraduates
Read e-mail from department
Donna Grant (CSE advisor, Davis 338R)
Prof. Atri Rudra (UG director, Davis 319)
Clicker slides
The content on the next four slides was
produced by:
Colleen Holcomb
Teaching and Learning Center
212 Capen Hall
716-645-7700
ubclicks@buffalo.edu
(with slights edits/updates by me)
To use clickers
When you get to class change your clicker to
the proper clicker channel.
What is a channel?
Clickers work like Walkie Talkies. They require
the clicker and the receiver (plugged into the
computer) to be on the same channel to accept
answers.
WE WILL ALWAYS USE CHANNEL 1
How to change the channel
RF
•
Channel (CH) or Go option
•
Light flashes green and red
•
Enter channel number
•
Press ch or go again
•
•
•
•
•
XR
Leave Presentation Mode?(Y)
Change Channel (4th option)
Current Channel
##
New Channel #?
____
Press Enter
Checkmark will confirm
NXT
•
Channel Button
•
Enter new channel number
•
Center button
•
Smiley face will confirm
How to change the channel
QT
•
Channel Button
•
Enter new channel number
•
Press ‘OK’
To answer questions:
Make sure clickers are in Presentation Mode
Presentation Mode allows clickers to send answers
NOTE: Sending a Message is not sending an answer.
Sending a message is a different function than Presentation
Mode. If you are using an NXT clicker and you see a back
arrow on the display screen in the bottom left corner, keep
hitting that button until it disappears. At that point you are
back in presentation mode.
Support Resources
UBclicks website
Google – buffalo.edu: UBclicks Student/Faculty
UBclicks Support Team
ubclicks@buffalo.edu
Center for Educational Innovation
212 Capen Hall
716-645-7700
Turning Point user guides
https://www.turningtechnologies.com/user-guides
UB Bookstore
Dry run time
Let’s get a sense of who you all are.
channel 1
What is your year at UB?
A.
B.
C.
D.
E.
F.
G.
Freshman (1st year)
Sophomore (2nd year)
Junior (3rd year)
Senior (4th year)
Super senior (5+ years)
Graduate student
Other
What is your major?
A.
B.
C.
D.
E.
Computer Science
Computer Engineering
another Engineering major
an Arts & Sciences major
none other above
Whatisyourpriorprogrammingexperience?
A. CSE115 only
B. CSE115 and CSE113
C. CSE115 and some
other programming
class(es)
D. CSE115 and
programming on my
own < one year
E. CSE115 and
programming on my
own >= one year
F. Other
a void parameterless method
Writing a test
@Test annotation
defines test data, expected (correct) answer,
computes actual answer
compares expected and actual using assertTrue
© Dr. Carl Alphonce
@Test public void sampleTestMethod() {
ArrayList<String> list = new ArrayList<String>();
list.add("Fred");
list.add("Wilma");
int expected = 2;
int actual = list.size();
assertTrue("I expected the size to be " +
expected + " but it was " + actual,
actual == expected);
}
© Dr. Carl Alphonce
Download