Computer Programming I



[pic]

Computer Programming I

COP 2210

Syllabus

Fall Semester 2016

Instructor: Caryl Rahn

Office: ECS 280C (Engineering and Computer Science Bldg)

Office Hours: Monday: 11:30 AM - 1:45 PM

Wednesday: 11:30 AM – 1:45 PM

Phone: (305) 348-8033

E-mail: crahn@fiu.edu

Web:

Required Text: Big Java Interactive Book (Hard copy not needed)

6th Edition

by Cay Horstmann

Publisher: Wiley

You will need a computer in class!

FIU COP 2210 Common Course Objectives

1. Be familiar with the concepts of Objects and Classes

2. Master using the fundamental Java data types

3. Master using the Java selection and iteration constructs

4. Master using String and ArrayList classes

5. Master analyzing problems and writing Java program solutions to those problems using the above features

1.) Introduction - Chapter 1

A Brief History of Computer Languages

Machine Languages, Assembly Languages, High-Level Languages

Translating Human-Readable Programs to Machine Language

Compiled Languages, Interpreted Languages, and Java

String Literals ("Constants") and String Concatenation

Escape Sequences

The ASCII and Unicode Character Sets

Errors

Syntax Errors, Exceptions (aka: Run-time Errors), and Logic Errors (i.e., Semantic Errors)

Algorithms and Problem-Solving

Using the NetBeans IDE

2.) Using an Existing Class (i.e. Creating and Manipulating Objects) - Chapter 2

Introduction to Variables and Data Types

The Assignment Statement

Object-Oriented Programming (OOP) Concepts

Classes, Objects, and Methods

Introduction to the String Class

Creating String objects, and the length, replace, indexOf, and substring methods

Constructing (“Creating”) Objects

Objects, Object Variables, and Object References

Assignment of Object Variables

Using Objects (i.e. Calling Methods for Objects)

Methods That Return a Value vs. "void" Methods

Accessor and Mutator Methods (aka: "get" and "set" Methods)

Local Variables

3.) Implementing (“Creating”) Classes - Chapter 3

Class Interface vs. Class Implementation

Encapsulation and Information Hiding

Defining Classes and Methods

Instance Variables (aka: Instance Fields)

Access Specifier, Type, and Name

Class Constructors

Parameter Variables (aka: Method Parameters)

Variable Scope, Lifetimes and Initial Values

The this Object Reference and Shadowing

Method Overloading

4.) Primitive Data Types (and More) - Chapter 4

Java's Primitive Data Types: int, double, char, boolean

Arithmetic Operators and Operator Precedence

Integer Arithmetic and Mixed-Type Arithmetic

Integer Division and the Modulus ("Mod") Operator

Type Conversion (aka: Type Casting) and "Roundoff" Errors

The "Shortcut" or "Arithmetic" Assignment Operators

The Increment and Decrement Operators

Defined Constants (i.e., final variables)

Intro to static Methods

Math Class Methods (i.e., “Functions”)

Reading User Input

Using the showInputDialog method of the JOptionPane Class

Explicit vs. Implicit Method Parameters

Assignment of Primitive Types and Assignment of Objects

The Meaning of "="

Object References and Aliases

5.) Decision-Making (aka: Selection, Conditional Execution) –

Chapter 5

Relational Operators and Relational Expressions

The if Statement

Single-Alternative Decisions ("yes/no")

Two-Alternative Decisions ("either/or")

"Nested" if Statements

Forming More Complex Conditions

Multiple-Alternative Decisions ("one of many")

Testing Equality of Floating-Point Numbers

String Comparisons

The equals Method vs. the Equality Operator ("==")

The equalsIgnoreCase Method

Type boolean

boolean Operators and Evaluating boolean Expressions

boolean Variables ("flags") and the boolean Assignment Statement

boolean Methods (aka: "Predicate" Methods)

"Lazy" (or, "Shortcut") Evaluation of boolean Expressions

DeMorgan’s Laws for Simplifying Boolean Expressions

Decision-Making Pitfalls

Testing Programs that make Decisions

Impossible Conditions and Unavoidable Conditions

The "Dangling Else" Problem (How to Avoid It)

6.) Style and Documentation Standards for Java Programs (Online Notes and Appendix I)

Style Considerations – Creating “Readable” Programs

Java “Documentation Comments” (aka: “javadoc” Comments)

“Internal” Documentation

7.) Iteration (aka: Repetition, Looping) - Chapter 6

The while Loop

Loop Necessities

Defensive Programming and “Robust” Programs

Using while to Validate Input

Accumulators and Counters

The for Loop

The do-while Loop

Reading Data Until End-of-File

Introduction to the Scanner class

Methods next, nextInt, nextDouble, nextLine, and boolean Method hasNext

Nested Loops

The "Loop and a Half" Problem and the break Statement

Iteration Pitfalls: Infinite Loops and "Off by One" Errors

8.) The ArrayList Class – Online Notes and Chapter 7, Section 7.7 ONLY!

“Generic” ArrayLists

ArrayList Methods add, get, size, remove, set, and clear

ArrayLists of Primitive Types

“Wrapper” Classes, Autoboxing, and Autounboxing

ArrayLists of Objects

9.) Files – Online Notes and Chapter 11, Sections 11.1 and 11.2

File Concepts

Sequential Access vs. Random Access Files

ASCII Files vs. Binary Files

Reading from Input Files (“Data Files”) Using the Scanner Class

Writing to Output Files Using the PrintWriter Class

10.) The String Class Revisited – Online Notes and Chapter 4, Section 4.5

The null ("empty") String vs. the null Object Reference

String Class Methods length, substring, indexOf, toUpperCase, toLowerCase, and charAt

String Comparisons - the compareTo and compareToIgnoreCase Methods

11.) Object-Oriented Design - Chapter 8

Choosing Classes to Model

Determining Responsibilities of Each Class

Class Cohesion, Class Coupling, and Method “Side Effects”

Call-by-Value vs. Call-by-Reference Parameter Passing

Why you can't change the value of a method argument

Method Preconditions and Postconditions

Static Class Methods and Static Class Variables

Your Schedule – Class, Labs, and “Open” Lab

• Class attendance is required.

• The labs are also required and count as 10% of your semester grade (that’s why it’s a 4-credit class). Labs are conducted in PG6 105

← The John C. Comfort Undergraduate Lab is ECS 241. This is an “open” lab where you can work at any time. There is also a lab in PG6 106.

Important Dates

• Midterm Exam – Monday, October 17th

• Drop Date - Monday, October 31

• Labor Day (University Closed) – Monday September 5

• Veterans Day (University Closed) – Friday November 11

• Thanksgiving Break (University Closed) – November 24-25

Final Exam

Sections U01 and U02 - Monday, Dec 5 (5:00PM – 7:00PM)

Your Semester Grade

1. First, your numeric average is computed based on these four components with the indicated weights:

|Component |Weight |

|Programming assignments (approx. 8) |40% |

|Midterm exam |20% |

|Final exam |20% |

|In Class quizzes/activities |10% |

|Lab assignments |10% |

2. Your numeric average is then “curved” by comparing it to the highest in the class. For example, suppose the highest average in the class is 90%. Then, an average of 75 would curve to an 83, because 75 is 83% of 90.

3. Finally, your curved numeric average is converted to a letter grade according to this scale:

|Numeric Average |Letter Grade |

| 93..100 | A |

| 90..92 | A- |

| 87..89 | B+ |

| 83..86 | B |

| 80..82 | B- |

| 77..79 | C+ |

| 70..76 | C |

| 60..69 | D |

| 0..59 | F |

4. You must pass the tests to pass the class. I.e. the average of your two test scores must be at least 60% of the highest test average in the class.

Other Important Information

I. Handing In Your Assignments

Completed assignments must be uploaded to the class Moodle site. Assignments will not be accepted any other way. See the “Moodle” document online. Instructions will also be given in the first lab session.

II. Late Assignments

Late assignments will lose 10% for each day late. Assignments that are more than one week late will not be graded. You will always have a minimum of one week to complete each assignment.

All assignments are due at the beginning of class on the due date. So if your assignment is not uploaded by the time class begins, do not skip class to work on it because it is already late.

III. Required Affirmation

Make sure that your program documentation includes your name and section number, along with the following affirmation:

I affirm that this program is entirely my own work and none of it is the work of any other person.

Programs without this affirmation cannot be accepted. This is a policy of the School of Computing and Information Sciences.

IV. Partial Credit

Only programs that solve part of the problem can earn partial credit. To get partial credit, a program must do something meaningful. Programs that do not compile, run, and actually do something cannot earn partial credit.

V. Incompletes

In accordance with the published policies of the School of Computing and Information Sciences and the College of Engineering and Computing, a grade of Incomplete may only be given if a student misses one or more assignments and/or tests due to circumstances entirely beyond the student’s control and the student is currently passing the class.

However, if it would be necessary for the student to attend the class again to complete the assignments/tests, then a grade of Incomplete cannot be given. In such a case, the student should register for the class again and use the university’s “forgiveness” policy to replace the old grade with a new one that will be used in computation of the GPA.

VI. Makeup Tests

I do not generally give makeup tests unless arranged ahead of time. If for some reason you are unable to attend when a test is scheduled, make sure you call me from the hospital!

VII. Academic Honesty

From the Provost’s Office:

“Florida International University is a community dedicated to generating and imparting knowledge through excellent teaching and research, the rigorous and respectful exchange of ideas, and community service. All students should respect the right of others to have an equitable opportunity to learn and honestly demonstrate the quality of their learning. Therefore, all students are expected to adhere to a standard of academic conduct, which demonstrates respect for themselves, their fellow students, and the educational mission of the University. All students are deemed by the University to understand that if they are found responsible for academic misconduct, they will be subject to the Academic Misconduct procedures and sanctions, as outlined in the Student Handbook.”

← Each student is responsible for having read the sections in the FIU Student Handbook on Academic Misconduct and Academic Misconduct Procedures (beginning on handbook page 36)

Although students work with a partner in the lab sessions, each student must complete the programming assignments entirely on their own. "Working together" is not permitted. Do not ask to see anyone else's work and do not show your work to anyone else.

← Handing in an assignment that is totally or partially the work of someone else constitutes academic dishonesty and will result in failing grades for the course for all involved and the filing of formal charges of academic misconduct.

Everything you need to know to do the assignments will have been covered in class and in the online notes, and demonstrated in sample programs (available online) and in the labs. When a fellow student asks you for help, you may help them by reviewing the online notes and demonstration programs.

In no circumstances are you to help them with the actual assignment.

VIII. Integrity of Program Listing and Output

When you hand in an assignment you are declaring that

1. the output is exactly that produced by the program, and

2. the source code is the exact version of the program that produced the output

Handing in “doctored” output constitutes academic misconduct and will not be tolerated.

← Make sure that the source code you hand in is the version that produced the output you are handing in.

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download