Loading...

Workshop Overview

During the course of this workshop, Ekam Singh (Head of App Dev) will guide you through the basics of programming with Java.

On Day 1 we will be explaining what programming is about, with the inclusion of some pseudocode examples. We will explain variables and different data types, and show how they are used in programming. We will also look at different operations and operators used in programming, such as arithmetic and logical operators. Then we will look at some programming constructs including loops and conditionals, and input and output. Finally, we will end the day by showing how to install and set up Java 17 and IntelliJ IDEA, and we will teach some basic terminal commands that will be necessary for the rest of the workshop.


On Day 2, we will begin with our first programs in Java, featuring some basic input and output. We will then look at the possible data types in java, and show how to assign values to variables. We will also look at loops and conditions in java, and how operators are used. Afterwards, we will jump into 1D and 2D arrays in java, and we will learn how they store information, and how they can be used. We will end the day by discussing some important string functions.


Day 3 will be the final day of the learning phase, and during this day we will look at how to make our code modular with the help of functions. We will revise what functions do, and how values and parameters can be passed to or returned by a function. We will end the learning phase by looking at objects and discuss the basics of OOP - Object-Oriented Programming.


On Day 4, the challenge problem for the workshop will be released, after a one hour (optional) doubt-clearance session. For the next two days, the participants will be solving the challenge problem, and the submissions for the problem will open on day 5. The 10 best submissions(graded according to the criteria below) will get certificates of excellence!




Hangman!!

Requirements:

  • There should be a predefined array of words from which a word will randomly be chosen when the game starts. You can decide what all words to include in that list.
  • Every time, before you ask for the user to guess (input) a letter (character), you should display underscores to show letters that have not been guessed yet.
  • You should also show the number of remaining lives(start with 6 lives, lose one life with each incorrect guess)
  • If the inputted character is in the word, then the user's remaining lives shouldn't reduce, and the appropriate underscores should be replaced by the correctly guessed letter.
  • If the inputted character is not in the word, then the user's remaining lives should reduce by 1, and none of the underscores should be replaced.
  • There should be a check to ensure that the entered character is a letter and not a digit or a special character. If the user inputs any one of them, then he/she should be prompted again to input a valid character.
  • The game should end when the user correctly guesses the word or when the user's remaining lives becomes zero. The final message can thus either be “You Won!!” or “You Lost...better luck next time”.

Code requirements:

  • Must have at least 1 function of your own
  • Must use at least 1 loop(while or for) and 1 conditional
  • Must tell what is going on(ask for input, tell that a life was lost etc.)


Don't understand? Look at one of the demo videos on the discord server! If you haven't joined it yet, join it now!


-----FOR BONUS CHALLENGE ONLY-----

Hangman 2.0

Requirements:

  • Store all of the previous guesses the user has made, and inform the user if he/she guesses the same letter twice. Don't penalize for guessing the same letter twice; instead, the user should be prompted to enter a different letter.
  • Draw a the hangman before every prompting the user to input a character alongside the word to guess and the remaining lives
  • Add body parts to the hangman drawing(head first, then one hand, then other hand, then body, then one leg and lastly other leg) each time an incorrect guess is input
  • After the game is over, ask the user if he/she wants to play again. If the response is yes, then reset the game (randomly pick a new word from the list of words. Make sure that the new word chosen isn't the same as the previous word) and start the game. If the response is no, then end the program.

Don't understand? Look at one of the demo videos on the discord server! If you haven't joined it yet, join it now!




All timings in SGT
  • 23rd March (Wednesday): Day 1 - 3:00 to 5:30 pm teaching
  • 24th March (Thursday): Day 2 - 3:00 to 5:30 pm teaching
  • 25th March (Friday): Day 3 - 3:00 to 5:30 pm teaching
  • 26th March (Saturday): Day 4 - 1:30 to 2:30 pm doubt clearance
  • 26th March (Saturday): Day 4 - 3:00 pm challenge problem released
  • 27th March (Sunday): Day 5 - 6:00 pm submissions opened
  • 28th March (Monday): 12:00 pm deadline for submissions


Grading criteria for submissions

Validity of submission

Validity of submission

The code must be submitted in the right category(of course) and before the deadline. The code must also perform all the required functions as specified in the problem statements.

Code efficiency

Code efficiency

We will not be recording the runtime of codes, but we will be looking at how well the code has been structured. Keep unnecessary code statements to a minimum to attain high efficiency.

Code readability

Code readability

We will look at how readable your code is, including variable names and structure of conditions/loop/functions. Modular code is recommended, but does not guarantee good code readability. Comments can improve code readability by allowing us to understand what certain blocks of code do.

User-friendliness

User-friendliness

While we don't expect you to create a GUI to display stylised text or images, we do expect that the user is aware of what is going on in the program. Any changes that affect the user's input or stored data must be printed out and the user needs to be informed.

Ekam Singh

Head of App Dev


choke

Chokalingam Chinnagopal

Workshop sponsor

Choke it like Chokalingam