Question:
How to create a program?
Juan
2012-06-19 19:13:48 UTC
i need help doing one of these projects.any help would be greatly appreciated.

Your programs must include the following key features:

Comment block at the top with key information
Single and multi-line comments
Basic program fundamentals
User-defined exception handling (i.e. anticipate user errors)
Instructions that print for user’s understanding of program
Choose two of the four programs below:

Option 1
Write a program to find the average grade given 15 user-inputted scores on tests. The program should also provide the following feedback according to the final score (i.e. A, B, C, D, F).

Option 2
Write a program that would resemble a checkbook register that will ask for input, both deposits and debits, and keep a running total in that person’s bank account. That total would be given upon request of the user.

Option 3
Write a program to run two separate threads printing numbers (or words) in ascending and descending orders. The numbers (or words) should be given by the user.

Option 4
Write a program that has a function to give someone their age if they input their date of birth. Along with their age, the user should receive some trivia about the decade they were born.

Any help woudl really make adifference. Thank you so much
Four answers:
Joshua
2012-06-19 19:19:10 UTC
Microsoft Visual Basic Express 2010 is a free program that's pretty useful and might help you out. It uses Visual Basic script, designed by Microsoft



The thing about it is that it's not all coding, there's a user-friendly way of making elements on the program. You would definitely have to practice the coding, it might take a while but could be worth it as it's free. There are plenty of tutorials on YouTube that will definitely help you out.
Julse
2012-06-20 02:44:31 UTC
There are plenty of ways to do what you are asking for. Can it be done in any programming language? How much experience do you have? What operating system do you have on your computer?



I would personally write the code in C using the linux OS I have installed on my computer. First come up with a plan of how you want to solve the problem, for example, the first one will take 15 inputs, add them together and then divide by 15. Then you can use if statements to figure out the letter grade. If you tell me what programming language you plan to use, I can give you a head start on how to solve the problem.



Also, google is your best friend when it comes to programming. For example, when programming in matlab, C, or any language you can think of, search "how to read user input in C" or "how to print to screen in C" or "how to use for loops in C" this has helped me so many times. This is probably what I would do to help you figure out how to sort the numbers or words for your third problem.
2012-06-20 02:40:08 UTC
You didn't specify a language, so I can't get more specific than pseudo code, but here goes nothing. I'll do Option 1.



/*******Program start********/



declare array of decimals with a size of 15 named grades;



//getting input

for(i = 0; i < the size of grades; i++) {



display "Enter a grade: "

get input and store it in grades at index i;



}



//now to find the average



declare variables for the total and the average and initialize them to 0;



for(i = 0; i < size of grades; i++) {



total += element in grades at index i;



}



average = total / size of grades;



//determine letter grade

if(average > 100) {

display "Error. Average is too high";

quit program;

} else if(average >= 90) {

display "Grade is an A";

} else if(average >= 80) {

display "Grade is a B";

} else if(average >= 70) {

display "Grade is a C";

} else if(average >= 60) {

display "Grade is a D";

} else if(average >= 50) {

display "Grade is an E";

} else {

display "Grade is an F";

}



/*******Program end********/





I hope this makes some amount of sense. I realize it's not very coherent, but then again, it's pseudo code, so that's to be expected. I hope this helps. Feel free to email me at thefoxandflea@gmail.com if you need some more help. If it's a language I know, I'll be glad to assist you.
James Bond
2012-06-20 02:45:33 UTC
Always show your side efforts first and then ask for help


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...