CSE332: Data Abstractions Section 1 Hye In Kim Winter 2013.

Slides:



Advertisements
Similar presentations
Introduction to Java 2 Programming Lecture 4 Writing Java Applications, Java Development Tools.
Advertisements

Introduction to Eclipse. Start Eclipse Click and then click Eclipse from the menu: Or open a shell and type eclipse after the prompt.
Java Review Interface, Casting, Generics, Iterator.
C++ Templates. What is a template? Templates are type-generic versions of functions and/or classes Template functions and template classes can be used.
CHAPTER 12 GENERICS Introduction to java 1. Assignment 5 Solution See Eclipse.
1 ADT and Data Structure Example Generics / Parameterized Classes Using a Set Implementing a Set with an Array Example: SetADT interface Example: ArraySet.
George Blank University Lecturer. CS 602 Java and the Web Object Oriented Software Development Using Java Chapter 4.
Introduction to Java Lab CS110A – Lab Section 004 Instructor: Duo Wei.
1 Lecture 24 Abstract Data Types (ADT) –I Overview  What is an Abstract Data type?  What is Stack ADT?  Stack ADT Specifications  Array Implementation.
CSc 160 Overview of Fundamentals of Computer Programming II Spring (SO1) 2004.
1 Generics and Using a Collection Generics / Parameterized Classes Using a Collection Customizing a Collection using Inheritance Inner Classes Use of Exceptions.
Introduction to C++ Programming CS 117 Section 2 and KNET Sections Spring 2001 MWF 1:40-2:30.
CS 206 Introduction to Computer Science II 01 / 23 / 2009 Instructor: Michael Eckmann.
CPS 2231 Computer Organization and Programming Instructor: Tian (Tina) Tian.
Prepared by Uzma Hashmi Instructor Information Uzma Hashmi Office: B# 7/ R# address: Group Addresses Post message:
Java Programming, 3e Concepts and Techniques Chapter 2 - Part 2 Creating a Java Application and Applet.
Programming with JavaScript (Chapter 10). XP Various things Midterm grades: Friday Winter Career Fair – Thursday, April 28, 2011 (11 am to 3 pm). – MAC.
Java Programming, 3e Concepts and Techniques Chapter 3 Section 62 – Manipulating Data Using Methods – Day 1.
CS 106 Introduction to Computer Science I 01 / 25 / 2010 Instructor: Michael Eckmann.
SAK 3117 Data Structures Chapter 3: STACKS. Objective To introduce: Stack concepts Stack operations Stack applications CONTENT 3.1 Introduction 3.2 Stack.
Distributed Systems (236351) Tutorial 1 - Getting Started with Visual Studio C#.NET.
ACM/JETT Workshop - August 4-5, Guidelines For Using BlueJ.
Chapter 21 Generics 1. Generics - Overview Generic Methods specify a set of related methods Generic classes specify a set of related types Software reuse.
ICS 102 Computer Programming University of Hail College of Computer Science & Engineering Computer Science and Software Engineering Department.
CS 2430 Day 26. Announcements Exam #2: Wednesday, April 3 –Review in lab on Tuesday, April 2 –Sample problems sent via .
CSCE 2013L: Lab 1 Overview  Java Basics The JVM Anatomy of a Java Program  Object-Oriented Programming Overview  Example: Payroll.java JDK Tools and.
CSc2010 Lab Fall 2015 Bing Li. Contact  Name : Bing Li   Website : cs.gsu.edu/~bli6  Office : Suntrust.
1 Generics and Using a Collection Generics / Parameterized Classes Using a Collection Customizing a Collection using Inheritance Inner Classes Use of Exceptions.
Selected Topics in Information Technology Programming Language - JAVA Semester 1/2554.
CSC 212 Stacks & Queues. Announcement Many programs not compiled before submission  Several could not be compiled  Several others not tested with javadoc.
Introduction to Data Structures
ICS102: Introduction To Computing King Fahd University of Petroleum & Minerals College of Computer Science & Engineering Information & Computer Science.
Introduction to CSE 331 Software Design & Implementation Winter 2011
1 - 1 CS230: Data Structures Spring 2007 Reading:Downey: Chapters 1, 2, 3, Sections , 4.13, , Chapters 5 and 6 Problem Set:Problem Set.
Unit 1: Java and Eclipse The Eclipse Development Environment.
30 May Stacks (5.1) CSE 2011 Winter Stacks2 Abstract Data Types (ADTs) An abstract data type (ADT) is an abstraction of a data structure An.
Copyright © Curt Hill Generic Classes Template Classes or Container Classes.
1 Object-Oriented Programming Using C++ CLASS 1. 2 Review of Syllabus Catalog Description –An introduction to object oriented programming techniques using.
1 Generics Chapter 21 Liang, Introduction to Java Programming.
Types in programming languages1 What are types, and why do we need them?
1 ENGI 2420 Structured Programming (Lab Tutorial 7) Memorial University of Newfoundland.
JAVA COURSE 1 Computer Engineering Association. Compile your first program Public class Hello{ public class Hello(){ System.out.println(“Hello”); } puclic.
CS 206 Introduction to Computer Science II 09 / 11 / 2009 Instructor: Michael Eckmann.
1 CS1430: Programming in C++ Section 2 Instructor: Qi Yang 213 Ullrich
Liang, Introduction to Java Programming, Tenth Edition, (c) 2013 Pearson Education, Inc. All rights reserved. 1 Chapter 19 Generics.
CS 2430 Day 24. Announcements Quiz this Friday Program 5 posted on Monday Program 4 due date: Friday at 10pm Program 4 grace date: Wednesday at 10pm (don’t.
Week 2 - Friday.  What did we talk about last time?  Computing Big Oh.
CSE332: Data Abstractions Section 1 HyeIn Kim Spring 2013.
1 ENGI 2420 Structured Programming (Lab Tutorial 7) Memorial University of Newfoundland.
CSc 352 Debugging Tools Saumya Debray Dept. of Computer Science The University of Arizona, Tucson
Zach Tatlock / Winter 2016 CSE 331 Software Design and Implementation Lecture 13 Generics 1.
Generics. Writing typed checked generic code There are many instances where the type of the object is irrelevant : –The construction of data structures.
CS 367 Introduction to Data Structures Charles N. Fischer Fall s367.html.
“The desire for safety stands against every great and noble enterprise.” – Tacitus Thought for the Day.
Programming for Interactivity Professor Bill Tomlinson Tuesday & Wednesday 6:00-7:50pm Fall 2005.
Eclipse, Java basics, and Sox Iris Jianghong Shi.
Execution ways of program References: www. en.wikipedia.org/wiki/Integrated_development_environment  You can execute or run a simple java program with.
1 Chapter 21 Generics. 2 Objectives F To use generic classes and interfaces (§21.2). F To declare generic classes and interfaces (§21.3). F To understand.
Click to edit Master text styles Stacks Data Structure.
OOP Tirgul 10. What We’ll Be Seeing Today  Generics – A Reminder  Type Safety  Bounded Type Parameters  Generic Methods  Generics and Inner Classes.
RealTimeSystems Lab Jong-Koo, Lim
Chapter 6 Testing and running a solution. Errors X Three types Syntax Logic Run-time.
Object Based Programming Chapter 8. 2 Contrast ____________________ Languages –Action oriented –Concentrate on writing ________________ –Data supports.
Testing and Debugging.
Lecture 1: Welcome to CSE 373
Introduction to javadoc
Introduction to javadoc
ICS201 Introduction To Computing II
OOP Aga private institute for computer science 5th grade
SPL – PS1 Introduction to C++.
Presentation transcript:

CSE332: Data Abstractions Section 1 Hye In Kim Winter 2013

Section Agenda Introduction Generics Project 1 Eclipse Tutorial

Introduction - Me HyeIn (Han) Kim From Korea 5 th year Master’s student BS in Biology & CSE at UW Teaching section AA & AB - Office hour: Thursday 10:00 ~ 11:00, CSE

Introduction - You Name Year Home Town Interesting Fact about yourself What you did over the break

Generics What is generics? - Technique of writing class/Interface without specifying type of data it uses - Idea: class/interface can have type parameter Usually denoted as T or E

Generics What is generics? public interface List { void add(E x); … } public class Bag { private E item; public void setItem(E x) { item = x; } public E getItem( ) { return item; } }

Generics Why generics? - Pre Java 5: Objects public class Bag { private Object item; public void setItem( Object x ) { item = x; } public Object getItem() { return item; } } Bag b = new Bag(); b.setItem( "How about that?" ); String contents = (String) b.getItem();

Generics Why generics? Type Safe Containers - Main advantage: compile-time type checking Bag b = new Bag(); b.setItem( "How about that?" ); double contents = (double) b.getItem(); - Above code will have runtime error - Generics: Ensure correct type at compile time No need for cast or Type checking

Generics More Generics: References - Generics & Inheritance - Wild cards ndJUnit.pdf Textbook 1.4 ~ 1.5

Project 1 Sound Blaster! - Part A: Due next Wednesday, 11pm Part B: Due Tuesday Jan 22th, 11pm - Personal Project: No partners! Collaboration Policy Grading Policy Programming Guidelines

Project 1 Part A - Implement Stack ADT: Stores double Implement interface DStack Using Array (ArrayStack) Using Linked List (ListStack) Part B - Implement Stack ADT: Use generic Implement interface GStack Using Array (GArrayStack) Using Linked List (GListStack)

Project 1 Reverse.java - Handles all music stuff - No need to edit for part A - Reverses in.dat file and writes it to out.dat - Accepts 4 command line parameters Stack Implementation: array or list Content type: double or generic Input file name: ex) in.dat Output file name: ex) out.dat

Project 1 Sound Exchange (SOX) - Converts.wav file to.dat file & vice versa Reverse.java needs.dat file You need.wav file to play sound - Installed in lab machine - Use in command prompt / terminal ex) sox secret.wav secret.dat

Eclipse Tutorial Select WorkSpace

Eclipse Tutorial Create Project

Eclipse Tutorial Create Project

Eclipse Tutorial Create Class

Eclipse Tutorial Run Configuration (Command line Args)

Eclipse Tutorial Run Configuration (Command line Args)

Eclipse Tutorial Conditional Debugging

Eclipse Tutorial Conditional Debugging

Eclipse Tutorial Conditional Debugging

Eclipse Tutorial More Tutorials - Written Tutorial - Video Tutorial - Eclipse Shortkeys