tJavaModule02fall25a
Work through Chapters 2, 3, and 4 in the textbook. Watch all the videos in this module.
For additional study material, visit these sites:
https://www.w3schools.com/java/java_user_input.asp
https://www.w3schools.com/java/java_variables.asp
https://www.w3schools.com/java/java_strings_numbers.asp
https://www.w3schools.com/java/java_methods.asp
Code up these three programs (details are in the GitHub Classroom Readme file) and submit your source code (FunWithMethods.java, LargestOfThree.java, and ReversedStrings.java) to your remote repo in GitHub Classroom.
-
ReversedStrings.java - You will create a simple program that takes a user's input string and reverses it. For example, if the user inputs "hello", the program will output "olleh".
-
MaddnessWithMethods.java - You will explore the use of functions in C++. You will create a program that involves three distinct functions: getAnIntFromTheUser, compareTwoInts, and sumTwoInts. The program will demonstrate how functions can be used to break down a problem into smaller, manageable parts.
-
LargestOfThree.java - This program, titled "LargestOfThree.java" is designed to help you understand conditional statements in Java. Your task is to write a program that asks the user for three integers, determines the largest among them using nested if statements, and outputs the largest integer. Enhance this program from the one you wrote in Module01 by adding more information to the final output statement. For example: " You enter the value of 97 for num2 and that was the largest of three integers!"