July 20042011 Overview1 COMP 2011 Data Organisation 2004 Session 2 Lecturer: Alan Blair Head Tutor: Loc Huynh.

Slides:



Advertisements
Similar presentations
CS1020 Week 3: 29th January 2015.
Advertisements

CS1101: Programming Methodology
COMP171 Data Structures and Algorithms Spring 2009.
James Tam Simple File Input And Output Types of Java Files Simple File Output in Java Simple File Input in Java.
James Tam Simple file handling in Java Simple File Input And Output Types of Java files Simple file output in Java Simple file input in Java.
COMP171 Data Structures and Algorithms Spring 2009.
S Overview1 COMP 2011/2711 Data Organisation 2006 Session 1 Lecturer: Norman Foo Head Tutor: Loc Huynh; others to be nominated.
March 2004Object Oriented Design1 Object-Oriented Design.
ICS 201 Course Overview.
Files and Streams CS 21a Chapter 11 of Horstmann.
James Tam Simple File Input And Output Types of Java Files Simple File Output in Java Simple File Input in Java.
1 Text File I/O Overview l I/O streams l Opening a text file for reading l Reading a text file l Closing a stream l Reading numbers from a text file l.
COMP171 Data Structures and Algorithm Qiang Yang Lecture 1 ( Fall 2006)
Computer Science - I Course Introduction Computer Science Department Boston College Hao Jiang.
School of Computing Science – CMT1000 Slide 1 Ed Currie Introduction to Programming CMT1000 Lecture 1A.
METU Computer Engineering Department
Instructor: Dr. Sahar Shabanah Fall Lectures ST, 9:30 pm-11:00 pm Text book: M. T. Goodrich and R. Tamassia, “Data Structures and Algorithms in.
CSC3170 Introduction to Database Systems
CPS 2231 Computer Organization and Programming Instructor: Tian (Tina) Tian.
© 2004 Goodrich, Tamassia CS2210 Data Structures and Algorithms Lecture 1: Course Overview Instructor: Olga Veksler.
INTRODUCTION TO DATA STRUCTURES AND ALGORITHMS Marcus Frean School of Engineering and Computer Science, Victoria University of Wellington COMP T2.
CPT: Prelim/01 Computer Programming Techniques v Objectives –to give some background on this subject CPT, Semester Preliminaries.
Very Brief Introduction to Java I/O with Buffered Reader and Buffered Writer.
CSC 120 Introduction to Programming Dr Andreas Loizides c.cy des/CSC120.
© Xiaoying Gao, Peter Andreae Introduction to Computer Program Design COMP T2. Xiaoying (Sharon) Gao Computer Science Victoria University of Wellington.
CS1101: Programming Methodology Recitation 3 – Control Structures.
ICS 102 Computer Programming University of Hail College of Computer Science & Engineering Computer Science and Software Engineering Department.
Course Web Page Most information about the course (including the syllabus) will be posted on the course wiki:
Geoff Holmes and Bernhard Pfahringer COMP206-08S General Programming 2.
CSCI 51 Introduction to Computer Science Dr. Joshua Stough January 20, 2009.
ASDA: Prelim/ Advanced Data Structures and Algorithms Objective – –to give some background on the course Semester 2, Who I am: Andrew.
Exceptions. Exception Abnormal event occurring during program execution Examples –Manipulate nonexistent files FileReader in = new FileReader("mumbers.txt“);
Data Structures (Second Part) Lecture 1 Bong-Soo Sohn Assistant Professor School of Computer Science and Engineering Chung-Ang University.
INTRODUCTION TO DATA STRUCTURES AND ALGORITHMS Marcus Frean School of Engineering and Computer Science, Victoria University of Wellington COMP T2.
COMP2012 Object-Oriented Programming and Data Structures Fall 2015.
CS 206 Introduction to Computer Science II 09 / 10 / 2009 Instructor: Michael Eckmann.
CMSC 2021 CMSC 202 Computer Science II for Majors Fall 2002 Mr. Frey (0101 – 0104) Mr. Raouf (0201 – 0204)
1 CSE1301 Computer Programming: Revision. 2 Topics Type of questions What do you need to know? About the exam Exam technique Staff consultation Revision.
© Xiaoying Gao, Peter Andreae Introduction to Computer Program Design COMP T2. Xiaoying (Sharon) Gao Computer Science Victoria University of Wellington.
Chapter 15 Text Processing and File Input/Output Lecture Slides to Accompany An Introduction to Computer Science Using Java (2nd Edition) by S.N. Kamin,
Introduction to ECE 2401 Data Structure Fall 2005 Chapter 0 Chen, Chang-Sheng
Instructor: Alexander Stoytchev CprE 185: Intro to Problem Solving (using C)
CS 206 Introduction to Computer Science II 09 / 11 / 2009 Instructor: Michael Eckmann.
CS101 Lab “File input/Output”. File input, output File : binary file, text file READ/WRITE class of “text file” - File Reading class : FileReader, BufferedReader.
Pengantar OOP Class-Java. 2 Software Development Tools Using Sun Java SDK alone Source File(s) (.java) Programmer Compiler (javac) Class File(s) (.class)
INTRODUCTION TO DATA STRUCTURES AND ALGORITHMS Thomas Kuehne School of Engineering and Computer Science, Victoria University of Wellington COMP T2.
CMSC 2021 CMSC 202 Computer Science II for Majors Spring 2001 Sections Ms. Susan Mitchell.
CMSC 2021 CMSC 202 Computer Science II for Majors Spring 2003 Mr. Frey (0101 – 0104) Mr. Raouf (0201 – 0204)
COMP1927 Course Introduction 16x1
Exceptions. Exception  Abnormal event occurring during program execution  Examples Manipulate nonexistent files FileReader in = new FileReader("mumbers.txt“);
King Saud University1 CSC 112 Java Programming I Introduction.
Course Info Instructor U.T. Nguyen Office: CSEB Office hours: Tuesday, 14:30-15:30 Thursday, 12:00-12:45 By.
Data Structures and Algorithms in Java AlaaEddin 2012.
COMP 103 wrapping up and some exam tips 2015-T2 Lecture 32 Marcus Frean School of Engineering and Computer Science, Victoria University of Wellington 
Principles of Imperative Computation Lecture 1 January 15 th, 2012.
1 CENG 707 Data Structures and Algorithms Nihan Kesim Çiçekli Department of Computer Engineering Middle East Technical University Fall 2013.
CENG 213 Data Structures1 Nihan Kesim Çiçekli Department of Computer Engineering Middle East Technical University.
Object Oriented Programming Lecture 2: BallWorld.
COMP9024: Data Structures and Algorithms Course Outline Hui Wu Session 1, 2016
CENG 213 Data Structures Nihan Kesim Çiçekli
CENG 707 Data Structures and Algorithms
COMP9024: Data Structures and Algorithms
CENG 213 Data Structures Nihan Kesim Çiçekli
CENG 213 Data Structures Dr. Cevat Şener
COMP 2011 Data Organisation 2005 Session 1
Computer Science 102 Data Structures CSCI-UA
CENG 213 Data Structures Nihan Kesim Çiçekli
Principles of Imperative Computation
Exceptions.
Exceptions.
Presentation transcript:

July Overview1 COMP 2011 Data Organisation 2004 Session 2 Lecturer: Alan Blair Head Tutor: Loc Huynh

July Overview2 Prerequisites for 2011 COMP 1011 Computing 1A Haskell structured problem decomposition abstract data types COMP 1021 Computing 1B procedural programming with C control flow (if, for, while, switch)

July Overview3 Resources Textbook Data Structures and Algorithms in Java (3rd Ed.) by Goodrich & Tamassia lecture slides, announcements links to Java API assignments, tutorial exercises Other Reference Books Java Programming Language (3rd Ed.) Core Java 2 Java in a Nutshell

July Overview4 Syllabus Java & Object-Oriented Programming Analysis of Algorithms Stacks, Queues, Trees Heaps, Hash Tables, Search Trees Sorting Algorithms Text Processing Graphs

July Overview5 Assessment 3 Assignments (40%) Exam (60%) to pass the course you must achieve at least 20 out of 60 for the exam at least 50 out of 100 overall

July Overview6 Plagiarism Policy Assignments must be entirely your own work DON’T copy from others DON’T let anyone see your code we use plagiarism detection programs, which work very well  first detection: negative mark for assignment  second detection: failure of course  third detection: possible expulsion from Uni

July Overview7 What TO DO in general keep up with lectures and tutorials read textbook and lecture slides attempt tutorial questions before the tutorial read Java programming guides and tutorials books or online practice Java programming laboratory consultations (wed 12:00-2:00) use tutorial exercises for practice assignments alone are not enough

July Overview8 What TO DO this week buy the textbook, and read chapter 1 register with sirius (in CSE labs) install Java 2 SDK on own PC (JDK1.4 or 1.3) may need to set PATH and CLASSPATH Java 2 online tutorial Your first cup of Java Getting Started Learning the Java Language Week 2 tutorial questions

July Overview9 For Help Java installation at home JDK 1.3 home computing CD from CompSoc, or online CSE helpdesk Java online docs Java programming labs consultations your tutor friends Tutorials/Assignments Check FAQ on 2011 website 2011 consultants alias then your tutor then the lecturer Admin problems always use your CSE mail account, or include your student ID last resort, contact the lecturer-in-charge (Alan Blair)

July Overview10 Example Program Copy.java (program for copying a file) $ ls Copy.java file1 $ javac Copy.java $ java Copy file1 file2 $ ls Copy.class Copy.java file1 file2 $ diff file1 file2 $

July Overview11 copy.c Copy.java import java.io.*; public class Copy { public static void main( String[] args ) { if( args.length != 2 ) { System.out.println( “Usage: java Copy ” ); } else { copy( args[0], args[1] ); }... #include #define MAX_LINE 256 void copy( char *source, char *dest ); int main( int argc, char *argv ) { if( argc != 3 ) { printf( “Usage: copy \n”); } else { copy( argv[1], argv[2] ); } return 0; }...

July Overview12 copy.c Copy.java public static void copy(String source, String dest) { BufferedReader fileIn; PrintWriter fileOut; try { fileIn = new BufferedReader( new FileReader( source )); fileOut = new PrintWriter( new FileWriter( dest )); String oneLine; while(oneLine = fileIn.readLine()) != null ) { fileOut.println( oneLine ); } fileIn.close(); fileOut.close(); } catch( IOException e ) { System.out.println( “Error :” + e ); System.exit( 1 ); } void copy( char *source, char *dest ) { FILE *fileIn; FILE *fileOut; char oneLine[MAXLINE]; fileIn = fopen( source, “r” ); if( FileIn == NULL ) { printf( “Error: file not found\n” ); exit( 1 ); } fileOut = fopen( source, “w” ); if( fileOut == NULL ) { printf( “Error: file not found\n” ); exit( 1 ); } while( fgets(oneLine,MAXLINE,fileIn ) != NULL ) { fputs( oneLine, fileOut ); } fclose( fileIn ); fclose( fileOut ); }

July Overview13 Next Time Why Java? Object Oriented Design Classes, Types, Objects Methods Expressions Control Flow Arrays Input / Output Packages