Marketing Management: What Is It and Why Does It Matter?
January 22, 2025
Article
Instructors: Robert Sedgewick
Instructor ratings
We asked all learners to give feedback on our instructors based on the quality of their teaching style.
437,218 already enrolled
(1,250 reviews)
(1,250 reviews)
10 assignments
The basis for education in the last millennium was “reading, writing, and arithmetic;” now it is reading, writing, and computing. Learning to program is an essential part of the education of every student, not just in the sciences and engineering, but in the arts, social sciences, and humanities, as well. Beyond direct applications, it is the first step in understanding the nature of computer science’s undeniable impact on the modern world. This course covers the first half of our book Computer Science: An Interdisciplinary Approach (the second half is covered in our Coursera course Computer Science: Algorithms, Theory, and Machines). Our intent is to teach programming to those who need or want to learn it, in a scientific context.
We begin by introducing basic programming elements such as variables, conditionals, loops, arrays, and I/O. Next, we turn to functions, introducing key concepts such as recursion, modular programming, and code reuse. Then, we present a modern introduction to object-oriented programming. We use the Java programming language and teach basic skills for computational problem solving that are applicable in many modern computing environments. Proficiency in Java is a goal, but we focus on fundamental concepts in programming, not Java per se. All the features of this course are available for free. People who are interested in digging deeper into the content may wish to obtain the textbook Computer Science: An Interdisciplinary Approach (upon which the course is based) or to visit the website introcs.cs.princeton.edu for a wealth of additional material. This course does not offer a certificate upon completion.
Why program? This lecture addresses that basic question. Then it describes the anatomy of your first program and the process of developing a program in Java using either virtual terminals or a program development environment, with some historical context. Most of the lecture is devoted to a thorough coverage of Java's built-in data types, with example programs for each.
4 videos2 readings1 assignment1 programming assignment
The if, while, and for statements are Java's fundamental control structures. This lecture is built around short programs that use these constructs to address important computational tasks. Examples include sorting, computing the square root, factoring, and simulating a random process. The lecture concludes with a detailed example illustrating the process of debugging a program.
5 videos2 readings1 assignment1 programming assignment
Computing with a large sequence of values of the same type is extremely common. This lecture describes Java's built-in array data structure that supports such applications, with several examples, including shuffling a deck of cards, the coupon collector test for randomness, and random walks in a grid.
3 videos2 readings1 assignment1 programming assignment
To interact with our programs, we need mechanisms for taking information from the outside world and for presenting information to the outside world. This lecture describes several such mechanisms: for text, drawings, and animation. Detailed examples covered include fractal drawings that model natural phenomena and an animation of a ball bouncing around in the display window.
4 videos2 readings1 assignment1 programming assignment
Modular programming is the art and science of breaking a program into pieces that can be individually developed. This lecture introduces functions (Java methods), a fundamental mechanism that enables modular programming. Motivating examples include functions for the classic Gaussian distribution and an application that creates digital music.
4 videos2 readings1 assignment1 programming assignment
A recursive function is one that calls itself. This lecture introduces the concept by treating in detail the ruler function and (related) classic examples, including the Towers of Hanoi puzzle, the H-tree, and simple models of the real world based on recursion. We show a common pitfall in the use of recursion, and a simple way to avoid it, which introduces a different (related) programming paradigm known as dynamic programming.
5 videos2 readings1 assignment1 programming assignment
When you develop a program, you need to be aware of its resource requirements. In this lecture, we describe a scientific approach to understanding performance, where we develop mathematical models describing the running time our programs and then run empirical tests to validate them. Eventually we come to a simple and effective approach that you can use to predict the running time of your own programs that involve significant amounts of computation.
5 videos2 readings1 assignment1 programming assignment
In Java, you can create your own data types and use them in your programs. In this and the next lecture, we show how this ability allows us to view our programs as abstract representations of real-world concepts. First we show the mechanics of writing client programs that use data types. Our examples involve abstractions such as color, images, and genes. This style of programming is known as object-oriented programming because our programs manipulate objects, which hold data type values.
4 videos2 readings1 assignment1 programming assignment
Creating your own data types is the central activity in modern Java programming. This lecture covers the mechanics (instance variables, constructors, instance methods, and test clients) and then develops several examples, culminating in a program that uses a quintessential mathematical abstraction (complex numbers) to create visual representations of the famous Mandelbrot set.
4 videos2 readings1 assignment1 programming assignment
We conclude the course with an overview of important issues surrounding programming languages. To convince you that your knowledge of Java will enable you to learn other programming languages, we show implementations of a typical program in C, C++, Python, and Matlab. We describe important differences among these languages and address fundamental issues, such as garbage collection, type checking, object oriented programming, and functional programming with some brief historical context.
5 videos1 reading1 assignment1 programming assignment
We asked all learners to give feedback on our instructors based on the quality of their teaching style.
Princeton University is a private research university located in Princeton, New Jersey, United States. It is one of the eight universities of the Ivy League, and one of the nine Colonial Colleges founded before the American Revolution.
Duke University
Course
Princeton University
Course
University of London
Course
University of London
Specialization
1,250 reviews
83.08%
11.33%
2.15%
1.11%
2.31%
Showing 3 of 1250
Reviewed on Jun 15, 2021
Can't wait to get into the second part of the course. The best programming course ever provided for free of cost. The techniques used are backed by mathematical thinking. It is just awesome.
Reviewed on Aug 22, 2020
I expected to review all java basics but found myself working hard with high level, challenging projects that set up a growing environment for me.
Reviewed on Jul 23, 2020
Really fun and challenging exercises! Had a great time solving them. The book site a lot more interesting problems and students should check it out.
Unlimited access to 10,000+ world-class courses, hands-on projects, and job-ready certificate programs - all included in your subscription
Earn a degree from world-class universities - 100% online
Upskill your employees to excel in the digital economy
Once you enroll, you’ll have access to all videos and programming assignments.
No. The lecture videos, exercises, and programming assignments are all available for free.
No. As per Princeton University policy, no certificates, credentials, or reports are awarded in connection with this course.
This course is aimed at first-year college students, high school students, and professionals in all fields who are interested in learning basic programming skills. It is a self-contained treatment intended for people with little or no previous experience in programming. It is also appropriate for people who know another programming language but want to learn Java.
At Princeton, over 50% of all undergraduates take the course, including students majoring in engineering, biology, physics, chemistry, economics, and many other fields, not just computer science.
Multiple-choice exercises, in-video quizzes, and programming assignments. The programming assignments are evaluated using a sophisticated autograder that provides detailed feedback about style, correctness, and (sometimes) efficiency.
We supply a streamlined version of IntelliJ that is easy to install and suitable for novices. However, you are free to use any programming environment that you like.
These cookies are necessary for the website to function and cannot be switched off in our systems. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms. You can set your browser to block or alert you about these cookies, but some parts of the site will not then work.
These cookies may be set through our site by our advertising partners. They may be used by those companies to build a profile of your interests and show you relevant adverts on other sites. They are based on uniquely identifying your browser and internet device. If you do not allow these cookies, you will experience less targeted advertising.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us to know which pages are the most and least popular and see how visitors move around the site. If you do not allow these cookies we will not know when you have visited our site, and will not be able to monitor its performance.
These cookies enable the website to provide enhanced functionality and personalization. They may be set by us or by third party providers whose services we have added to our pages. If you do not allow these cookies then some or all of these services may not function properly.