290 likes | 1.39k Views
CSE205 Object-Oriented Programming and Data Structures Fall 2013. Instructor: Mutsumi Nakamura Office: BYENG (BrickYard ENGineering wing) 520 (5th floor) Phone: 965-1757 E-mail: mutsumi@asu.edu Office hours: Please see the syllabus for the office hours (If these hours are not convenient,
E N D
CSE205 Object-Oriented Programming and Data StructuresFall 2013
Instructor: Mutsumi Nakamura Office: BYENG (BrickYard ENGineering wing) 520 (5th floor) Phone: 965-1757 E-mail: mutsumi@asu.eduOffice hours: Please see the syllabus for the office hours(If these hours are not convenient, I will be happy to make an appointment to meet with you at other times.)
TA(Teaching Assistants): To be Announced. You can view the TA’s lab hours on the course website.
Catalog Description • Problem solving by programming with an • object-oriented programming language (Java). • Introduction to data structures. • Overview of computer science topics.
Major Topics Covered in this Java-based Course 1. Object-Oriented Software Development Brief introduction to Java Classes, Interfaces, Abstract classes Polymorphism Introduction to GUI 2. Introduction to Data Structures Arraylist Linked lists Stacks Queues Introduction to binary trees
3. Algorithms Recursion Searching/sorting Big O notation 4. Exceptions and Input/Output streams Exception handling File read/write Serialization
Lecture Hours Lecture 1: MWF 9:00am Lecture 2: MWF 10:30am Lecture 3: TTh 3:00pm
Web Site http://myasucourses.asu.edu/ login and look for CSE205 course page. To be able to login to the myASU site, you need to have an ASURITE account. Activating your ASURITE UserID is a self-service process. You can activate your account by visiting the ASURITE Activation Web site (https://selfsub.asu.edu/apps/WebObjects/ASURITEActivation/ ) There are also special terminals set aside just for activating accounts and adding new services. The largest of which is in Computing Commons. The process takes about fifteen minutes. There is a link from the above site to the following site: http://courses.eas.asu.edu/cse205/fall13/ This site can be accessed directly without going through myASU site. To see notes, announcements, assignments, and exam dates.
Prerequisites CSE 110 (Java) If you feel that you already know the materials of this course, you can test out the course by taking a comprehensive exam. For more information, please contact the instructor.
Textbook You do NOT need to buy a textbook for this course. We will be using an E-book which will be available through Blackboard https://myasucourses.asu.edu/ within the course website. "Java for Everyone", second edition, by Cay S. Horstmann.
Grading The grading schema is broken down as follows: Item Number of Items Point Value Percent of Final Grade Exams 4 100 60% Assignments 9-13 20 40% Attendance ? ? 5% Total 105% You can calculate your own standing by using the following formula: (60%)*(YET + Final Score - the lowest exam score)/(3*100)+(40%)*YAT/(TNA*20)+(5%)*YQT/MQT where:YET = Your Exams Total YAT = Your Assignments Total TNA = Total number of AssignmentsYQT = Your Quiz TotalMQT = Maximum Quiz Total
Exams There will be three exams and one final exam. The lowest scored exam will be dropped. There will be absolutely no make-up exams. (If you happen to miss an exam, that will be the one to be dropped.) Your picture ID needs to be shown during the exams. There is no exam during the final exam week. Exam dates Exam1 - Thursday, September 26thExam2 - Tuesday, November 5thExam3 - Tuesday, November 26thFinal Exam Lecture 3 (TTh 3:00pm section) - Thursday, December 12th, 2:30pm-4:20pm
Assignments All submitted files are expected to have a standard header at the top with your information: // Assignment #: // Name: // StudentID: // Lecture: // Description: (class description) Here is the grading schema for those assignments: Item Num of Items Point Value Total Pts Description Compilation 1 2 2 Program compiles Test Cases 4 2 8 Automated test cases Documentation 1 4 4 Program is well-documented Indentation 1 1 1 Indentation makes program easy to read Space 1 1 1 Spacing makes program easy to read Classes&methods 1 4 4 Required classes and methods Total 20
Attendance Attending class is important in order for you to be aware of what is going on. Often, announcements will be made or information will be discussed that is not available on the web site. Announcements in the class take precedence over printed material. Your attendance grade may be determined by sign-in sheets or in-class exercises that are given out randomly.
Grade Breakdown Final Grade Percentage A+ >= 98% A >= 90% and < 98% B+ >= 88% and < 90% B >= 80% and < 88% C+ >= 78 and < 80% C >= 70% and < 78% D >= 60% and < 70% E < 60%
Grading Appeals: Any questions, corrections, or appeals on grades of programs or tests must be done in writing within one week after it has returned to the class. State the problem and the rationale for any change in your grade in your appeal.
Collaboration Policy • You are required to compose your own unique solution to each • problem and each project. • Some obvious acts of cheating include, but are not limited to: • practicing any form of academic deceit; • referring to materials or sources or employing devices, • not specifically authorized by the instructor for use during tests, • quizzes, homework, and class activities; • acting as a substitute for another person in any academic evaluation • or using a substitute in any academic evaluation; • possessing, buying, selling, or otherwise obtaining or using, • without appropriate authorization, a copy of any materials • intended to be used for academic evaluation in advance • of its administration;
depending on the aid of others to the extent that the work is not • representative of the student’s abilities, knowing or having good • reason to believe that this aid is not authorized by the instructor; • providing inappropriate aid to another person, knowing or having good • reason to believe the aid is not authorized by the instructor; • submitting the ideas or work of another person or persons without • customary and proper acknowledgment of sources • permitting one's own ideas or work to be submitted by another person • without the instructor’s authorization; or attempting to influence • or change any academic evaluation or record for reasons having • no relevance to class achievement. • turning in work/code done by someone else • copying work/code done by someone else • writing one code together with someone else(should be individual work)
We have no problem failing you in this class for the semester and having the appropriate entries placed in your ASU student records. All instances of cheating will be handled by the Dean's office according to the ASU Student Academic Integrity Policy and the STA 104-01: Student Code of Conduct and Student Disciplinary Procedures. I will be using a cheating detection software to compare all students files.
2. What you need to do this week. -Work on the Assignment1 by its deadline, at 7pm -Work on the Assignment2 by its deadline, at 7pm All assignments should be submitted on line.
Type byte short int long float double char boolean Storage 8 bits 16 bits 32 bits 64 bits 32 bits 64 bits 16 bits 1 bit Min Value -128 -32,768 -2,147,483,648 < -9 x 1018 +/- 3.4 x 1038 with 7 significant digits +/- 1.7 x 10308 with 15 significant digits The character type The type with the values, false and true Max Value 127 32,767 2,147,483,647 > 9 x 1018 -Reading you need to do by the next lecture 1. Primitive data types (Section 2.1.2)
2. String class -- Section 2.5.5 Some commonly used methods in the String class: char charAt(int index) Returns the char value at the specified index. int compareTo(String anotherString) Compares two strings lexicographically. int compareToIgnoreCase(String str) Compares two strings lexicographically, ignoring case differences. String concat(String str) Concatenates the specified string to the end of this string. boolean endWith(String suffix) Tests if this string ends with the specified suffix. boolean equals(Object anObject) Compares this string to the specified object.
boolean equalsIgnoreCase(String anotherString) Compares this String to another String, ignoring case considerations. int indexOf(int ch) Returns the index within this string of the first occurrence of the specified character. int indexOf(int ch, int fromIndex) Returns the index within this string of the first occurrence of the specified character, starting the search at the specified index. int lastIndexOf(int ch) Returns the index within this string of the last occurrence of the specified character. int lastIndexOf(int ch, int fromIndex) Returns the index within this string of the last occurrence of the specified character, searching backward starting at the specified index. int length() Returns the length of this string.
String replace(char oldChar, char newChar) Returns a new string resulting from replacing all occurrences of oldChar in this string with newChar. String [] split(String regex) Splits this string around matches of the given regular expression. boolean startsWith(String prefix) Tests if this string starts with the specified prefix. String substring(int beginIndex, int endIndex) Returns a new string that is a substring of this string. String toLowerCase() Converts all of the characters in this String to lower case using the rules of the default locale. String toUpperCase() Converts all of the characters in this String to upper case using the rules of the default locale. String trim() Returns a copy of the string, with leading and trailing whitespace omitted.
Escape Sequence \b \t \n \r \" \' \\ Meaning backspace tab newline carriage return double quote single quote backslash 3. Java escape sequences – Section 2.5.4 Some Java escape sequences:
4. Scanner class (in java.util package) The Scanner class is used to read user input. This new class was introduced in JDK5.0, but does not exist in older version of Java library. Section 2.3, Input and Output Example: import java.util.Scanner; public class Example1 { public static void main(String[] args) { Scanner console = new Scanner(System.in); //create a Scanner object System.out.print(“Enter a unit price: “ + “\n”); //ask a user to enter a number double price = console.nextDouble(); System.out.print(“Enter a quantity : “ + “\n”); //ask a user to enter an integer int num = console.nextInt(); System.out.println(“Total price is: “ + (price*num)); } }
Some commonly used methods in the Scanner class: boolean hasNext() boolean hasNextDouble() boolean hasNextInt() boolean hasNextLine() These methods test whether it is possible to read any non-empty string, a floating-point value, an integer, or a line, as the next item. They return true if it is possible to read an item of the requested type, false otherwise. String next() double nextDouble() int nextInt() String nextLine() These methods read the next whitespace-delimited string (just one string without containing any whitespace), floating-point value, integer or line (until a carriage return). They return The value that was read.
Conditional statements(Decisions)if, if-else, switch – chapter 3 Loops (Iterations) while loops, do-while, for loops – chapter 4 Single dimensional arrays (for later assignment, not for hw1 or 2) - chapter 6 Creating classes (for Assignment #4) – read by sometime next week -Read chapter 8