Programming Projects

TubaRiver

Masterful
Donor
Joined
Aug 6, 2011
Messages
278
Reaction score
317
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
Project 1 Test Scores and Grades
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

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.
As the loop iterates, the program should keep a count of the number wins/losses/ties for both the computer and user. After the loop performs all of its iterations, the program should display who was the grand winner, and the scores.

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.

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
Joe also performs other special services and charges for parts and for labor. ($20 per hour) Create a GUI application that displays the total for a customer's visit to Joe's.

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.
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

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.
After the last Iteration, the program should write the ending balance, the total amount of deposits, the total amount of withdrawals, and the total interest earned to a file.

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

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
Write appropriate mutator functions that store values in these member variables and accessor functions that return the values in these member functions. Once you have written the class, write a separate program that creates 3 Employee objects to hold data. Then display the data for each Employee Object.

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

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!
 

TubaRiver

Masterful
Donor
Joined
Aug 6, 2011
Messages
278
Reaction score
317
When I saw the word projects, I thought this would be more interesting. These are assignments, and simple ones too. :( :(

Cheaty, these are college projects. Yes, you can see them as assignments too. However, the 'projects' you are talking about involve the same skills these assignments require. Complete them all, and theoretically you have all the basics down, and you can start your own large projects.Which of course would take large sums of time, weeks possibly months of work. Which then, turns into an actual product (assuming its good enough) Most people, when doing large projects as those would only want close friends involved anyways, for reasons which are obvious.

These "projects" are for those just wanting to test their skills, and again, once you know you can thoroughly completed all these, theoretically you have the basics down and could actually start a larger project.
 

cheatyface

Member
Joined
Jan 20, 2012
Messages
598
Reaction score
508
When I saw the word projects, I thought this would be more interesting. These are assignments, and simple ones too. :( :(

Cheaty, these are college projects. Yes, you can see them as assignments too. However, the 'projects' you are talking about involve the same skills these assignments require. Complete them all, and theoretically you have all the basics down, and you can start your own large projects.Which of course would take large sums of time, weeks possibly months of work. Which then, turns into an actual product (assuming its good enough) Most people, when doing large projects as those would only want close friends involved anyways, for reasons which are obvious.

These "projects" are for those just wanting to test their skills, and again, once you know you can thoroughly completed all these, theoretically you have the basics down and could actually start a larger project.
I guess we have different definitions of the word project. My college would call all of these assignments, and the larger more product like programs would be projects (though they don't necessarily take huge amounts of time, they're just more than a small exercise of concept).

I did just read (and post in) the other thread related to this though, so I understand the point now. Don't worry about my frowns.
 
Top