Welcome to AP Computer Science A!

Slides:



Advertisements
Similar presentations
CS0007: Introduction to Computer Programming Console Output, Variables, Literals, and Introduction to Type.
Advertisements

Lecture 2 Introduction to C Programming
Introduction to C Programming
 2005 Pearson Education, Inc. All rights reserved Introduction.
1 Chapter 2 Introduction to Java Applications Introduction Java application programming Display ____________________ Obtain information from the.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Programming Introduction November 9 Unit 7. What is Programming? Besides being a huge industry? Programming is the process used to write computer programs.
Hello, world! Dissect HelloWorld.java Compile it Run it.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Chapter Introduction to Computers and Programming 1.
COMP 110: Introduction to Programming Tyler Johnson January 14, 2009 MWF 11:00AM-12:15PM Sitterson 014.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Chapter 1: Introduction to Computers and Programming.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1: Introduction to Computers and Programming.
IPC144 Introduction to Programming Using C Week 1 – Lesson 2
Introduction CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
Introduction to Java Applications Part II. In this chapter you will learn:  Different data types( Primitive data types).  How to declare variables?
Introduction to Computer Systems and the Java Programming Language.
JAVA BASICS: Variables and References SYNTAX, ERRORS, AND DEBUGGING.
Getting Started with MATLAB 1. Fundamentals of MATLAB 2. Different Windows of MATLAB 1.
Introduction to Programming David Goldschmidt, Ph.D. Computer Science The College of Saint Rose Java Fundamentals (Variables, Arithmetic, etc.)
 Pearson Education, Inc. All rights reserved Introduction to Java Applications.
02 Variables1November Variables CE : Fundamental Programming Techniques.
Getting Started with MATLAB (part2) 1. Basic Data manipulation 2. Basic Data Understanding 1. The Binary System 2. The ASCII Table 3. Creating Good Variables.
Welcome to AP Computer Science A We use the Java language, but this class is much more rigorous than Intro to Java More programming, but also more theory.
“Unboxing” means taking an Integer object and assigning its value to a primitive int. This is done using the.intValue( ) method. Example; Integer z = new.
Chapter 1: Introduction to Computers and Programming.
Review A program is… a set of instructions that tell a computer what to do. Programs can also be called… software. Hardware refers to… the physical components.
Lecture 3: More Java Basics Michael Hsu CSULA. Recall From Lecture Two  Write a basic program in Java  The process of writing, compiling, and running.
COMP Review of Chapter 1 & 2
Chapter 1: Introduction to Computers and Programming
Bill Tucker Austin Community College COSC 1315
Numbers in ‘C’ Two general categories: Integers Floats
Chapter # 2 Part 2 Programs And data
Lecture 1b- Introduction
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
Chapter 2 Variables.
Chapter 2 Basic Computation
Topics Introduction Hardware and Software How Computers Store Data
BASIC ELEMENTS OF A COMPUTER PROGRAM
Key Ideas from day 1 slides
Lecture 1: Introduction to JAVA
Console Output, Variables, Literals, and Introduction to Type
Multiple variables can be created in one declaration
Data types and variables
Variables, Expressions, and IO
Introduction CSE 1310 – Introduction to Computers and Programming
IPC144 Introduction to Programming Using C Week 2 – Lesson 1
IPC144 Introduction to Programming Using C Week 1 – Lesson 2
Introduction to the C Language
IDENTIFIERS CSC 111.
Computer Science and an introduction to Pascal
Mobile Development Workshop
Chapter 2 Variables.
Topics Introduction Hardware and Software How Computers Store Data
WEEK-2.
Welcome to AP Computer Science A!
Tonga Institute of Higher Education IT 141: Information Systems
Agenda Warmup Lesson 1.6 (Do-while loops, sentinels, etc)
Tonga Institute of Higher Education IT 141: Information Systems
Primitive Types and Expressions
Agenda Warmup Lesson 1.9 (random #s, Boolean variables, etc)
SE1H421 Procedural Programming LECTURE 2 Variables (1)
Unit 3: Variables in Java
Chapter 2 Variables.
Agenda Warmup Lesson 1.6 (Do-while loops, sentinels, etc)
Computer Programming-1 CSC 111
Agenda Warmup Lesson 1.9 (random #s, Boolean variables, etc)
Week 1 - Friday COMP 1600.
Chapter 1: Introduction to Computers and Programming
Presentation transcript:

Welcome to AP Computer Science A! Mr. Quinn

Agenda Introduction Software setup Lesson 1.1 (Variables, output, input) Guided Practice (1.1 Assignments) Time Permitting: Lesson 1.2 & Assignments Closure Activity Students will be able to: Declare, initialize, and use variables Output text to the console See how today's lesson fits into the unit and the course as a whole

Email to mquinn@cbsd.org What name you prefer to be called What programming classes have you taken? What other programming skills do you have? 7 interesting facts about yourself

Syllabus

Software setup: Create a folder in your I drive (the drive with your last name on it) called: LastName_AP Comp Sci A Create 3 subfolders within that folder: AP Assignments AP Demos AP Powerpoints Within the AP Assignments folder, create 6 subfolders: Unit 1 Unit 2 Unit 3 Unit 4 Unit 5 Other

4) Go to your Temporary Local Storage drive 4) Go to your Temporary Local Storage drive. If the folders JCreatorV4LE and Java Software are already there, skip this step. If not, go to the Quinn folder (in the teacher drive). In the AP Comp Sci folder, find those two folders (JCreatorV4LE and Java Software). Copy these to your Temporary Local Storage drive. 5) Go to the Quinn folder (in the teacher drive). Open the document “1st Day Jcreator Setup Instructions” and follow all of the steps.

What is Computer Science? Computer Science deals with the theory and methods of processing information in digital computers, the design of computer hardware and software, and the applications of computers.

What does a computer scientist do? The work of computer scientists falls into three categories: designing and building software developing effective ways to solve computing problems, such as storing information in databases, sending data over networks or providing new approaches to security problems devising new and better ways of using computers and addressing particular challenges in areas such as robotics, computer vision, or digital forensics

Why study Comp Sci? Top 10 reasons It’s the highest-paying college major.

Why does this class use the Java language? Java is (arguably) the most popular programming language worldwide Java uses Object-Oriented Programming (OOP) principles, which are used in many other languages (C++, Python, Perl, PHP) – so, if you know Java, it is relatively easy to learn any of the others. Java is used at 90% of Fortune 500 companies Java is used in many games and apps

Java - rules for naming a file Begin with a capital letter No spaces or punctuation Cannot begin with a number Each new word starts with a capital letter

Basic output To display text: System.out.println(“ “); To go to the next line: put \n between the quotes System.out.print(“ “);  do not go to next line Java is case-sensitive Semi-colons after (almost) every line of code Demo: HelloWorld

Variables Variables are memory containers in which info is stored They can hold numbers, letters, words, phrases, etc integers are whole numbers (no decimals) First, declare the variable – specify the type of info the variable will hold, and give the variable a name int x = 0; Setting it equal to zero is called initializing the variable (giving it an initial value) Integers are usually initialized to 0, although there are exceptions to this rule Demo

You give a variable a value by using =, which is called the assignment operator. Important: = does not mean “is equal to!” What it really means is “Take what is on the right side of the equals sign and assign it to what is on the left side.”

Rules for naming variables Use meaningful names Cannot start with a number Numbers and letters only Start with a lowercase letter then capitalize the first letter of other words Examples: y num1 highScore avgTestScore

Source Code vs. Bytecode The code you write is called source code. It is saved in a file with the extension .java. Once you compile it, it is converted into bytecode, which is saved in a file with the extension .class. A program called the Java Virtual Machine understands and runs bytecode. At the lowest level, a computer only understands Machine Language, made up of ones and zeroes. Think of bytecode as an intermediate language between source code (high-level language) and Machine Language (low-level). So, the java compiler (in our case, JCreator) converts your source code into language that the computer can execute.

Practicing at home If you have a computer at home, you can practice and/or complete assignments at home if you wish. Windows users: simply copy the software from the Quinn folder onto a flash drive and install at home. Apple users: you can use a program called Eclipse instead of JCreator.

Assignment (MyInfo) Declare and initialize variables that will hold… your height (in inches) 7 numbers The sum of those 7 numbers (use arithmetic in your code to calculate this, DON’T calculate it yourself!) The average of those 7 numbers (again, use arithmetic) The product of the 2nd and last numbers (again, use arithmetic) The quotient of the 3rd and 4th numbers (arithmetic) Your favorite food Your middle initial In your code, store data in these variables. Do not ask the user to input this data – we haven’t learned this yet. Instead, assign values to the variables in your code. Display the height, sum, average, product, quotient, food, and initial using variables in your System.out lines. (For example, one result could look like, “The sum is 98.”) Make sure your assignment is saved in the right folder.