Java Programming

 

      

 

Wednesday, February 26th

 


Careers in AI presentation. What are your questions about AI?

Begin Section 5 Lesson 2: Control Statements slides
Begin Section 5 Lesson 2: Control Statements  quiz and show your results to your instructor for teacher check
Begin work on the Section 5 Lesson 2: Control Statements practice.
Section 5.2 Coding - show your programs to your instructor for teacher check:
1. Message Decoder
4. Anagram

Relational operators, logical operators &&, ||, !

Begin Section 6 Lesson 1: Using Arrays slides
Begin Section 6 Lesson 1: Using Arrays quiz and show your results for teacher check
Begin work on the Section 6 Lesson 1: Using Arrays practice on school loop.

BucketsOfPaint code from yesterday

/*
* Write a program that calculates the number of buckets of paint to use for a room and the optimal number of cans to purchase.
You need to ask the height of the room and the length and width of the room. The room is rectangular. You must paint the walls and the ceiling but not the floor. There are no windows or skylights. You can purchase the following size buckets of paint.
• 5-liter bucket costs $15 each and covers 1500 square feet.
• 1-liter bucket costs $4 and covers 300 square feet.
*/

// variables
int length, height, width, area;

Scanner input = new Scanner(System.in);

System.out.println("Welcome to the Paint Calculator Program");
System.out.println("Please enter the length of your room");
length = input.nextInt();
System.out.println("Please enter the width of your room");
width = input.nextInt();
System.out.println("Please enter the height of your room");
height = input.nextInt();
area =
System.out.println("The area of your room is " + area);

Copy and paste the following code examples into Eclipse:

LoopPractice

PalindromeTester

Thursday - Intro to Arrays

 

Homework

Install Eclipse on your home computer if you would like to be able to work on your java at home.

 

What

Objectives for Section 4 Lesson 2
In this lesson, you will learn how to:
• Describe the general form of a Java program
• Use variables and apply the IF and FOR statements
• Create a block of code
• Recognize Java keywords

 

Why

Eclipse is an efficient and easy to use a development environment for creating Java programs. It is a well known tool by many Java programmers and is used in many development environments.
Learning Eclipse in this lesson will give you additional skills with tools used in the Java programming space.

 

How

By completing the slides, quiz and practice exercises.