Semester Grade Calculator

JAVA Programming Language LogoAs we are coming out of Thanksgiving break, I have given my students a “review” project that covers many of the topics that we have covered up to this point in the year.

The goal of the project is to allow for students to enter their Q1 report card grade and their current Q2 in-progress grade and calculate the minimum semester exam grade needed to achieve a final grade of a “C”, a “B”, and an “A”.

The students were given the following “starter” code to work from:

//Program Name: Unit 1 & 2 Review
//Programmer Name: Eric Evans, M.Ed.
//Programmer Organization: Ferris High School
//Program Date: Fall 2016

import java.util.*;
import java.lang.*;
import java.io.*;

public class gradecalculator{
    public static void main (String[] args){
        int runAgain = 1;
        while (runAgain == 1){
            System.out.println("** Minimum Grade Calculator **");
            Scanner q1 = new Scanner(System.in);
            System.out.print("Enter Your Q1 Report Card Grade_ ");
            double myQ1Grade = q1.nextDouble();
            //Copy line 15 and modify for PR4 grade
            //Copy line 16 and modify for PR4 grade
            //Copy line 17 and modify for PR4 grade
            double c = ((69.5 - ((myQ1Grade * 0.45) + (myPR4Grade * 0.45)))/0.10);
            //Copy line 21 and modify for a grade of a b
            //Copy line 22 and modify for a grade of an a
            System.out.println("With a Q1 grade of " + myQ1Grade + " and PR4 grade of " + myPR4Grade + ":");
            System.out.println("");
            System.out.println("To score a C, you will need a minimum of a " + c + " on the semester exam.");
            //Copy line 26 and modify for a grade of a b
            //Copy line 27 and modify for a grade of an a
            System.out.pringln("");
            System.out.println("** NOTE: Negative grades indicate the exam could be skipped");
            System.out.println("** NOTE: Grades over 100 indicate this average cannot be achieved");
            System.out.println("");
            Scanner runItAgain = new Scanner(System.in);
            System.out.println("Would You Like to Perform Another Calculation?");
            System.out.print("1 - Yes  /  0 - No : _ ");
            runAgain = runItAgain.nextInt();
        }
        System.out.println("");
        System.out.println("Program Complete - Exiting");
    }
}

This particular project requires students to utilize their knowledge of working with integer and double variables, scanner keyboard inputs, Boolean logic operators, and iteration loops.

Following this review, students will receive their first exposure to object oriented programming with a multi-class application and methods.

Following is a possible completed solution for the application:

//Program Name: Unit 1 & 2 Review
//Programmer Name: Eric Evans, M.Ed.
//Programmer Organization: Ferris High School
//Program Date: Fall 2016

import java.util.*;
import java.lang.*;
import java.io.*;

public class gradecalculator{
    public static void main (String[] args){
        int runAgain = 1;
        while (runAgain == 1){
            System.out.println("**Minimum Grade Calculator**");
            Scanner q1 = new Scanner(System.in);
            System.out.print("Enter Your Q1 Report Card Grade_ ");
            double myQ1Grade = q1.nextDouble();
            Scanner pr4 = new Scanner(System.in);
            System.out.print("Enter Your PR4 Report Card Grade_ ");
            double myPR4Grade = pr4.nextDouble();
            double c = ((69.5 - ((myQ1Grade * 0.45) + (myPR4Grade * 0.45)))/0.10);
            double b = ((79.5 - ((myQ1Grade * 0.45) + (myPR4Grade * 0.45)))/0.10);
            double a = ((89.5 - ((myQ1Grade * 0.45) + (myPR4Grade * 0.45)))/0.10);
            System.out.println("With a Q1 grade of " + myQ1Grade + " and PR4 grade of " + myPR4Grade + ":");
            System.out.println("");
            System.out.println("To score a C, you will need a minimum of a " + c + " on the semester exam.");
            System.out.println("To score a B, you will need a minimum of a " + b + " on the semester exam.");
            System.out.println("To score an A, you will need a minimum of a " + a + " on the semester exam.");
            System.out.println("");
            System.out.println("** NOTE: Negative grades indicate the exam could be skipped");
            System.out.println("** NOTE: Grades over 100 indicate this average cannot be achieved");
            System.out.println("");
            Scanner runItAgain = new Scanner(System.in);
            System.out.println("Would You Like to Perform Another Calculation?");
            System.out.print("1 - Yes  /  0 - No : _ ");
            runAgain = runItAgain.nextInt();
        }
        System.out.println("");
        System.out.println("Program Complete - Exiting");
    }
}

 

Odd or Even Number

I recently gave a single-class project to my Computer Science I students with the following guidelines:

  • The user is asked to enter a valid integer between -2,147,483,647 and 2,147,483,647
  • The program will then clearly output whether the entered number is an odd number or an even number
  • Following the calculation, the user will be asked if they want to run the program again or exit

The odd/even calculation can be run similar to the following:

//Program Name: Blue Pelican Java Lesson 09 (Project)
//Programmer Name: Eric Evans, M.Ed.
//Programmer Organization: Ferris High School
//Program Date: Fall 2016
 
import java.util.*;
import java.lang.*;
import java.io.*;
 
public class project9
{
    public static void main (String[] args){
        Scanner numberInput = new Scanner(System.in);
        System.out.print("Enter an integer up to 2,147,483,647: _ ");
        int numberOddEven = numberInput.nextInt();
        double check = numberOddEven % 2;
        if (check == 0){
            System.out.println("The integer " + numberOddEven + " is even");
        }else{
            System.out.println("The integer " + numberOddEven + " is odd");
        }
    }
}

This will run the calculation only once. It is using a conditional statement based upon modulus division. If the number entered is an even number, when it is divided by 2 the modulus (remainder) is 0. If the number entered is an odd number, when it is divided by 2, the modulus (remainder) is 1. From here, this is a simple boolean statement (line 18).

Now, we’ll look at creating the loop:

//Program Name: Blue Pelican Java Lesson 09 (Project)
//Programmer Name: Eric Evans, M.Ed.
//Programmer Organization: Ferris High School
//Program Date: Fall 2016
 
import java.util.*;
import java.lang.*;
import java.io.*;
 
public class project9
{
    public static void main (String[] args){
        int runAgain = 1;
        while (runAgain == 1){
            //* * * * * * * * * * * * * * * * * * * * *
            // LINES 13 TO 21 FROM ABOVE BLOCK OF CODE
            //* * * * * * * * * * * * * * * * * * * * *
            Scanner runItAgain = new Scanner(System.in);
            System.out.println("");
            System.out.println("Do You Want to Run Again?");
            System.out.println("1 - Yes, Run Again");
            System.out.println("2 - No, Exit Program");
            runAgain = runItAgain.nextInt();
        }
        System.out.println("Exiting Program. Thank you.");
    }
}

As you can see, we chose to employ a while loop. The initial variable was declared on line 13, which allows us to enter the loop on line 14.

Lines 18 through 22 are asking the user is the want to run the program again. Line 23 assigns the value that was entered to the “runAgain” variable. If the value entered is 1, the while loop runs again. If it is anything other than 1, the loop is exited and line 25 runs.

The final program could look similar to the following:

//Program Name: Blue Pelican Java Lesson 09 (Project)
//Programmer Name: Eric Evans, M.Ed.
//Programmer Organization: Ferris High School
//Program Date: Fall 2016
 
import java.util.*;
import java.lang.*;
import java.io.*;
 
public class project9
{
    public static void main (String[] args){
        int runAgain = 1;
        while (runAgain == 1){
            Scanner numberInput = new Scanner(System.in);
            System.out.print("Enter an integer up to 2,147,483,647: _ ");
            int numberOddEven = numberInput.nextInt();
            double check = numberOddEven % 2;
            if (check == 0){
                System.out.println("The integer " + numberOddEven + " is even");
            }else{
                System.out.println("The integer " + numberOddEven + " is odd");
            }
            Scanner runItAgain = new Scanner(System.in);
            System.out.println("");
            System.out.println("Do You Want to Run Again?");
            System.out.println("1 - Yes, Run Again");
            System.out.println("2 - No, Exit Program");
            runAgain = runItAgain.nextInt();
        }
        System.out.println("Exiting Program. Thank you.");
    }
}

 

Making Progress on Robot

We’re making progress on our robot! Speaking as a teacher, it was great seeing the look on my students’ faces when the robot jumped to life.

Our first scrimmage meet of the season is set for Saturday, 19-November-2016 at 8:00am at Kaufman High School.

While it may not yet be much to look at, it is driving in both a teleoperated and autonomous mode! Now, we can get to our actual build.

Our robot has made it for almost 8 hours of off/on driving over 3 school days on a single battery charge. During that same time, we dropped only one set screw and that was early on in the testing. Once it was tightened down, it has held with no problems.

We have had a few issues with the OTG cable between the core distribution module and the on-board phone. We’re in the process of replacing that with a micro-USB (male) to full-USB (female) that will then mate with a full-USB (male) to mini-USB (male). This will allow us to interface with the phone only having to interact with a full-size USB which we hope is more robust than the micro-USB we are working with now.

Iterations Exam 1

In Computer Science I, we have now completed our first exam over iterations. This was a high-level look at basic iterative structures such as:

  • for loops
  • while loops
  • nested while loops
  • do while loops

The test was administered in a single 90-minute class and then reviewed for corrections which were submitted during the next class session.

Computer Science Unit 2 Test Grade Distribution
Computer Science Unit 2 Test Grade Distribution

The raw (uncurved) exam grades came in with a MEDIAN of 53% and a MEAN of 60.4%. The curved exam grades had a final MEDIAN of 74.05% and a MEAN of 77.8%.

Following validation of the 25 questions, it was determined that only 1 question (#6) was a bad question and was discarded. The remaining 24 questions were considered valid and correct.

Android Studio Setup for FTC

Robotics Laptops Are Ready
Robotics Laptops Are Ready

Finally got around to setting up the FTC programming team laptops with Android Studio today. We’re using 4 HP EliteBook 840 laptops for programming and 1 HP EliteBook 840 for our design and mechanical team.

The plan is to setup all of the hardware to interface with Github for a common development repository for our FTC programming efforts. Obviously, the programming team will be working with this repository much more than the design and mechanical team will.

Once the laptops were ready, Android Studio was downloaded and installed. The installation went fairly smoothly. The SDK that was installed at this time was for Android 5.0 as this is what our driver station and on-board phones will be running.

moto-g-2nd-gen-dual-sim
Motorola G 2nd Generation

We’ll be running the Motorola G 2nd Generation as both our driver station and on-board phones.

We purchased them as part of the starter kit from PITSCO this year. After the ZTE Speed, the Moto-G 2nd Generation appears to be the next smallest volume phone. As we’ll be fighting for every cubic millimeter of space inside the robot, we need to go with the smallest hardware when possible.

Now, to find CAD files of this phone so my design and mechanical team can build a mounting system to hold this and an OTG cable inside the robot.

It Is a Language Other Than English!

It has been a bit of a day, but we now have official word from Texas Education Agency that Computer Science I, Computer Science II, and Computer Science III are all considered as Languages Other Than English and therefore meet the LOTE requirement for students for high school graduation.

At the time of this writing, much of the information on the TEA website is out-of-date and refers to a September 1, 2016 deadline for when these courses no longer count as a LOTE credit. This was what generated much of the confusion.

For us, this means that this course must remain named Computer Science I and not Computer Programming. The difference is that Computer Science I is funded from the State of Texas Technology Applications / Computer Sciences budget while Computer Programming is funded from the Carl D. Perkins-backed Federal Career & Technical Education budget.

Regardless of funding source, we want to do what is in the best interest of our students and offering them an additional “foreign language” alternative is in their best interest. As such, it’s Computer Science I for this year.

AP or No AP

Introduction

This week, I have had the privilege of working with some outstanding educators from across the country at the UTeach: Computer Science Principles AP training held in Dallas, TX.

At this training, we were preparing for the newest addition by College Board to their general AP offerings: AP Computer Science Principles.

On the first day, the presenter stated that not all schools represented were going to be offering this for AP credit and I was stumped. I could not figure out why you would not present a course as AP if you could. However, as the week went on, I realized that my own campus is likely one of the ones that will not offer it as an AP course.

Background (Course)

This course is built to be offered to students who would not typically take a Computer Science course. UTeach has based their curriculum on the University of Texas courseThriving in Our Digital World which is the mandatory Computer Science course for non-Computer Science majors.

Background (My Students)

The students I will be starting with next year have all self-taught themselves JAVA as part of an after-school club. They participated on their own at UIL district competition and advanced to compete at UIL regional competition! These students have a strong desire to refine their skills in computational thinking and program development.

The Problem

The AP Computer Science Principles course is language agnostic and primarily relies on block languages such as Scratch for its primary delivery. As my students have been working with a text-based language, this will feel like a substantial step backwards.

Also, the course will not adequately prepare my students for participation in UIL, which is JAVA specific. I feel that my students will derive more long-term benefit from preparation and participation in UIL than they would completing this AP course.

Administration Support

I am blessed to have an administration team at the campus and district levels who trusts my judgement to do what is in the best interests of our students. I have actually been told by one of my administrators, “My ego is not stroked based upon how many courses have the letters “AP” in front of them. Do what’s best for our students. That’s what I want and what I expect.”

The Decision

Currently, the decision has been made that we will be offering the following:

  • Computer Programming
    • 2016/2017 (Not AP)
      • Programming Language: JAVA
    • 2017/2018 and Beyond (Not AP)
      • Programming Language: Python
  • AP Computer Programming
    • 2017/2018 (AP CS-A)
      • Programming Languages: Python, Ruby and Persistent Parallels to JAVA
    • 2018/2019 and Beyond (AP CS-A)
      • Programming Languages: JAVA and Ruby

The idea is that the students entering Computer Programming in 2016/2017 will be formally learning JAVA. In the next year, those students will progress to the second-year course, which is aligned with AP Computer Science-A and will cover the languages of Python and Ruby with persistent reminders of JAVA. Students in this group will be the UIL Computer Science team for both 2016/2017 and 2017/2018.

The students entering Computer Programming in 2017/2018 will be learning Python while learning computational problem-solving skills. In the next year, those students will progress to the second-year course, which is aligned with AP Computer Science-A and will cover the languages of JAVA and Ruby. Starting in 2018/2019, when these students enter the second-year course, they will be the UIL Computer Science team. In all future years, the team will be comprised of students from this second-year course.

Long-Term Benefit

The hope is that students in this program will leave with truly marketable skills in JAVA, Ruby, and Python development.