![]() |
||
Java Fall 2000:My first programming class in approximately 10 years. Things had chanced a lot. Previously I was had taken Fortran and Pascal, in addition I had worked some with Quick Basic at work. Fortunately I was taking C concurrently. (The instructor made it point not to check prerequisites BUT please do not ask questions in class that you should have learned by taking the prerequisites!)The whole concept of object oriented programming was completely new. The first 2 programs were written much like a C+ program would be written (or so I imagine). The last 3 programs were applets A whole new concept for me. During this course I really learned to appreciate Java for its structure as well as its complexity. I also resolved to take some HTML classes! (I should have started with the basics BUT with MUCH hard work I was able to learn Java)Generate Lottoe Tickets (source code): My first Java project was so write a program in java that would generate a series of Lotto Tickets. My first attempt I wrote the whole program in three nested loops. Not very easy to debug. With some pointers I rewrote the program with well defined steps.Is it a Pallendrum?(Source Code) The next program we were requiered to write was a program that would take a series of words and check to see if they were a pallendrum, like bob spelled backwards was still bob. We were to have the program ignore all non-alphabetical characters as well as treat capatals and lower case letters the same. Draw a Man: For the third program we got into making applets. We were to make an aplett that would draw a man!Man Source Code: Show
Color: Our next applet was to make a collor picker. The collor was
to appear some where on the screen. In addtion we had to display the decimal,
octal, and hexadecimal value of the collor. To do this we had to draw
some areas to fill with color. We also had to handle events generated
when the user clicked a button. Show Color
Source Code: Play
Master Mind: Our final project was to creat the game master mind,
with a twist. We were to use colors NOT numbers. The game was to include
botht the simple version where you were supposed to guess what 5 out of
10 collors were selected. In the more advanced version you were supposed
to guess the posstion as well as the color. In order to compete thsi project
it was necessary to not only draw areas and respond to events, but to
creat elements(colors) as well. Master Mind Source
Code:
|
||
![]() |
![]() |