• Course Information

        • Time: 52 hours
        • Free Certificate
        This course will introduce you to the field of computer science and the fundamentals of computer programming. CS101 is specifically designed for students with no prior programming experience and touches upon a variety of fundamental topics. This course uses Java to demonstrate those topics. Java is a high-level, portable, and well-constructed computer programming language developed by Sun Microsystems (now Oracle).

        We begin this course with a brief history of software development and show how human thought and computer programming are related. We build upon these general concepts to cover object-oriented programming terminology such as objects, classes, inheritance, and polymorphism. During this process, we use Java to show how those fundamentals are implemented in a real programming language. We do this by demonstrating Java's primitive data types, relational operators, control statements, exception handling, and file input/output.

        By the end of the course, you will understand the basics of computer science and the Java programming language. The principles you learn here will be developed further as you progress through the computer science discipline.

        • Course Syllabus

          First, read the course syllabus. Then, enroll in the course by clicking "Enroll me". Click Unit 1 to read its introduction and learning outcomes. You will then see the learning materials and instructions on how to use them.

        • Unit 1: Introduction

          We begin this course by developing a motivation for learning programming concepts and by reviewing the history of computer programming languages, and show the connections between human thought and its expression in programming languages. We then discuss hardware – the physical devices that make up a computer – and software – operating systems and applications that run on the computer. We conclude with a brief discussion of the Java programming language, which we will use throughout the rest of the course. By the end of this unit, you will have a strong understanding of the history of programming, and you will be ready to learn about programming concepts in more detail.

          Completing this unit should take you approximately 11 hours.

        • Unit 2: Object-Oriented Programming

          Java is an object-oriented programming language. Object-oriented (OO) programming has proven to be one of the most effective and flexible programming paradigms. This unit will begin with a discussion of what makes OO programming so unique, and why its advantages have made it the industry-standard paradigm for newly designed programs. We then discuss the fundamental concepts of OO and relate them back to Java. By the end of this unit, you will have a strong understanding of what OO programming is, how it relates to Java, and why we use it.

          Completing this unit should take you approximately 3 hours.

        • Unit 3: Java in Practice

          Now that you have a basic understanding of object-orientation, we'll move on to the practicalities of Java, which is the programming language we'll be studying. The Java-related concepts you will learn in this unit are in many cases directly transferable to a number of other languages. We will begin by learning about "Hello World", a basic software application that simply prints "Hello World" to the screen as a means of demonstrating the most essential elements of a programming language, and will then move on to discuss variables, literals, data types, and operators. In addition, we will also learn about two different styles of adding comments to the code. By the end of this unit, you should have an understanding of Java basics and be prepared to apply those concepts later in the course.

          Completing this unit should take you approximately 9 hours.

        • Unit 4: Relational and Logical Operators in Java

          In this unit, we discuss relational and logical operators in Java, which provide the foundation for topics like control structures that we will discuss later in the course. In this unit, we start by taking a look at operator notation. We then discuss relational operators as they apply to both numeric operands and object operands. The unit concludes with an introduction to logical operators. By the end of this unit, you should be able to perform comparisons and logic functions in Java and have a fundamental understanding of how they are employed.

          Completing this unit should take you approximately 5 hours.

        • Unit 5: Control Structures

          Control structures dictate how a program will behave under certain circumstances. Control structures belong to one of two families: those that test values and determine what code will be executed based on those values, and those that loop, performing identical operations multiple times. Control structures like if-then-else and switch the program to behave differently based on the data that they are fed. The while and for loops allow you to repeat a block of code as often as it is needed. As you will see, that functionality can be very useful when designing complex programs.

          This unit will introduce you to control structures and how they are used before moving on to discuss if, switch, while/do-while, and for loops. We will also discuss some advanced topics, such as nesting and scope. By the end of this unit, you should be able to draw from the information you learned in the previous unit to create a control structure, which will allow you to create more involved and useful programs.

          Completing this unit should take you approximately 10 hours.

        • Unit 6: User-Defined Methods

          In addition to the methods predefined in Java, we can write user-defined methods. In this unit, we will discuss how to name a method, declare a parameter list, and specify the return type. This unit introduces the scope of variables as well. By the end of this unit, you will have a strong understanding of how to define and call a method.

          Completing this unit should take you approximately 4 hours.

        • Unit 7: Arrays

          An array is a multi-dimensional fixed-size data structure that allows elements of the same data type to be stored in it. Each array element has a unique index associated with the value it stores. This unit introduces two-dimensional arrays and their applications.

          Completing this unit should take you approximately 6 hours.

        • Unit 8: Java I/O and Exception Handling

          In this unit, we discuss two important programming concepts in Java: input and output. Input and output techniques allow programmers to connect the virtual world of computers to the real world. Because of this, you must fully understand how to use a programming language's built-in I/O (input/output) functionality. In this unit, we discuss function I/O before moving on to file I/O (writing to and reading data from files). Each unit contains a discussion of the applicable Java classes, which are part of the standard programming language (FileWriter, PrintWriter, FileReader, BufferedReader, IOException). We then identify the common pitfalls and design concepts that you should keep in mind as a programmer. By the end of this unit, you will have a strong understanding of how to write and read from a file and how to write a Java program that performs these functions.

          Completing this unit should take you approximately 6 hours.

        • Study Guide

          This study guide will help you get ready for the final exam. It discusses the key topics in each unit, walk through the learning outcomes, and list important vocabulary terms. It is not meant to replace the course materials!

        • Course Feedback Survey

          Please take a few minutes to give us feedback about this course. We appreciate your feedback, whether you completed the whole course or even just a few resources. Your feedback will help us make our courses better, and we use your feedback each time we make updates to our courses.

          If you come across any urgent problems, email contact@saylor.org.

        • Certificate Final Exam

          Take this exam if you want to earn a free Course Completion Certificate.

          To receive a free Course Completion Certificate, you will need to earn a grade of 70% or higher on this final exam. Your grade for the exam will be calculated as soon as you complete it. If you do not pass the exam on your first try, you can take it again as many times as you want, with a 7-day waiting period between each attempt.

          Once you pass this final exam, you will be awarded a free Course Completion Certificate.