Why Semantics: Motivation to Read Code

Learn to code in Java and improve your programming and problem-solving skills. You will learn to design algorithms as well as develop and debug programs. Using custom open-source classes, you will write programs that access and transform images, websites, and other types of data. At the end of the course you will build a program that determines the popularity of different baby names in the US over time by analyzing comma separated value (CSV) files.
After completing this course you will be able to:
1. Edit, compile, and run a Java program;
2. Use conditionals and loops in a Java program;
3. Use Java API documentation in writing programs.
4. Debug a Java program using the scientific method;
5. Write a Java method to solve a specific problem;
6. Develop a set of test cases as part of developing a program;
7. Create a class with multiple methods that work together to solve a problem; and
8. Use divide-and-conquer design techniques for a program that uses multiple methods.

DN

You need a little more experience in coding that just the first course, or try not to leave everything by the end of the week(as I did) to find what you need for the assignments. Great course !

JS

May 19, 2019

Filled StarFilled StarFilled StarFilled StarFilled Star

Really practical course content with great tutorials. The programming assignments are fun and challenging and deal with real world data and problems which makes the course all the more useful!

從本節課中

Fundamental Java Syntax and Semantics

In this module, you will learn to write and run your first Java programs, including one program that prints “Hello!” in various countries’ languages and another where you will analyze the perimeters and other information of shapes. To accomplish these tasks, you will learn the basics of Java syntax and how to design stepwise solutions with programs. By the end of this module, you will be able to: (1) Download and run BlueJ, the Java programming environment for this course; (2) Access the documentation for the Java libraries specially designed for this course; (3) Edit, compile, and run a Java program; (4) Construct methods, variables, if else statements, and for each loops in Java; and (5) Use Iterables (like DirectoryResource) to run a program that iterates over multiples lines in a document or webpage or multiple files in a directory.

教學方

Owen Astrachan

Professor of the Practice

Robert Duvall

Lecturer

Andrew D. Hilton

Associate Professor of the Practice

Susan H. Rodger

Professor of the Practice

腳本

Okay. You will be using the Java classes Shape and Point, but what will you be able to do with these classes? Well, in some ways, you know the answer to that. You will be able to draw shapes or calculate a shape's perimeter, but just knowing what a Java class or script could do does not mean you understand it. So the question we are going to answer now is, how would you understand what this code does by yourself? That is, what are the semantics or meaning of each part of the code? Understanding the precise meaning of code is important because you can't write code without saying precisely what you mean. When we talk about understanding the semantics of code, what exactly do we mean? We mean how would you execute the code by hand with nothing but pencil and paper? This skill is very important for a couple of reasons. First, it's how you understand code well enough to write what you mean. Second, when your code does not behave as you expect, how do you figure out what is going wrong? You need to understand what it does, and this gives you the skills to do that.