Presentation is loading. Please wait.

Presentation is loading. Please wait.

Comp Sci 200 Programming I Jim Williams, PhD.

Similar presentations


Presentation on theme: "Comp Sci 200 Programming I Jim Williams, PhD."— Presentation transcript:

1 Comp Sci 200 Programming I Jim Williams, PhD

2 Programming I Who Am I? Who is here?
What is Computer Science & Programming? Website & Course Design Trace and explain a program containing basic input and output. Describe the CS200 view of computer Describe the edit-compile-run cycle

3 CS 200 My Interests: CS Education, specifically the teaching and learning of programming.

4 Who is here?

5 What is Computer Science?
What is Programming? With a name like computer science, you might think it is all about the computer. Core principles: Abstractions and algorithms This course: Learning to give instructions to the computer. Read and Write Java

6 What is Computer Science?
The study of the computer itself as well as how computers are applied to solve problems in any field. What is Programming? Designing algorithms and writing them in a language a computer can execute.

7 Enjoyment and Satisfaction
Lots of puzzles, problem solving and challenge Opportunity to create something from nothing Opportunity to apply to any field Many enjoy these aspects of Computer Science and find a lot of satisfaction when successful.

8 When Women Stopped Coding

9 Website and Policies https://pages.cs.wisc.edu/~cs200/
Large Course

10 CS200 View of Computer A view of the computer appropriate to understand programming with Java. This view of the computer gets more detailed as we go in the course.

11 CS200 View of Computer (begin)
Processor Executes program one step at a time. Java statements say what to do. Memory holds data (and program itself) access through variables and references

12 Tracing & Explaining Tracing
Stepping through a program anticipating what each instruction does and the next instruction to execute (run). Keep track of what is happening in memory. Explaining In your own words, summarize what Java statements do.

13 Learning to Trace with Java Visualizer
Java Visualizer available via our course website or: import java.util.Scanner; public class RectangleArea { public static void main(String [] args) { Scanner input = new Scanner(System.in); int height = 0; int width = 0; System.out.print("Enter height: "); height = input.nextInt(); System.out.print("Enter width: "); width = input.nextInt(); int area = height * width; System.out.println("A rectangle with height " + height + " and width " + width + " has an area of: " + area); input.close(); return; //optional at end of method, unless returning value }

14 Programming Process Users Files Programmer Editor (Virtual) Compiler
Machine Compiler Hello.java Hello.class Computer Files Programmer

15 Programming Errors Naming/Saving Syntax/Compile time Runtime & Logic
Editor (Virtual) Machine Compiler Hello.java Hello.class Computer Files Programmer

16 Programming Process Question
Cat.txt Cat.java Cat.class Cat For the class named Cat, what is the name of the file that the compiler creates and is provided to the Java Virtual Machine to run?

17 Edit-Compile-Run Cycle
From the command-line: notepad javac java


Download ppt "Comp Sci 200 Programming I Jim Williams, PhD."

Similar presentations


Ads by Google