Question: Write a program that prompts the user to enter a letter and check whether the letter is a vowel or consonant. Must display any input with non-letter characters. This is based on a question from Java textbook by Dr. Daniel Liang.
Tic Tac Toe game in Java
This is an example of using nested while loops, char arrays and if statements. Please note this is based on tutorial by Alex Lee. However, a modification was made to the code to remove a bug. The original code by the author would allow the player to place the position on top of the CPU position. Please subscribe to Alex’s YouTube channel and support him.
Java Financial Application: calculate future investment value
Question: Write a program that reads in investment amount, annual interest rate, and number of years, and displays the future investment value using the following formula:
futureInvestmentValue = investmentAmount * (1 + monthlyInterestRate)^(numberOfYears * 12)
Continue reading Java Financial Application: calculate future investment value
‘javac’ is not recognized as an internal or external command
The ‘javac’ is not recognized as an internal or external command, operable program or batch file is a very common error when you first install Java JDK on Windows machines. Here is how you can fix it.
Continue reading ‘javac’ is not recognized as an internal or external command
Projecting Population in Java
Question: Based on the following assumptions, write a program to display the population for each of the next five years. Assume the current population is 312,032,486 and one year has 365 days.
The U.S. Census Bureau projects population based on the following assumptions:
Continue reading Projecting Population in Java