Because UltimateBudgie requested them, and i think it will be good experience for anyone who wants to code (even for me because some of these are straight outta the course book so i get to do them too! Obviously we didn't do every single project lol)
Have at it. I'll add more later if people so wish. You may use any language you want, but just know these are from my college courses. Java and C++ respectively.
Put your code as a reply and have others check for correctness, or ask questions how to do these.
Java Projects
C++ Projects
Again remember, some of these even i never did in my courses. So i am doing them right along-side you guy's!
Have fun!
Have at it. I'll add more later if people so wish. You may use any language you want, but just know these are from my college courses. Java and C++ respectively.
Put your code as a reply and have others check for correctness, or ask questions how to do these.
Java Projects
Project 1 Test Scores and Grades
Project 2 Dice Game
Project 3 File Encryption Filter
Project 4 Basic GUI
Project 5 Stopwatch Applet
Write a program that has variables to hold three test scores. The program should ask the user to enter three test scores and then assign the values entered to the variables. The program should display the average of the test scores and the letter grade that is assigned for the test scores and average. Use the grading scheme in the following table;
90-100 = A
80-89 = B
70-79 = C
60-69 = D
below 60 = F
90-100 = A
80-89 = B
70-79 = C
60-69 = D
below 60 = F
Project 2 Dice Game
Write a program that plays a simple dice game between the user and computer. When the program runs, a loop should repeat 10 times. Each iteration of the loop should do the following;
- Generate a random integer in the range of 1 to 6. This is the value of the computer's dice.
- Generate another random integer in the range of 1 to 6. This is the value of the user's dice.
- The die with the highest value wins. In case of tie, there is no winner for that particular roll.
Project 3 File Encryption Filter
Write a program that reads the contents of one file, modifying the data into a code of your choice, and then write the coded contents out to a second file. The second file will be a version of the first file, just encrypted.
----------------------------------------
Write a program that decrypts the file produced by the previous program. The program should read the contents of the coded file, restore the data to its original state, and write it to a new file.
----------------------------------------
Write a program that decrypts the file produced by the previous program. The program should read the contents of the coded file, restore the data to its original state, and write it to a new file.
Project 4 Basic GUI
Joe's automotive performs the following maintenance services:
- Oil Change - $26
- Lube Job - $18
- Radiator Flush - $30
- Transmission flush - $80
- inspection - $15
- muffler replacement - $100
- tire rotation - $20
Project 5 Stopwatch Applet
Write an applet that simulates a stopwatch. It should have a start and a stop button. When the start button is clicked, the applet should count the seconds that pass. When the stop button is clicked the applet should stop counting seconds.
C++ Projects
Project 1 Temperature Conversion.
Project 2 Savings Account Balance
Project 3 Pig Latin (I saw the thread for this, and it was in the projects for the book lol)
Project 4 Employee Class
Project 5 Recursion
Write a program that converts Celsius temperatures to Fahrenheit, Fahrenheit to Celsius, and Celsius to Kelvin.
The program should ask the user for which conversion they wish to use
and ask them to enter the appropriate temperature.
The conversion formulas are as follows;
F = (9/5)C + 32
C = (F - 32) * (5/9)
K = C + 273.15
The program should ask the user for which conversion they wish to use
and ask them to enter the appropriate temperature.
The conversion formulas are as follows;
F = (9/5)C + 32
C = (F - 32) * (5/9)
K = C + 273.15
Project 2 Savings Account Balance
Write a program that calculates the balance of a savings account at the end of a period of time. It should ask the user for the annual interest rate, the starting balance, and the number of months that have passed since the account was established. A loop should then iterate once for every month performing the following;
- Ask the user for amount deposited into account for that month. (Do not accept negative numbers.)
- Ask the user for amount withdrawn from account for that month. (Do not accept negative numbers.)
- Calculate monthly interest. This interest is the annual interest rate divided by twelve. Multiply the monthly interest rate by the balance and add result to the balance.
Project 3 Pig Latin (I saw the thread for this, and it was in the projects for the book lol)
Write a program that reads a sentence as input and converts each word to "Pig Latin." To do this, you remove the first letter and place that letter at the end of the word. You then append the string "ay" to the word. Example:
ENGLISH: I slept most of the night.
PIG LATIN: Iay leptsay ostmay foay hetay ightnay
ENGLISH: I slept most of the night.
PIG LATIN: Iay leptsay ostmay foay hetay ightnay
Project 4 Employee Class
Write a class named "Employee" that has the following member variables;
- name. A string to hold the employees name
- idNumber. An int variable that holds the employee's ID number
- department. A string to hold the department of where the employee works
- position. A string to hold the employees job title
Project 5 Recursion
In math, "n!" represents the factorial of a number. Write a program that uses a Recursion algorithm to calculate the factorial of a number. The factorial of a non-negative number can be defined by the following rules;
If n = 0 then n! = 1
If n > 0 then n! = 1 x 2 x 3 x 4 x ........ x n
If n = 0 then n! = 1
If n > 0 then n! = 1 x 2 x 3 x 4 x ........ x n
Again remember, some of these even i never did in my courses. So i am doing them right along-side you guy's!
Have fun!