Time: 50 hours
College Credit Recommended
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.
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.
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.
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.
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 4 hours.
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.
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.
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 5 hours.
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.