Welcome to APCSA

  1. Lesson 25 - Sorting Algorithms


    Slides

    Classwork/Homework

    Bubble Sort

  2. Lesson 24 - ArrayList Hierarchy


    Slides

  3. Lesson 23 - Polymorphism


    Slides

    Classwork/Homework

    Complete the exit-ticket on GoogleClassroom.

  4. Lesson 22 - Inheritance (part 2)


    Slides

    Classwork/Homework

  5. Lesson 21 - Inheritance (part 1)


    Slides

    Demo

    Homework

  6. Lesson 20 - File Handling


    Slides

    Classwork

    Homework: Finish CW.

  7. Lesson 19 - ArrayList


    Slides

    Classwork

    Homework

  8. Lesson 18 - Wrapper Classes


    Slides

    Classwork

  9. Lesson 17 - Exceptions


    Slides

    Classwork: Add exceptions to your SuperArray lab.

  10. Lesson 16 - SuperArray


    Slides

    Classwork - Homework

  11. Lesson 15 - Static Methods and Variables


    Slides

  12. Lesson 14 - Objects and Classes


    Part 1

    Part 2

    Example

  13. Lesson 13 - Methods, arguments/parameters, Java pass by value


    Slides

    Classwork

  14. Lesson 12 - 2D Arrays


    Slides

    Classwork

  15. Lesson 11 - More about Arrays


    Slides

    Classwork/Homework

  16. Lesson 10 - Arrays


    Slides

    Classwork/Homework

  17. Lesson 09 - String Methods, Math Class


    Slides

    Classwork: GoogleClassroom assignment

  18. Lesson 08 - Strings and Loops


    Slides

    Java Visualizer

    Homework

  19. Lesson 07 - Java Memory Architecture and Strings


    Slides

    Classwork

    Homework

  20. Lesson 06 - User Input


    Slides

    Classwork

    Homework

  21. Lesson 05 - Casting


    Slides

    Classwork

    Homework

  22. Lesson 04 - Expressions and Assignment Statements


    Slides

    Classwork

  23. Lesson 03 - Data Types and Varialbes


    Slides

  24. Lesson 02 - Intro to Java


    Slides

  25. Lesson 01 - Git


    GitHub

    Read the Git and GitHub documentation provided in the Tools section.

    Git Commands: When to Use Them

    git clone

    When to use:
    Use this the first time you want to copy a remote repository (e.g., from GitHub) to your computer.

    Command:

    git clone <repository_ssh_url>

    Tip: Run this only once per project. After that, use git pull to update your local copy.

    git pull

    When to use: Use this to bring in the latest changes from the remote repository to your local repository.

    Command:

    git pull

    Tip: Always run this before starting new work to make sure your files are up to date.

    git add

    When to use: Use this to stage (mark) new or modified files that you want to include in the next commit.

    Command: For one file git add <file_name> For all changes git add .

    git commit

    When to use: Use this after git add to save a snapshot of your staged changes in the local repository.

    Command:

    git commit -am "Describe the change you made"

    Tip: Write clear and meaningful commit messages so you and others understand the change.

    git push

    When to use: To send your committed changes from your computer to the remote repository (e.g., GitHub).

    Command:

    git push

    Typical Workflow

    1. git pull: get the latest updates.

    2. Edit your code/files.

    3. git add: if new files have been added or to stage your changes.

    4. git commit -am "message": save your changes locally.

    5. git push: upload your changes to GitHub.

  26. Lab 06 - Sorting Algorithms


    DUE DATE:

    Please accept this assignment.

    Due Date: Monday, December 8, 2025 at 08:00 am.

  27. Lab 05 - Arraylist Hierarchy


    DUE DATE:

    Please accept this assignment.

    Due Date: Wednesday, November 26, 2025 at 08:00 am.

  28. Lab 04 - SuperArray


    DUE DATE:

    Please accept this assignment.

    Due Date: Thursday, October 30, 2025 at 11:59 pm.

  29. Lab 03 - Triangle


    DUE DATE:

    Please accept this assignment.

    Due Date: Friday, October 24, 2025 at 08:00 am.

  30. Lab 02 - My String Methods


    DUE DATE:

    Please accept this assignment.

    Due Date: Monday, September 29, 2025 at 11:59 pm.

  31. Lab 01 - Random Walker


    DUE DATE:

    Please accept this assignment.

    Due Date: Friday, September 19, 2025 at 08:00 am.

  32. HW 12 - More Shapes


    DUE DATE:

    Save your files here: .../APCSA1/apcsa-assignments-YourUsername-fall/homework/11_14_more_shapes/

    • Write a superclass Circle. The instance variable should be radius. There will be one constructor to initialize the instance variable. The following methods should be implemented: getRadius(), toString(), getArea().

    • Write a subclass Cylinder which extends from Circle. Define the instance variable height. There will be one constructor to initialize the instance variable. The following methods should be implemented: getHeight(), getVolume(), getArea(), toString(). If you are overriding a method, please use the @Override annotation.

    • Write a Driver.java to test your code.

    image

  33. HW 11 - Shapes


    DUE DATE:

    Save your files here: .../APCSA1/apcsa-assignments-YourUsername-fall/homework/11_13_inheritance_shapes/

    • Create the following classes: Shape (superclass), Rectangle, Triangle, Driver.
    • Rectangle and Triangle should inherit from Shape.
    • Declare private instance variables in class Shape: double height and double width.
    • Write a constructor in class Shape to initialize the values for height and width.
    • Write public methods in class Shape to get/set height and width values: getHeight(), getWidth(), setHeight() and setWidth().
    • Write a method getArea() in both of the subclasses Rectangle and Triangle which calculates and returns the area the result.
    • You will need to define the constructors in Rectangle and Triangle classes (which call the Shape constructor).

  34. HW 10 - WordPair


    DUE DATE:

    1. Finish CW 18.

    2. Directions here. Save your files here: .../APCSA/apcsa-assignments-fall-YourUsername/homework/11_05_WordPair/

  35. HW 09 - Strings and Loops


    DUE DATE:

    CodingBat

    Java Visualizer

  36. HW 08 - Strings


    DUE DATE:

    Complete this CodingBat.

  37. HW 07 - Scanner


    DUE DATE:

    Go inside the folder homework, and create a subfolder 09_15_snooze. Inside this folder, you will write the following java file:

    NoonSnooze.java: This program should ask the user for a number that represents the number of minutes, snooze, that have elapsed since 12:00 pm (noon) and prints the resulting time. Assume a 12-hour clock (with 'am' and 'pm'). You must not use loops. If the snooze value is negative, print a warning message: "No negative values are allowed".

    Examples:

    If the user input is 50, the output should be 12:50 pm

    If the user input is 100, the output should be 1:40 pm

    If the user input is 721, the output should be 12:01 am

    If the user input is 11111, the output should be 5:11 am

    If the user input is -10, the output should be No negative values are allowed

  38. HW 06 - Practice Variables and Expressions


    DUE DATE:

    Go inside the folder homework, and create a folder 09_12_practice. Inside this folder, you will write the following programs:

    1. Write a Java program (Fractions.java). In this program you will initialize 4 integers that represent each part of two fractions, namely the numerator and denominator of the first fraction and the numerator and denominator of the second fraction. Your program should add the two fractions and print out the result.

    For example, a sample program run might look like this:

      The numerator of the first fraction is 1
      The denominator of the first fraction is 2
      The numerator of the second fraction is 2
      The denominator of the second fraction is 5
      The sum of 1/2 + 2/5 = 9/10
    
    1. Write a Java program (WorkShift.java). A doctor works 20 hours, 42 minutes, and 16 seconds in one shift at a hospital. Convert the total shift time into seconds and display that information.

    NOTE: You must use at least ONE compound operator (+=, -=, *=, /=, %=) to complete this program.

    Quiz Reminder

    The Summer Assignment Quiz will be on Tuesday, September 16th

  39. HW 05 - Data Types and Variables


    DUE DATE:

    Data Types and Variables

    Directions: Create a new folder named 09_10_variables inside your homework directory in your assignments repository: .../APCSA1/apcsa-assignments-fall-YourUsername/homework/09_10_variables

    Inside this folder, write the following programs:

    1. Write a Java program (Temperature.java) to convert temperature from Fahrenheit to Celsius degrees. You must use variables.

    Output:

    50.0 degrees Fahrenheit is equal to 10.0 Celsius

    1. Write a Java program (Calculator.java) that calculates the sum of two numbers (int or double). You must use variables.

    Output:

    10 + 12 = 22

    1. Create a file TrickyCalc.java and copy the following code inside. Run the program. Create a file answers.txt or answers.md and respond to the following questions:
    • What do you notice about the mySum value?
    • What is the value of checkResult, and why do we get that result?
    public class TrickyCalc{
       public static void main(String[] args){
           double mySum = 0.1 + 0.1 + 0.1;
           double tmp = 0.3;
           boolean checkResult = mySum == tmp;
    
           System.out.println("0.1 + 0.1 + 0.1 = " + mySum);
           System.out.println(mySum + " == " + tmp + " is " + checkResult);
       }
    }
    
    1. Don’t forget to add your new files to Git, then commit and push your changes. After that, go to GitHub and verify that your files are there. I will not accept any excuses tomorrow if your homework is missing.

    2. Double check that your files are organized like this in your repo:

    apcsa-assignments-YourUsername
      classwork
        09_09_hello_world
          HelloWorld.java
      homework
        09_09_welcome
          Welcome.java
        09_10_variables
          Temperature.java
          Calculator.java
          TrickyCalc.java
          answers.txt or answers.md
    

  40. HW 04 - Git commands practice


    DUE DATE:

    The objective of this homework is to create a java file, add it, commit and push to a remote repository.

    1. In your local machine at home, go to the folder where your assignments repo was cloned ...../APCSA1/apcsa-assignments-fall-YourUsername/, execute git pull and create a folder homework.
    2. Create a folder 09_09_welcome inside the homework folder.
    3. Write a java file Welcome.java (this should be the path ...../APCSA1/apcsa-assignments-fall-YourUsername/homework/09_09_welcome/Welcome.java). In this program, you should introduce yourself. Print two lines to the console using the System.out.println() method.

    In the first line, state your name, and in the second line state your favorite hobby.

    Your output should be in the following form:

    My name is ...
    My favorite hobby is ...
    
    1. Run git status. What does it show?

    2. To add the new file to the repository, run the following command from the root (top-level, ...../APCSA1/apcsa-assignments-fall-YourUsername/) of your repo, not from inside the homework folder:

      git add homework/09_09_welcome/Welcome.java

    3. Run git status again. What does it show this time?

    4. Commit and push the file to your repo.

    5. Go to GitHub, Welcome.java should be there.

    6. Tomorrow, we will pull the changes using the lab machines.

  41. HW 03 - Git


    DUE DATE:

    1. Set up SSH
      Configure your home computer to connect to GitHub using SSH, if you have not done that already.

    2. Accept the Assignments Repository

      • If you haven’t already, accept the assignments repository using this link.
      • After accepting, a repository will be created under your GitHub account.
      • If you run into any issues, contact me.
    3. Clone the Assignments Repository

      • Open your GitHub assignments repository for this class.
      • Click the green Code button, select SSH, and copy the link provided (it will look like git@...).
      • Create a folder named APCSA1 anywhere on your computer.
      • Open your terminal, navigate inside the APCSA1 folder, and run:
        git clone PASTE_THE_LINK_YOU_COPIED_FROM_GITHUB

    Quiz Reminder

    The Summer Assignment Quiz will be on Tuesday, September 16th.

  42. HW 02 - Summer Assignment, Piazza, Git


    DUE DATE:

    Summer Assignment

    1. Follow the next steps to share your CodingBat Summer work with me.
    • Log in to your CodingBat account.
    • Click on prefs
    • Teacher Share section: type the teacher's email jnovillo@stuy.edu
    • Click on Share
    • Update the Memo section: type YourPeriod_YourLastName_YourFirstName (no spaces) like this 1_smith_peter
    • Click on Update Memo
    1. Submit the complete Java program that was assigned (Google Classroom).

    Piazza

    1. Post a question or comment about the summer assignment. Feel free to reply to peer's comment/question to generate a productive discussion.

    GitHub

    1. Set up Git and SSH keys on your home computer and practice using Git commands. If you have any questions, post them on Piazza, and I encourage everyone to help your peers by answering those questions.

  43. HW 01 - Forms


    DUE DATE:

    Complete the following forms:

  44. CW 30 - Random


    DUE DATE:

    Random

    Save here: .../APCSA1/apcsa-assignments-YourUsername-fakk/classwork/12_05_random/random.txt

    1. Which of the following statements assigns a random integer between 1 and 10, inclusive, to rn ?
    a. int rn = (int) (Math.random()) * 10;
    b. int rn = (int) (Math.random()) * 10 + 1;
    c. int rn = (int) (Math.random() * 10);
    d. int rn = (int) (Math.random() * 10) + 1;
    e. int rn = (int) (Math.random() + 1) * 10;
    

    Answer:

    1. Consider the following code segment, which is intended to assign to num a random integer value between min and max, inclusive. Assume that min and max are integer variables and that the value of max is greater than the value of min.
    double rn = Math.random();
    int num = /* missing code */;
    

    Which of the following could be used to replace /* missing code */ so that the code segment works as intended?

    a. (int) (rn * max) + min
    b. (int) (rn * max) + min - 1
    c. (int) (rn * (max - min)) + min
    d. (int) (rn * (max - min)) + 1
    e. (int) (rn * (max - min + 1)) + min
    

    Answer:

    1. Assume that myList is an ArrayList that has been correctly constructed and populated with objects. Which of the following expressions produces a valid random index for myList?
    a. (int) ( Math.random () * myList.size () ) - 1
    b. (int) ( Math.random () * myList.size () )
    c. (int) ( Math.random () * myList.size () ) + 1
    d. (int) ( Math.random () * (myList.size () + 1) )
    e. Math.random (myList.size () )
    

    Answer:

  45. CW 29 - Insertion Sort


    DUE DATE:

    Directions:

    • You must implement insertion sort. Use the following method signature:

    public static void insertionSort(int[] data)

    • Please do NOT change the method signature.

    • Do not use ArrayList.

    • Your methods must not produce any output when they finish. Although using print statements during debugging is fine, they should be completely removed in your final submission.

    • Once you create an array to test your method, make a copy of it. This allows you to compare the results of your sort with Java’s built-in sort (Arrays.sort(yourArray)), using the original array for your method and the copied array for the built-in method.

    Save here: .../APCSA1/apcsa-assignments-fall-YourUsername/classwork/12_04_insertion_sort/InsertionSort.java

  46. CW 28 - Selection Sort


    DUE DATE:

    Directions:

    • You must implement selection sort. Use the following method signature:

    public static void selectionSort(int[] data)

    • Please do NOT change the method signature.

    • Do not use ArrayList.

    • Your methods must not produce any output when they finish. Although using print statements during debugging is fine, they should be completely removed in your final submission.

    • Once you create an array to test your method, make a copy of it. This allows you to compare the results of your sort with Java’s built-in sort (Arrays.sort(yourArray)), using the original array for your method and the copied array for the built-in method.

    Save here: .../APCSA1/apcsa-assignments-fall-YourUsername/classwork/12_03_selection_sort/SelectionSort.java

  47. CW 27 - Bubble Sort


    DUE DATE:

    Directions:

    • You must implement bubble sort. Use the following method signature:

    public static void bubblesort(int[]data) { }

    • Please do NOT change the method signature.

    • Do not use ArrayList.

    • Your methods must not produce any output when they finish. Although using print statements during debugging is fine, they should be completely removed in your final submission.

    • Once you create an array to test your method, make a copy of it. This allows you to compare the results of your sort with Java’s built-in sort (Arrays.sort(yourArray)), using the original array for your method and the copied array for the built-in method.

    Save here: .../APCSA1/apcsa-assignments-fall-YourUsername/classwork/12_02_bubble_sort/BubbleSort.java

  48. CW 26 - Advent of Code


    DUE DATE:

    Advent of Code 2016

    Save here: .../APCSA1/apcsa-assignments-fall-YourUsername/classwork/11_26_advent_of_code/

    Due date: Wednesday, December 3 at 08:00 am

    Create an account and join leaderboard

    • Go to https://adventofcode.com/2016 and create an account if you do not have one. Otherwise, log in to your account.
    • Click on Leaderboard, then click on Private Leaderboard and join our class leaderboard using this code 3225641-46c1b3bf.

    Classwork/Homework

    • Required: Work on part 1 problems of days 1, 2, 3, 6.

    • Optional: Choose a part 2 problem of days 1, 2, 3, 6. Or any other harder problem(s).

    HAVE FUN!!!

  49. CW 25 - Numbers


    DUE DATE:

    Directions

    Save here: .../APCSA1/apcsa-assignments-fall-YourUsername/classwork/11_19_inheritance_numbers/

    Due Date: November 24 - 8:00 am

  50. CW 24 - Inheritance Worksheet


    DUE DATE:

    Worksheet

    Save here: .../APCSA1/apcsa-assignments-fall-YourUsername/classwork/11_18_inheritance_worksheet/answers.txt

  51. CW 23 - Library


    DUE DATE:

    Directions

    Save here: .../APCSA1/apcsa-assignments-fall-YourUsername/classwork/11_17_library_books/

  52. CW 22 - Count Triangles


    DUE DATE:

    Directions

    Save here: .../APCSA1/apcsa-assignments-fall-YourUsername/classwork/11_12_count_triangles/

  53. CW 21 - File Handling


    DUE DATE:

    Directions

    Save here: .../APCSA/apcsa-assignments-fall-YourUsername/classwork/11_10_file_handling/

  54. CW 20 - FRQs


    DUE DATE:

    APCS FRQ Practice Assignment

    Instructions:

    • You will work on the APCSA FRQs from last year.

    • You do not need to create Java files.

    • Simply write the method(s) that each question asks for.

    • You do NOT need to write the entire class, only the required methods.

    • Save your answers in one file using any of these formats: .txt, .md, .docx, or .pdf.

    • Complete the exit-ticket on GoogleClassroom at the end of the period.

    Submissions

    1. Progress Submission (In-Class Work)

    Upload your current progress by the end of the period today (Friday, 11/07).

    This submission is required for full credit.

    Save here: ../APCSA/apcsa-assignments-fall-YourUsername/classwork/11_07_FRQs_in_class/

    1. Final Submission (All 4 FRQs Completed)

    Submit all four completed FRQs in one file by Monday, 11/10 at 08:00 am.

    Save here: ../APCSA/apcsa-assignments-fall-YourUsername/classwork/11_07_FRQs_final/

  55. CW 19 - ClimbInfo and CodingBat


    DUE DATE:

    Part 1

    Directions have been posted here

    Save here: .../APCSA/apcsa-assignments-fall-YourUsername/classwork/11_06_ClimbInfo/

    Part 2

    CodingBat

  56. CW 18 - ArrayList


    DUE DATE:

    Directions have been posted here

    Save here: .../APCSA/apcsa-assignments-fall-YourUsername/classwork/11_05_ArrayList/

  57. CW 17 - Wrapper Classes


    DUE DATE:

    Directions have been posted here

    Save here: .../APCSA/apcsa-assignments-fall-YourUsername/classwork/11_03_wrapper_classes/

  58. CW 16 - SuperArray


    DUE DATE:

    Directions have been posted here.

    Save here: .../APCSA/apcsa-assignments-fall-YourUsername/classwork/10_23_super_array/

  59. CW 15 - Coordinates Day 2


    DUE DATE:

    Go here

    Look at the Driver file, and follow the directions.

  60. CW 14 - Coordinate


    DUE DATE:

    Part 1

    Answer these questions:

    1. Can you call a static method from a non-static one?
    2. Or vice versa, can you call a non-static method from a static one?
    3. Try that in your class Employee, and write your answers as comments at the end of your Employee class.

    Part 2

    We want to implement (write) a class Point, which fields represent a 2D coordinate (x, y). Let's think about the class design.

    1. How many instance variable are needed? Private or Public?
    2. What constructors should be needed?
    3. What methods do you think should be needed?
    4. Would it be possible to make the Point class immutable? If so, how?

    Write your answers to those questions in a txt or md.

    Save here: .../APCSA1/apcsa-assignments-fall-YourUsername/classwork/10_15_coordinate/answers.txt

    Part 3

    Go here and copy the files Point.java and Driver.java in your folder classwork folder "10_15_coordinate".

    Look at the Driver file:

    There are a few questions to respond in that file. Please write your answers as comments in Driver.java

    Optional: If you have time you may start writting the Point class. Otherwise, no worries we will work on this tomorrow, Thursday.

    DO NOT FORGET TO COMMIT AND PUSH YOUR CHANGES AT THE END OF THE PERIOD.

  61. CW 13 - And... More 2D Arrays!


    DUE DATE:

    Starter Code.

    Save your Java files here: .../APCSA1/apcsa-assignments-YourUsername/classwork/10_08_2D_arrays/

  62. CW 12 - 2D Arrays Practice


    DUE DATE:

    Directions are here.

    Save your Java files here: .../APCSA1/apcsa-assignments-YourUsername/classwork/10_07_2D_arrays/

  63. CW 11 - 2D Arrays


    DUE DATE:

    Directions are here.

    Save your Java files here: .../APCSA1/apcsa-assignments-YourUsername/classwork/10_06_2D_arrays/

  64. CW 10 - We love arrays and CodingBat


    DUE DATE:

    CodingBat

  65. CW 09 - Arrays and Loops


    DUE DATE:

    CodingBat

  66. CW 08 - Arrays


    DUE DATE:

    CodingBat

  67. CW 07 - More Strings


    DUE DATE:

    CodingBat

    Java Visualizer

    Important: Make sure to log in to CodingBat before you begin.

    Due Date: Thursday, September 25 at 8:00 am

  68. CW 06 - Strings


    DUE DATE:

    Get this starter code and follow those directions.

    Save your file here: .../APCSA1/apcsa-assignments-fall-YourUsername/classwork/09_18_strings/MyStrings.java

  69. CW 05 - CodingBat


    DUE DATE:

    Let's work on the following Exercises to strengthen your problem-solving and programming skills.

    Important: Make sure to log in to CodingBat before you begin.

  70. CW 04 - Scanner


    DUE DATE:

    Save your file here: .../APCSA1/apcsa-assignments-fall-YourUsername/classwork/09_15_scanner/NightOut.java

    Follow these directions to write your NightOut.java program:

    You and a friend are going out for the night. You have decided to treat your friend, so you’re paying for the whole night. However, since you have a fixed amount of money to spend on fun things, you need to track how much the outing will cost so you can update your budget.

    Write a program to help yourself estimate what the total cost of the night will be. Your program will estimate the cost by taking the cost of the activities for one person and estimating how much it will cost for two people.

    Here’s what you know about your activities:

    Dinner - you know you typically get cheap dinners, so you expect that your friend’s dinner will be twice as expensive as yours

    Laser Tag - since laser tag is charged per person, you and your friend will cost the same

    Ice cream - you like the triple scoop, but your friend likes a single scoop. Your friend’s ice cream will cost 1/3 as much as yours.

    Your program should ask how much YOUR dinner cost, how much laser tag costs per person, and how much YOUR ice cream costs. It should then compute how much your friend’s costs will be based on the information above. Be sure your program takes the input in this exact order. Then print how much dinner will cost (for both of you), how much laser tag will cost (for both of you), and how much the ice cream will cost (for both of you). Then print the grand total for the evening.

    Your output should look something like this:

    How much does dinner usually cost? 
    
    12.63
    
    How much is laser tag for one person? 
    
    17.50
    
    How much does a triple scoop cost? 
    
    27.00
    
    Dinner: $37.89
    
    Laser Tag: $35.0  
    
    Ice cream: $36.0
    
    Grand Total: $108.89
    

  71. CW 03 - Casting


    DUE DATE:

    Create a java file Casting.java and implement a method that:

    • Receives 2 integers
    • Divides the two ints
    • Prints the result

    The trick here is that we want the division of the two ints to result in a double! Casting values to doubles will be necessary to solve this exercise. Here is an example:

    x = 3
    
    y = 4
    
    Output => 0.75
    

    Save your file here: .../APCSA1/apcsa-assignments-YourUsername/classwork/09_12_casting/Casting.java

  72. CW 02 - Expressions


    DUE DATE:

    Indicate the value and type of each of the following expressions. If the expression does not compile or causes a runtime exception, put an X.

    You do not have to submit this work, but do it on your notebook so you can review it at any time.

    Expressions
    
    2 + 5
    
    8 / 10 * 1.5
    
    12 % 7
    
    2 + 3 * 4
    
    2 + 3.0 * 4
    
    1 / 1 / 0
    
    1.0 / 1 / 0
    
    “Happy” + “Face”
    
    “8+2” + “5”
    
    “10” + 8 + 12
    
    2 + 4 + "5" + 6
     
    27 % 4
    

  73. CW 01 - Hello World and Git


    DUE DATE:

    The objective of this exercise is to create a java file, add it, commit and push to a remote repository.

    1. In your local machine, go to the folder where your assignments repo was cloned ...../APCSA1/apcsa-assignments-fall-YourUsername/, execute git pull and create a folder classwork.

    2. Create a folder 09_09_hello_world inside the classwork folder.

    3. Write a java file HelloWorld.java that prints the message "Hello World!".

    4. Run git status. What does it show?

    5. To add the new file to the repository, run the following command from the root (top-level, ...../APCSA1/apcsa-assignments-fall-YourUsername/) of your repo, not from inside the classwork folder:

      git add classwork/09_09_hello_world/HelloWorld.java

    6. Run git status again. What does it show this time?

    7. Commit and push the file to your repo.

    8. Go to GitHub, HelloWorld.java should be there.