CPSC 124 Introduction to Programming Spring 2024

CPSC 124 Course Information

On this page:


Course Description and Objectives

Programming is the art and science of explaining to a computer how to carry out a task. The art is in constructing something that not only works, but is also beautiful - efficient, elegant, and organized. The science comes from developing (and making use of) theory and principles to help programmers create larger, more complex programs.

Computer science revolves around programs - creating programs, analyzing programs, making programs more efficient and easier to understand, making it easier to create and maintain programs, considering what programs can and cannot do...the list goes on. As a consequence, one of the first courses in computer science is typically a programming course. Such a course has two goals: the most obvious, perhaps, is to teach the rules and grammar of a particular programming language so that programs can be constructed. Somewhat less obvious is teaching how to think like a programmer - how to take an idea of what you want to do, and turn it into a series of steps the computer can follow. This requires creativity, logical thinking, and problem solving. These skills are more fundamental to programming than the particular language involved, and are useful even for those who have no intention of becoming programmers or computer scientists.

This course is an introduction to the theory and practice of computer programming, emphasizing techniques of program development in the object-oriented paradigm. It is the first course in the computer science major and minor, and is intended for students who have an interest in computer science and a desire to learn to program. Previous programming experience is not expected or required. Students who just want an introduction to computer science or a slower-paced introduction to some programming basics might consider taking CPSC 120 instead.

The course has five main goals:

  • developing a solid grounding in the fundamental concepts of object-oriented programming, including data types, variables, conditionals, repetition, arrays, subroutines, and classes and objects
  • developing fluency in basic Java syntax and semantics
  • establishing good programming habits
  • building confidence about what you do and don't know, and the knowledge of how to learn what you don't know
  • building excitement about programming as a creative art, and computer science as a field of study

The course material can be divided into two main sections:

Programming Basics: The first part of the course will deal with many of the basic building blocks of programming. The Java language will be introduced, along with programming concepts such as types, variables, assignment statements, expressions, conditionals, loops, subroutines, functions, parameters, return values, I/O (input/output), and arrays. Specific objectives include:

  • understand the procedural programming paradigm
  • be able to read a Java program and explain how the computer executes each statement
  • be able to write a Java program given a pseudocode or detailed English description of what the program should do
  • be able to use top-down design to develop pseudocode for a well-structured program given English specifications for the program's task
  • know the syntax for creating and manipulating arrays
  • be familiar with common uses for arrays

Object-Oriented Programming: The second part of the course will focus on the object-oriented paradigm, and will introduce the concepts central to object-oriented programming: classes, objects, instance variables and methods, inheritance, and polymorphism. Some attention will be paid to the design and organization of good programs in the object-oriented paradigm. Specific objectives include:

  • understand the object-oriented programming paradigm
  • be able to read a Java program involving objects and classes, and explain how the computer executes each statement
  • be able to write a class declaration
  • be able to write an object-oriented program given a pseudocode or detailed English description of what the program should do
  • produce a class design and pseudocode for a well-structured object-oriented program given English specifications for the program's task
  • use a new class given an API describing how it works

By the end of the course, the successful student will be able to:

  • frame the solution to straightforward tasks in terms of object-oriented programming concepts, and translate that solution into Java code
  • correctly trace any Java code that uses the constructs studied in class
  • take steps to resolve compiler, runtime, and logic errors independently
  • navigate a Linux environment (manage files, use a text editor, compile and run programs)
  • identify what she/he does and doesn't know about a task at hand, and take steps to address what isn't known

Like a single semester of a foreign language course, this course will not teach you everything you need to know to be a good programmer and and it won't even teach you everything there is to know about Java. You will, however, learn enough to be able to create interesting and useful programs, and you will have a solid basis for continuing your study. (Shameless plug for CPSC 225 and 329 here.)


Prerequisites

No prerequisite, though some familiarity with computers is useful.


Required Materials
Textbook

Introduction to Programming Using Java, 9th ed. (JavaFX version)
David Eck

The book is freely available online at http://math.hws.edu/javanotes.

You can also download a PDF or e-book version if you prefer an electronic version that you can read offline, or order a printed copy if you'd like something you can refer to away from the computer. See the "Downloading And Other Links" section at the bottom of the http://math.hws.edu/javanotes page for more information. (We will only be using the first half of the book in this course, so Part I is sufficient.) Please do not print out chunks of the text on the Math/CS department printers.

Any additional material will be handed out in class and/or posted on the course webpage.

Software

We will be using the Java programming language and the Linux operating system in this course. Computers running Linux are available in Rosenberg 009 and in the Math/CS lab (Lansing 310), and all of the necessary software is set up on those machines.

We will also be piloting a Linux Virtual Desktop Interface (VDI) this semester. The VDI allows you to access a Linux desktop from any computer on campus using just a web browser. (If you are off campus, you will need to set up and run VPN first.) Information on how to access the Linux VDI will be provided.

All of the software we will be using (Java, JavaFX, Visual Studio Code, FileZilla) is multi-platform and freely available, so it is possible to install it directly on your own computer. (Even Linux is freely available, should you want to delve deeper into that OS.) Getting everything downloaded and set up properly can be a bit involved, however, so it is strongly recommended that you use the Linux VDI (or go to the lab) instead.


Assignments and Evaluation

Readings and Warmups: In computer science, one often begins to learn new things by reading about the topic - especially in conjunction with examples. Your first exposure to new topics will come the same way, via readings. Assigned readings will be accompanied by reading guides and (often) warmups; the purpose of the guides is to help you identify the important concepts to focus on and to help you learn how to read technical material, and the purpose of the warmups is to help you self-assess what concepts you understand from the reading and what needs further attention in class. As this material is the starting point for class, warmups are due the night before the class for which they are listed. As these are meant as diagnostic tools and not reading quizzes, grading is based on submission rather than correctness, however, they will be more effective if you take them seriously and attempt to answer the questions correctly.

Syntax Quizzes: When you are learning a foreign language, you can generally make yourself understood even if your grammar and spelling aren't perfect. With programming, however, syntax problems are deal-breakers - the computer won't run your program if there is even one error - and your progress will be greatly slowed if you are continually struggling over how to correctly write a particular construct. This means you should strive to memorize the correct syntax as quickly as possible. To reinforce this, there will be a series of short syntax quizzes. These will be on Canvas, and you will generally have several days and two attempts to successfully complete each quiz. Additional attempts can be requested, but you must come to office hours to review the material beforehand - the goal is to master the syntax, not to trial-and-error answers until you finally hit on a correct one.

Labs and Projects: Weekly lab assignments are intended to give you practice with specific programming constructs and their use, while projects provide practice with combining those constructs into larger programs. Lab assignments will be started in the lab session each week and will generally be due at the start of lab one week later. You should expect to need to spend time outside of lab to complete the assignment. Projects will be completed mostly outside of lab.

Skills Checks: Instead of midterm exams, a series of skills checks throughout the semester provide an opportunity to measure your progress mastering fundamental concepts. These will be on Canvas, and you will generally have a window of time and two attempts to successfully complete each skills check. Additional attempts can be requested, but you must come to office hours to review the material beforehand - the goal is to master the concept, not to trial-and-error answers until you finally hit on a correct one.

Final Exam and Project: The final exam and project assess what you, individually, have mastered. The final exam will be written and focus on fundamental concepts, similar to the skills checks, and the final project focus on putting those concepts together and constructing a working program.

Grades: Final grades in this course will be computed as follows:

  • Labs: 25% (approx. 2.5% each)
  • Projects: 25% (12.5% each)
  • Syntax quizzes and skills checks: 10%
  • Final exam: 15%
  • Final project: 15%
  • Engagement: 10%

Engagement: Learning isn't a passive activity where you simply read about something or sit back and watch someone else do things; you need to work with the material by thinking about it, trying to apply it, asking questions about it, and so forth and you will get more out of the course and will be more successful if you are engaged in the course. "Engagement" covers aspects of participation in the course other than completing graded assignments and exams: warmups, attendance, contributing to class, and asking questions (on warmups, in class, at office hours). The minimum expectations for a passing engagement grade are that you complete 50% of the warmups and satisfy the attendance policy. For full credit (and your own learning), you should demonstrate greater engagement through some of the following: completing more warmups, missing fewer classes, participating in class, regularlying respond to "do you have questions?" prompts, coming to office hours, etc.

Extra Credit: There may be some opportunities to earn extra credit on labs and projects by going above and beyond the requirements of the assignment. You are encouraged to take advantage of these opportunities to challenge yourself!

If you are concerned about your grade, come to office hours to get help and be sure to take advantage of the revise and resubmit option for homework problems. Staying on top of things and seeking help as soon as possible when you need it is the best route to success.


Time Expectations

The expectations for this course are that you attend all scheduled class meetings (3 hours per week) and lab sessions (1.5 hours per week) and spend approximately 8 hours per week (*) on average on additional work (reading, labs and projects, syntax quizzes, skills checks, studying, etc) outside of class/lab.

(*) The assigned work is intended to take about this much time, though your experience may vary. (Programming tasks can often take longer than expected, for example, because it is often clear that something isn't working correctly, but tracking down exactly why and figuring out how to fix the problem may require skills you are still learning.) However, if you routinely spend much less time, you may not be successfully mastering the material, and if you routinely spend substantially more time, especially if you feel like you are spinning your wheels and not making progress, you should come to office hours for help.