1 / 25100%
CSE205
-
Concepts
of
Computer
Science
and
Data
Structures
1
2
Instructor
Faye Navabi
Office: BYENG (BrickYard ENGineering wing) 518 (5th floor)
Phone: 965-3228
E-mail: navabi@asu.edu
Office hours:
Mon & Wed: 5-5:30pm a
Tues & Thu: 1:00- 3:00pm
(If these hours are not convenient,
I will be happy to make an appointment to meet with you
at other times.)
3
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
4
3. Algorithms
Recursion
Searching/sorting
Big O notation
4. Exceptions and Input/Output streams
Exception handling
File read/write
Serialization
5
Catalog Description
Problem solving by programming with an
object-oriented programming language.
Introduction to data structures.
Overview of computer science topics.
6
Lab Schedule
Section Line# Time Location
A 73004 Mon 11:50-12:40 COOR L1-14
B 73005 Tue 3:05 – 3:55 COOR L1-30
C 73006 Fri 10:45 – 11:35 COOR L1 - 42
D 73007 Wed 12:55 – 1:45 VBHal G114
You are
You are not
not required to attend labs. At the same time, you can
required to attend labs. At the same time, you can
attend any lab. The CSE205 labs will be used to answer questions
attend any lab. The CSE205 labs will be used to answer questions
regarding assignments
regarding assignments.
.
7
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.
.
8
Prerequisites
CSE 100 (C++) and/or CSE 110 (Java)
If you are not sure if this course is the right level for you,
you can take a placement exam at:
https://intraweb.eas.asu.edu/cpd/cse110/
Also, 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.
9
Textbook
Java Foundations, Introduction to Program Design
and Data Structures,
by John Lewis, Peter DePasquale, Joseph Chase, including a CD,
ISBN: 0-321-42972-8, 9
10
Grading
The grading schema is broken down as follows:
Item Number of Items Point Value Percent of Final Grade
Exams 3 100 40%
Final 1 150 20%
Assignments 8 20 40%
Attendance ? ? 5%
Total 105%
11
Exams
There will be three midterm exams and one final exam.
The lowest scored midterm exam will be dropped.
Final exam is mandatory.
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.
12
Assignments
No Late Assignment is Accepted.
All submitted files are expected to have a standard header at the top
with your information:
// Assignment #:
// Name:
// StudentID:
// Lecture:
// Lab Section:
// 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
13
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.
14
Grade Breakdown
Final Grade Percentage
A+ >= 97%
A >= 90% and < 97%
B+ >= 87% and < 90%
B >= 80% and < 87%
C+ >= 77 and < 80%
C >= 70% and < 77%
D >= 60% and < 70%
E < 60%
15
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.
16
Collaboration Policy
You are required to compose your own unique solution to each
problem and each project.
Some obvious acts of cheating are:
--turning in work/code done by someone else
--copying work/code done by someone else
--writing one code together with someone else
(it 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
I use a cheating detection software to compare
I use a cheating detection software to compare
all students files.
all students files.
17
What you need to do this week.
Take the Student Information Survey by Wednesday.
(The survey is posted on myASU site (myasucourses.asu.edu)).
Study Java syntax if your background is C++
Work on Assignment1 , it is due on Friday Aug.29th, 8pm.
(see the example 4.6 on pages 134-135 for reference)
All assignments should be submitted on line.
18
Reading you need to do (especially if you are from C++ background)
by Friday lecture
1. Primitive data types p 45-49
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
19
String class -- pages 78-81
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.
20
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.
21
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.
22
Java escape sequences – pages 39-40
Escape Sequence
\b
\t
\n
\r
\"
\'
\\
Meaning
backspace
tab
newline
carriage return
double quote
single quote
backslash
23
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.
Pages 60-64, Input (Read) Statement
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));
}
}
24
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.
25
Conditional statements (Decisions)
if, if-else, switch – chapter 4, page 110
Loops (Iterations)
while loops, do-while, for loops – chapter 4, starting page 132
Single dimensional arrays
-- chapter 7, page 334
Students also viewed