top of page
  • YouTube
  • Instagram
  • Facebook
Computer Keyboard

Coding Challenges

We've made some challenges that will definitely get your brain working. These challenges use only the concepts learned in the video and in previous videos. If you have any questions or any suggestions for videos or challenges, feel free to email us! 

Coding Challenge #1: Java Introduction

Challenge:

  • Correctly write and Print 10 different variables

    • Two String variables

    • Two Doubles

    • Two float

    • Two int

    • Two chars

Optional: Watch our video on math operators and write a conversion code that will convert inches to centimeters

      • google the conversion

      • print the cm value

Link to Java Course Playlist to find Video:

https://www.youtube.com/playlistlist=PLSyvWK7ZayjrAk1lziNF582qICOip8lPx

Coding Challenge #2: Scanner Method

Challenge:

Write a program that will let the user enter an integer between 1-100. Then, print your number to be shown in the console. If the user entered a number below 1 or above 100, print a statement saying, "Sorry, you chose an invalid number."

Link to Java Course Playlist to find Video:

https://www.youtube.com/playlistlist=PLSyvWK7ZayjrAk1lziNF582qICOip8lPx

Coding Challenge #3: SwitchCase

Challenge:

Write a program that will incorporate Scanner method for an integer as user input. Then, make a switch case for days of the week. (Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday). Assign a case for each day. Then, depending on the number the user entered, it will show which day it is. 

Link to Java Course Playlist to find Video:

https://www.youtube.com/playlistlist=PLSyvWK7ZayjrAk1lziNF582qICOip8lPx

Coding Challenge #4: Math Operators

Challenge: 

Write a program that will incorporate Scanner method for an integer as user input. Then, ask the user to enter 2 numbers. After, ask the user if he/she wants to add, subtract, multiply, or divide. If the user chooses divide, then ask if they want a remainder. Based on the path the user wants, print the final answer. If the user wants to divide and it is not even, print the final answer plus the remainder. 

Link to Java Course Playlist to find Video:

https://www.youtube.com/playlistlist=PLSyvWK7ZayjrAk1lziNF582qICOip8lPx

Coding Challenge #5: If/Else Conditions

Write a Java program that will find the number of days in a month:

  • hint: use && for "and" and || for "or"

  • you can create a variable that already has a month and go from there (ex: String month = "May")

  • OR you can make this slightly more difficult by incorporating Scanner

  • use If/else statements to find the number of days, and then print the number of days

Link to Java Course Playlist to find Video:

https://www.youtube.com/playlistlist=PLSyvWK7ZayjrAk1lziNF582qICOip8lPx

Coding Challenge #6: For/While Loops

Challenge:

Create a For Loop that will print out all odd numbers from 1-100.

Link to Java Course Playlist to find Video:

https://www.youtube.com/playlistlist=PLSyvWK7ZayjrAk1lziNF582qICOip8lPx

Coding Challenge #7: For/While Loops

Challenge: 

Make a program that takes in 10 words (use Scanner class for user input). If a word starts with a vowel, add it to an ArrayList. After all 10 words are typed, you must print out all of the elements in the ArrayList.

Link to Java Course Playlist to find Video:

https://www.youtube.com/playlistlist=PLSyvWK7ZayjrAk1lziNF582qICOip8lPx

Coding Challenge #8: For/While Loops

Challenge: 

Make a bird-sighting program. This program should take an array of birds (represented by Strings) and compile a HashMap<String, Integer> (where the key is the bird and the value is the number of times it appears in the array). Then, get a bird (String) from the user (use Scanner class for user input). This 2nd part should print out the number of times the bird (String parameter) appeared in the array (this process should be done using the HashMap). If the bird wasn't in the array, print 'null'. The program should be case-sensitive, meaning that bluejay == BLUEJAY.

Link to Java Course Playlist to find Video:

https://www.youtube.com/playlistlist=PLSyvWK7ZayjrAk1lziNF582qICOip8lPx

Coding Challenge #9: For/While Loops

Challenge:

Make a method that will let the user enter several numbers. I would prefer 5 numbers between 1-100. Then, in the method, return the prime numbers the user entered and call the user-defined method in the main method of the file.

Link to Java Course Playlist to find Video:

https://www.youtube.com/playlistlist=PLSyvWK7ZayjrAk1lziNF582qICOip8lPx

Coding Challenge #10: For/While Loops

Challenge:

Make a Rock Paper Scissors Shoe game against the Computer. Using the Random Method, the computer will choose random numbers which you will assign to either "Rock", "Paper", "Scissor." Then, it will be your turn so you have to use the Scanner method which you will choose "Rock", "Paper", "Scissor.". After, print the winner between you and the CPU. 

Link to Java Course Playlist to find Video:

https://www.youtube.com/playlistlist=PLSyvWK7ZayjrAk1lziNF582qICOip8lPx

Coding Challenge #11: For/While Loops

Challenge: 

Make a method that takes in a name and checks a data structure (either ArrayList or HashMap. One is better for this task, but the choice is up to you) to see if the name is enrolled in a fitness program (is their name in the data structure?). If they are enrolled, print out "YES". Otherwise, print out "NO". Use this file to check your answers.

Link to Java Course Playlist to find Video:

https://www.youtube.com/playlistlist=PLSyvWK7ZayjrAk1lziNF582qICOip8lPx

Coding Challenge #12: For/While Loops

Challenge:

Have an Employee class with 5 parameters. I would suggest: id, name, email, age, gender. Then, write a person class that extends to the Employee class that inherits all those traits plus adds one more individual trait that other employees do not have. (Ex: Fun Fact is a unique trait to that person)

Link to Java Course Playlist to find Video:

https://www.youtube.com/playlistlist=PLSyvWK7ZayjrAk1lziNF582qICOip8lPx

Coding Challenge #13: For/While Loops

Challenge: Create a class of your choice that extends to an abstract class. After, create an instance of the new class. Create getters and setters, then return the new instance onto the console.

Look around on the API or online to see the various examples of abstraction

Link to Java Course Playlist to find Video:

https://www.youtube.com/playlistlist=PLSyvWK7ZayjrAk1lziNF582qICOip8lPx

Coding Challenge #14: For/While Loops

Challenge: 

Make a Program that will use an example similar to the "Flight example in the video," such as "Animal Sounds" or "Sport Strength" as your example. Then, use what you learned and reuse the method differently for each child class.

Link to Java Course Playlist to find Video:

https://www.youtube.com/playlistlist=PLSyvWK7ZayjrAk1lziNF582qICOip8lPx

Coding Challenge #15: For/While Loops

Challenge:

Make a program that will use JFrame or JPanel with JComponent. Then, create a rectangle with any parameters you would like to which will create the door borders. After, create a circle inside of the rectangle and this will act as a "doorknob." 

Additional: Add a window with 4 squares inside the rectangle right next to each other. (Like a 2x2)

Link to Java Course Playlist to find Video:

https://www.youtube.com/playlistlist=PLSyvWK7ZayjrAk1lziNF582qICOip8lPx

Coding Challenge #16: For/While Loops

Challenge: 

Using Java FX, create your own rectangle with any size you want but make sure to lock it so it cannot be adjusted. Then, add a button of your choice which is clickable and try styling it with some CSS such as the font, color, and text-alignment.

Link to Java Course Playlist to find Video:

https://www.youtube.com/playlistlist=PLSyvWK7ZayjrAk1lziNF582qICOip8lPx

Contact Us

Thanks for submitting!

Chester Springs, PA

​

Email: SAPPCoding@gmail.com

​

© 2020 by SAPP. Proudly created with Wix.com

bottom of page