Java 1 Trial

Getting Started with Repl: https://repl.it/~

Introduce yourself to your student, and get to know the student.

  • Ask them how long they've been programming (helps gauging their experience early on)
  • Why are they interested in programming?
  • What grade is he/she in?
  • Any hobbies/interests? (This can help with coming up with examples for code)

Ask your student to go to https://repl.it/~ and create a new account. This will help them with the link sharing.

Ask your student to share the repl link with you. (Click the share button at the top right, and then scroll down to get the link).

Introduction

The first thing you want to do after the initial startup, is to gauge specific subjects that a student may know of. There are two tiers that amount to experience:

Beginner:

  • Printing
  • Data types
  • Variables
  • Math

Intermediate:

  • Input using Scanner
  • Statements (if/else)
  • Loops

Scroll to the bottom of this document to see the outline of each section.

Extra help

There are times where a student will want to use the trial time to better their understanding of any of the specific subjects above. In that case, you will need to follow a step-by-step guide on how to effectively teach them.

  1. Find out to what extent they know of the subject
  2. If they have no or little understanding, start from the beginning.

a. Introduce the purpose of the subject. b. Demonstrate an example where the subject is used to enhance coding. c. Demonstrate the syntax of the subject, and what each part of it means. d. Demonstrate the jargon of each part of the subject properly.

  1. Once they have a basic understanding of the subject, you may help create exercises that follow two basic formats

a. Skeleton coding (or fill in the blank coding): the instructor will type a segment of code with a few vital portions missing, and the student fills in the portions to make the code work. b. Full coding: the instructor gives a list of criteria for the creation of a segment of code that the student will fulfill.

  1. You will want to create a few exercises of skeleton coding before moving on to a full coding assignment. This way, the student feels more confident and can use skills learned prior. You may provide exceptions or hints. After all, these are exercises, not tests.
  2. You can give the student creative freedom in these exercises. You may also create your own exercises that follow the two aforementioned formats.

Wrapping up the trial:

Once you finish with an ample amount of exercises, it is imperative that you ask questions to the student to get a good idea of their understanding of a subject.

  • You should ask questions such as "Are you more confident in understanding the subject?" or "Is there anything about the subject that you would like me to clarify?"
  • Make sure that you complement the strengths of the student, and their performance overall. Most students will do better than when they began, and some will make little progress. It is important to remember that everyone learns differently.
  • Finally, ask the student how they enjoyed the trial, and make sure to get feedback on your own.

OUTLINE:

Beginner:

Topics to cover:

  • Printing
  • Data types and Variables
  • Math

PRINTING

Show the student how to print something using

System.out.println()
. Tell them how and when to use quotes.

Exercise: Ask your student to print out their name, grade, and their favorite animal. You can ask other fun questions about who they are as well.

DATA TYPES AND VARIABLES

Start introducing the concept of data types.

int
: a whole number (9)
float
: a precise number that uses decimal rounding (9.0000)
Boolean
: value that declares true or false (1 == 1 is true, but 2 == 1 is false)
String
: a quoted sequence of letters or phrase surrounded by quotes ("Hello!" or "9918")

Exercise: Ask your student to create an integer of their birth year, birth month, and birthday. Then, ask your student to print them in MM/DD/YYYY format.

MATH

Show the student the difference between '+' with combining or statements and using '+' with numbers. Show the student operators and uses like -, *, /, and %.

Exercise: Ask the student to make two int variables and print them each being added, subtracted, multiplied, and divided.

Intermediate:

Topics to cover:

  • Scanner (input)
  • Statements (if/else)
  • Loops

INPUT USING SCANNER

  • At the top of the program, type import
    java.util.Scanner
  • At the beginning of the main method, type
    Scanner scan = new Scanner(System.in);
  • Briefly explain how scan is the name of our Scanner, and how scanners read what comes in.
  • Use
    scan.nextInt()
    as an integer declaration to show them a program that takes in a number and adds it by 10
  • Exercise: ask the student to create a program that asks the user to take in two numbers, and output the product of them (multiplied).

STATEMENTS (If/Else)

Remind the student about how

boolean
acts under a true or false premise, and that sometimes they will encounter moments in programming where you have to decide what code to run if a condition is true or false.

Introduce the syntax of an if statement:

Since 1 is greater than 0, the if statement will run the code within the brackets.

Show them that if the condition is false, the code underneath will not run. Demonstrate to the student that the code will run the alternative else statement:

The if statements will run only if the condition within the if statement is true, otherwise it will execute the code in an else statement if provided.

Introduce the topic of an else if statement, and how the program will check the next if statement in the block of code if available. Tell them how else if's will not run once a condition above them is found to be true, as opposed to multiple if statements, that are always checked.

Exercise: Ask the student (however presented) to make an if else statement that will print the if block. Then, make them modify it so that it will print the else block. Also, ask them to input a number that's greater than 9. If the inputted number

input
is less than nine, print
False
. If it's greater than 9, print
True
.

LOOPS

Demonstrate an example where a student would need to type or execute the same line of code over and over again. Emphasize how it's easy to make mistakes and how it takes more space and time.

Example:

While Loops: Demonstrate how while loops repeat until the conditional becomes false (and how it can be infinite). Explain to the student that while loops will not execute once if the conditional is false the first time.

Examples:

Exercise: Create a while loop that does any of the above.

Now, show the student the syntax of a for loop:

Make sure you explain increment and decrement (x++ and x--), initial expression, test expression, and decrement.

Exercise: create a for loop similar to that, and ask the student how many times they will execute.

Bonus Exercise: ask a student to create a for loop with an if statement in it to print even numbers only from 0-20.