Homework 12: Writing Methods (Extra Credit)
Objective: To write a program that uses several different kinds of methods and an array.
For this assignment, we're going to try something new. Instead of telling you exactly how your program should work, I'm giving you an open-ended assignment. You dedide what you want your program to do. It just has to follow these rules:
- Your program must have at least 3 methods in addition to main.
- Your program must have at least 1 array that you declare and use.
- All variables must be declared inside methods (no static class-level variables).
- At least 2 of the methods must have parameters which are needed and used correctly.
- At least 1 method must return a value.
- At least 1 method must not return a value (declared using "void").
- Each method should have a comment next to it, briefly explaining what it does.
- Your will get full credit for this assignment if you follow all of these rules, and your program works correctly,
doing whatever it says it will do.
If you want some ideas to help you come up with a program to write, you can look at the Programming Projects
at the end of Chapter 5, 6, or any chapter. I encourage you to start with something simple, and add more to it after the simple stuff works. Don't start with a huge, complicated idea.
Remember you're required to present a program in class one time this semester. To present this one, e-mail me your solution at cpersiko@ccsf.edu and I'll let you know if you're selected to present. Even if your program doesn't work correctly, you can present it and get feedback from your classmates. For this assignment, since everyone has a different program, we can have more than one person present their solutions.
This program is worth 50 points extra credit (Adds up to 5 percentage points to your overall semester grade)
Return to CS 111A page