COSC110 Computer Science I Spring 2014 Instructor: Robert Lowe Email: robert.lowe@maryvillecollege.edu Office: SSC 214 Office Hours: M 10:00AM - 11:30 AM; 1:00PM - 1:50PM T 9:00AM - 10:50AM R 1:30PM - 4:00PM F 10:00AM - 11:30AM Class Meetings: MW 2:00PM - 4:15PM SSC 204 Gopher Site: gopher://sdf.org/1/users/pngwen/courses/cs1 Introduction and Goals ====================== This course is an introduction to the topic of computer science. The goals for this course are as as follows: - Gain proficiency with the algorithms - Gain proficiency with the C++ programming language - Introduce software development and computer science skills The main thing I want to convey in this class is how to think about computer science. This is not just a course in computer programming, this is intended to be a foundation for the exploration of a very vast and rewarding field! Recommended / Compatible Texts ============================== - C++ For Everyone by Cay Hortsmann 2nd Edition ISBN: 978-0-470-92713-7 - Problem Solving with C++ by Walter Savich 8th Edition ISBN: 978-0-132-16273-9 Recommended Reference Texts =========================== - The C++ Programming Language by Bjarne Stroustrup 3rd Edition ISBN: 978-0-201-88954-3 Grading ======= Midterm Exam 10% Final Exam 10% Guided Labs 30% Self Labs 50% Expectations ============ In order to succeed in this course, I expect you to: * Strive for perfect attendance. We will be doing many hands on activities, and if you miss these, there is no way to get the experience back! * Turn in all assignments on time. No individual extensions will be given under any circumstances. If you ever find that you won't complete an assignment, turn in as much as possible. Any credit is better than 0! * Attend every exam. Exams times will be announced at least 1 week in advance. If you cannot be present for an exam, you must make arrangements with me BEFORE the exam class meeting. Failing to attend an exam, without prior permission, will result in an exam grade of 0. * Ask lots of questions! If you are confused about something, then I there is probably someone else in the same boat. Education works best if it's a dialog. Otherwise, you might as well just record me and play my lectures over and over. You're paying top dollar to be in a room with a live professor. Avail yourself of the opportunity and talk to me. * If you get stuck, visit me during office hours. At the very least, email me. If you tell me that you are stuck early on, I can get you unstuck and help you complete your assignments. * Work together, but do your own work! I don't mind if you bounce ideas off of each other. That's actually a good thing, but be sure to write your own code. * Don't try to find solutions on the Internet. For starters, my labs are weird enough to be difficult to find drop in code. Also, if you plagiarize code, I'm very good at picking up on that. If you do this, you will get an irrevocable 0 on the assignment, and you will possibly be reported to the dean. Just don't do it! * Explore and have fun! This class will cover a lot of ground, but nothing can replace the experience of simply tinkering with code. Write lots of programs, think up things you want to make a computer do and try it. You'll stumble a bit, but you'll come out a much stronger programmer for your pains! Content Outline =============== 1. Introduction to CS and Computing 1.1 Definition of Computer Science 1.2 Pseudocode and Algorithms 1.3 Overview of Programming Languages 1.4 The UNIX command line environment 2. Introduction to C++ 2.1 Basic Program Structure 2.2 The C++ Compilation Process 2.3 Variable Types 2.4 Operators 3. C++ Basics 3.1 Invoking Functions 3.2 Best Practices 3.3 Block Structure 3.4 Introduction to Flow Control 4. Flow Control 4.1 Definition of Truth 4.2 Branching with If 4.3 Branching with Switch 4.4 Designing Algorithms With Branches 4.5 Introducing Repetition Structures 5. Flow Control 5.1 Loop Basics 5.2 Precondition Loops 5.3 Post Condition Loops 5.4 Loop Control Strategies 5.5 Designing Algorithms with Loops 5.6 Introduction to Runtime Analysis 5.7 GOTO: A privelege, not a right 6. Building Abstractions 6.1 Procedure Oriented Thinking 6.2 Modular Decomposition 6.3 Designing With Procedures 6.4 Function Syntax 7. Functions 7.1 Using Functions in C++ 7.2 Recursive Functions 7.3 Recursive Problem Solving 7.4 Evaluating Recursive Runtime 8. Functions & File I/O 8.1 Finishing up Functions 8.2 Introduction to Objects 8.3 Streams as Objects 8.4 Interacting with Files 9. Arrays 9.1 Memory and Addressing 9.2 Single Dimensional Arrays 9.3 Multiple Dimensional Arrays 9.4 Memory Organization of Arrays 10. Arrays, Pointers, and Strings 10.1 Arrays and Pointers 10.2 Array Sorting 10.3 C Strings 10.4 C++ String Objects 11. Pointers, Structures, and Classes 11.1 Advanced Pointer-Fu 11.2 Using Structures 11.3 Designing Classes 11.4 Pointers to Structs and Classes 12. Designing Classes 12.1 Introduction to Object Orient Analysis and Design 12.2 Pseudocode and Classes 12.3 Best Practices in Class Design 12.4 Examples in OOP 13. Dynamic Memory & Introduction to Data Structures 13.1 Allocating and Deallocating Memory 13.2 Dynamic Allocation and Arrays 13.3 Correct Dynamic Allocation of Multidimensional Arrays 13.4 An Inefficient Dynamically Resizeable Array 14. Data Structures & Some Advanced Language Features 14.1 Linked Lists 14.2 ListNode Class 14.3 List Container Class 14.4 Introduction to Templates 14.5 Exception Handling 15. Final Exam