1-21-08
Exam
Archive any files you will need in the future.
Robotics team after school starting next week
We could use some people familiar with C/C++
Courses for next year:
Principles of Technology
Full year engineering - Level one
Robotics
Build Repair
Intro to programming - c++
Intro to programming - Java
Web Design
AP Comp Science
come by after school if you have a project you would like to work on.
1-17-08
Handback of graded work.
Debug the Battleship code
DotCom.java, DotComBust.java, GameHelper.java are the three files you need.
If you have renamed any files, you will need to chase down any references in the code.
Typography errors cause problems.
Missing return; statements will cause problems.
jcreator is in the start menu, it may be a good way to do the debugging.
For the exam, you should use your tests and the study notes provided.
http://dhsjava.pbwiki.com/f/arrays.doc
http://dhsjava.pbwiki.com/f/ClassesAndObjects.doc
Methods that require a single argument
http://dhsjava.pbwiki.com/f/CreatingMethodswithNoArguments.doc
http://dhsjava.pbwiki.com/f/java-Arithmetic.doc
http://dhsjava.pbwiki.com/f/JavaDataNotes-variables.doc
http://dhsjava.pbwiki.com/f/BeginningJavaNotes.doc
1-15-08
Battleship code
What can we do to customize the code?
1-11-08
Battleship code
Math.Random() http://java.sun.com/j2se/1.4.2/docs/api/java/util/Random.html
GameHelper class make it and hand it in, with the SimpleBattleship.java code.
Integer.parseIn() http://java.sun.com/j2se/1.3/docs/api/java/lang/Integer.html
this will allow you to cast a String input as an Int.
bug in the code - three hits on any location will sink your ship.
You need to make it so that the hits are 'retired' from the array.
ArrayList http://java.sun.com/j2se/1.4.2/docs/api/java/util/ArrayList.html
Update your SimpleBattleShip.java code and hand it in this period.
New and Improved BattleShip class
What are the classes?
What do the classes need to do?
Prep Code for the real BattleShip class
What does each class need in its code?
make three (minimum) targets. You can also have them be different sizes.
Work on a rewrite of the BattleShip class, based upon the prep code.
Got it? hand it in. Don't work on it during class.
1-9-08
"Battleship" code
Create test code for SimpleDotCom class
create SimpleDotCom class
Use arrays for creating the location of the ship.
use a for loop for the guess process
use if to count hits and misses
today we will create one row of the grid, but ultimately, we will create the whole virtual grid.
Check out the documentation for java at http://java.sun.com/j2se/1.5.0/docs/api/
1-8-08
Arrays of objects
Check out the documentation from Head First Java on Object arrays
Instantiate an array of Dog objects
Call the methods of your dog class by using your array.
1-7-08
Botball
There will be a meeting on today to start planning for the Botball robotics team competition this spring. Monday at 2pm in Mrs. Lewis' room.
Ap Comp Sci applications, due to Mrs. Lewis by January 28
Arrays - arrays.doc
Here is the documentation on Arrays - http://java.sun.com/javase/6/docs/api/java/lang/reflect/Array.html
Here is the documentation on all of the java api - http://java.sun.com/javase/6/docs/api/
Create a program that will allow the user to choose the number of players in the game. Create an array that allows them to choose up to four players.
1-5-08
Hand back of Objects and Classes
Guess Game
Botball
There will be a meeting on Monday to start planning for the Botball robotics team competition this spring. 2pm in Mrs. Lewis' room.
AP Computer Science applications -
They are due to Mrs. Lewis by January 28
Include this week in next weeks
1-3-08
Notepad++ http://notepad-plus.sourceforge.net/uk/site.htm
This looks like a good source for sample codes - http://www.java2s.com/
AP Computer Science applications -
Get 'em while they're hot!
They are due to Mrs. Lewis by January 28
12-21-07
Due at start of class
Java, C++, Scratch or Kung Pow
Have a nice vacation!
Java SDK (Software Developer's Kit) download
http://java.sun.com/javase/downloads/index.jsp
12-19-07
Test on objects and classes - ClassesAndObjects.doc
programming activity:
Create a class called VideoGameStore that lists 3 items for sale at a video game store.
Declare a price for each item as a double. Use methods to get and set the prices of each item.
Create another class VideoGameOrder that has the following in the main()
● instantiates an object
● calls the methods in the first
● Uses arguments to send the prices of each item.
● to make up an order
● lists the items and total the sale
Use the Code Formatting technique we are using in class. You can put a line between the two pieces of code, or you can put one on each side of the piece of paper.
Show the results that would come from running the program.
Homework:
download and install the Java SDK - Software Developers Kit
Here is a link - http://java.sun.com/javase/downloads/index.jsp
This is the one you will need - JDK 6 Update 3 with Java EE 5 SDK Update 3
You should also try out TextPad - http://www.textpad.com/download/#downloads
There are other developing environments you can use. Test them out and let us know.
Due next class
12-18-07
Test on Classes next class.
When you have the code done, hand it in and study for the test.
Due Friday
12-17-07
Instantiation
Get and Set methods
organizing your classes
Notes for this set of projects, This file will change as the project progresses ClassesAndObjects.doc
here is a sample: SetUpSite.java and EventSite.java
Programming activitity:
Create a class named Pizza.
Data fields include:
String for each of the toppings ("pepperoni", "mushroom", "extra cheese", etc)
an integer for diameter in inches
a double for the price
Include methods to get and set values for each of these fields.
Create a class named TestPizza that instantiates one Pizza objects and demonstrates the use of the Pizza set and get methods. The output should show what ingredients the pizza has on it.
12-12-07
methods Test
Classes Pretest
Intro to classes
Notes for this set of projects, This file will change as the project progresses ClassesAndObjects.doc
12-10-07
Handback of Methods test
Code the program in the test?
Classes and Objects pretest
Intro to classes -
Notes for this set of projects, This file will change as the project progresses ClassesAndObjects.doc
Programming Activity
12-7-07
Hand back of Methods that return values
WeeklyUpdate Due
Questions on Methods material
Methods post test
If you finish early, read or sit quietly.
After the test, you can work in Java, C++ or Scratch.
We have a loaner Scratch Board from the South End Technology Center
Scratch Boards - http://scratch.mit.edu/pages/scratchboard
SETC - http://fab.cba.mit.edu/labs/setc/
We will be able to get some more from the MIT Media Lab soon.
12-6-07
Methods that return values
Due Dates
WeeklyUpdate due next class(friday)
Test on Methods next class(friday)
Extra credit - WowWee class on programming the Robosapien Media in java - link
Programming activity:
Create a program called MyAges.java
initialize these variables:
your birthYear
your hsGraduation (your scheduled graduation year)
your collegeGraduation (pick a graduation year that you would like)
Use methods and method calls to do the following:
display myName (no argument)
display myAddress (no argument) use one System.out.println statement with new line and tab escapes to show your address below the prompt and over a bit.
display your age in years (birthYear)
Have the myAge method return your age in years
Have the tilhsGrad method return years to high school graduation
Have the tilCollegeGrad return years to college graduation
-12-4-07
hand back of pretest and
CodeFormatting review
mySalary
Methods
Programming activity
Use CodeFormatting on your code.
Make a program called MySalary2.java
Change the variable for your salary to $350
Add a variable for promisedRate of 10%
use methods to:
display your name
Display your address. (Use \n escapes to break the information for street, town state and zip like on an envelope.)
Display your raw salary
Calculate your salary with a raise
use the method calls to display the old salary, new salary and rate of increase.
Make a multiple argument call on at least one method.
12-3-07
CodeFormatting - Please use this format for your code
Methods with Single Arguments - Creating Methods that Require a Single Argument-1.doc
Programming activity
Use the CodeFormatting directions
Write a program MySalary.java with calls to methods that use arguments and don't use arguments.
Include:
11-29-07
Eggs
Modify your Eggs code
Rename the file and class as Eggs3
You will be adding a bunch of methods.
Compile the code after making each method to see that it works.
Fix any errors and make it work.
If you still can't make a part work, comment it out and keep going.
Come back to it when you have some other parts working.
use an EscapeSequence to separate the output of each method
Price per dozen is $2
Price per single egg is $.25
Change the quantity of eggs in the transaction to 135
Add a method to calculate and display the price per dozen and per egg
Add a method to calculate and display the unit price (how much per egg in the dozen.
Add a method to display your name
Add a method to display your business address, formatted like the return address on an envelope.
Add a method to display your web address, yournameeggs.com
Add a method to display your email address, you@yournameeggs.com
Add a method to display your business philosophy.
Call the methods from the main.
Change the order of the method calls so they make sense to the reader.
Comment your name into the top of the code.
Comment your results into the bottom of the code.
Hand in your code before the end of the period.
11-28-07
Methods - CreatingMethodswithNoArguments.doc
Programming activities
Rename the Eggs.java code from yesterday as Eggs2.java.
Change the class to Eggs2
Rewrite the eggs program from yesterday using methods.
Use the value of 173 eggs
Use a method called packagingEggs to do the calculations
Check out EscapeSequence - Use at least one in your print dialog.
create another method for calculating the price of the eggs with a discount for over 5 dozen purchased. $2 1-5 and $1 for more than 5
comment your name into the top of the code, and your results into the bottom.
Create a class called Friends and use a nameAndAddress() method in the program to print out a friend’s name and address from this class.
Create a second class called Classmates and call the nameAndAddress() method from the Friends class.
11-27-07
Handback of Variables test
Pretest on Methods, Classes and Objects
Programming activity
Create a class named Eggs. Its main() method holds an integer vaiable named numberOfEggs to which you will assign a value. Create a method to which you pass numberOfEggs.
The method displays the eggs in dozens; for example, 50 eggs is 4 full dozen with two left over.
Save the program as Eggs.java.
Comment your name into the top of the code.
Comment your results into the bottom of the code.
Print your code and hand it in.
11-21-07
Java
If you haven't handed in either of the MakeChange, you should be working in those.
C++
Scratch
11-20-07
Hand back of MakeChange2
Variables Test
Take test silently
When done, you can program in either C++, Java or Scratch
This week will be included in next week's WeeklyUpdate
Have it ready to go at the start of the last class of next week.
11-16-07
Hand back of MakeChange from yesterday
What datatypes work for each variable?
What are some techniques to get to the change?
Finish the code from MakeChange
Agree on a new amount
Get the change portion of the code to work
You can use the same flowchart from yesterday if it works
Include the math on your flowchart
Post test Variables
Tuesday by class agreement
similar to pretest
11-15-07
Hand back of programs from yesterday
Programming exercises:
MakeChange.java
Hand in:
Your code with the results commented in after running it.
Your handwritten flowchart
Staple them together before the end of the period.
Due Tomorrow at start of class
11-14-07
Questions on Variables
Hand back of Friday's programs
Programming challenges for today
FahrenheittoCelcius
Show the code working
Make a copy of your code. Name the file FtoCInput.java
Add input to the code to allow user to get a calculation. Use today's temperature for at least one test of the file.
Automobile data
In Mr. Connors' car there is a book for keeping track of gas expenses. Use a line of data in the book to create output showing the miles per gallon, cost per mile, and at least one other result of your choice. Call the file Rav4Data.java Show me the result, Print your code.
Here is a link to the data sheet on the car - link
use the entry for 10-14-07
10-14
91353 miles on odometer
283.8 miles travelled
13.4 gallons
$36.17 cost
$2.69 per gallon
11-9-07
Go over math portion of Variables Challenge
Hand back of yesterday's Programming activity
Arithmetic in Java
http://dhsjava.pbwiki.com/f/java-Arithmetic.doc
Programming activities
Do both.
Hand them in before the period ends.
Staple your two codes together.
InitialsVariables
FahrenheitToCentegrade
11-8-07
go over Variables Challenge
We will not review the entire challenge, so hold onto it for future review and reference. This challenge will be important for studying for the next and future tests.
Java Variables JavaDataNotes-variables.doc
Programming activities
Write your code
Comment your name in,
Save and compile your code
Print and hand in your code
11-5-07
Return of last week's test
This week's challenge
Fix your errors
Make sure you understand what you missed
Hangman
What does each group have working?
What can be done with hangman?
What do we need more information on?
11-2-07
Test on this week's material
Work on Hangman Components
Next week is math and computation
11-1-07
Review for test on Friday
Finish all the activities from Tuesday
Work on Hangman
Use your Java Challenge document to study
If you would like a copy of the notes used for Tuesday, here is a link BeginningJavaNotes.doc
10-30-07
Java Notes
Process
Class
Methods
Statements
Arguments
println()method
System.out.println():
The Rules of Naming a Class
Readablity in code
Comments in code
Activities
When you are complete with the above, you should work in your groups on the HangMan project.
10-29-07
Java Test #1
This is an individual test
Do not use the internet to find the answers
Answer the questions to the best of your ability
Code the two programs one at a time, have Mr. Connors check it before going on
Print the code before moving on
When you are done with the test, return to the HangMan program
Hangman
Each group has a division of responsibilities
Each person's responsibilities should result in several .java codes
You will probably need to break up each problem into smaller, solveable problems.
Make incremental progress
10-25-07
Links
Here are some links that might be useful to look at:
This one is neat because it has a listing of all the methods it uses on the left tied to the line of code on the right. http://www.koders.com/java/fid676EEB0D4BCD75BA646A19E8D9E3C8B2AB48FB6A.aspx
These two hangman games seem to use the same code. They have different pictures and use different word lists.
http://www.ianktaylor.clara.net/hang.html
http://www.ianktaylor.clara.net/harrypotter.html
This one is creative commons, has some interesting approaches Where is the word list? - http://kickjava.com/src/hangman/Game.java.htm
Here is a java applet that hangs a penguin - http://www.owlnet.rice.edu/~hkl4487/applets/hangman.html
Here is one that has an example and the code
game, might not load - http://www.homepages.uel.ac.uk/bas4982v/hangman.htm
code, lots of comments, probably more complicated than we can use. - http://www.homepages.uel.ac.uk/bas4982v/HmanSource.htm
This one uses the penguin one from above - http://javaboutique.internet.com/Hangman/
Due at the start of class
Next week you will do EndofTermUpdate
10-24-07
meet with the groups
identify areas of strength
use the flowchart we made yesterday to get a better understanding of the program.
Use the text list we made yesterday to get a better understanding of the program.
break the task into manageable parts
use notepad or another text editor to write the code.
Include comments in your code identifying who created the code.
Add info to your wiki showing what you do each day.
Group organization
Elect a leader for the group
assign tasks to each member
Make a written record of what each person's responsibilities will be.
write up the task assignments
As pieces of code come together, compile them and combine them.
OOP
Ultimately, we will need to do this as object oriented programming OOP
In OOP, each person will be responsible for a couple of classes, which will be used by a controlling class.
have somebody in the group look into OOP and see how it fits in to the project.
Goals
By the end of the term we need to have
each group's versions of a working hangman program
The program should work initially as pieces of code, probably one piece that all functions
Each group needs to create a set of classes that can each handle the various parts
The classes are objects, which will make the program modular and easier to maintain.
Make the program the absolute best it can be for the amount of time we have to work on it.
10-23-07
Hangman and helpscreen
How does the program work?
What solutions to the problem did the group come up with?
Emphasis on programming and java
http://dhscompsci.pbwiki.com/FlowChartProgramming
Flowchart for decisionmaking
Flowchart for programming
Use the shapes in Open Office to make a flow chart of a process
Use the shapes in Open office to make a flow chart for a program we have done.
Save the picture on your wiki
10-18-07 and 10-19-07
Code the sample
In this code, there are several items added to the original HelpScreen code
It uses a do-while loop for user input, and handles the responses with a switch.
Do each section separately, make the code work.
create a hangman game using the code and concepts that we have used this term.
Maker Faire
Mr. Connors is in Austin at the Maker Faire - http://www.makerfaire.com/ Check out the website, see what is going on. Watch the Make Magazine blog - http://www.makezine.com/blog/ and see what is going on.
10-16-07
Code the sample
Make it work
Make it more winnable and entertaining.
Create interactivity with your user.
Add this idea to one of the other programs you have written, such as the PhraseOmatic code
10-14-07
Code the sample
Make it work
Make it recieve more than one charactar
Add this code to one of the programs we have already worked on
Create interactivity with your user.
When you have KeyBoardInput worked out, try HelpScreen
http://www.makezine.com/blog/archive/2007/10/the_future_is_maker_faire.html
10-12-07
Seniors
IF: get today's assignments done before you leave for senior breakfast
hand in today's assignment
ELSE: Do today's assignments for homework
hand the assignments in at start of next period
Due at start of period
Hand it in
Code the sample
Make it work
customize the code
Add an entry to your DailyLog about the code
Explain what the code is doing
What is new about this code?
Print a copy of your DailyLog from today to 9-27
Don't include entries before 9-27
Put three horizontal dashes above today's entry --- This will make a line
Use the line to keep track of when you last handed in the assignment
10-10-07
Code the Example
make it work
Customize the program/ make it better
Would you like to make a custom designed vinyl sticker?
These stickers can be used as signs, bumperstickers or as the stencil for
custom tshirts. The process is pretty quick and fun.
If this sounds interesting, come see Mr. Connors in Room 136 after school.
WeeklyUpdate - Due Friday for last week and this week.
10-9-07
Code the example
Make it work
How can you customize the program/make it better?
Would you like to make a custom designed vinyl sticker?
These stickers can be used as signs, bumperstickers or as the stencil for
custom tshirts. The process is pretty quick and fun.
If this sounds interesting, come see Mr. Connors in Room 136 after school.
WeeklyUpdate - Due Friday for last week and this week.
10-3-07
WeeklyUpdate - Next Week will include both weeks.
code the example
make it work
See how you can make it behave like the first Fizzbuzz
This uses Switch.
Here is some info on the Switch - http://www.leepoint.net/notes-java/flow/switch/switch-general.html
10-2-7
commenting out lines of code to see what they do
Change the phrases
Change the multiples
Change the display
Can we have it look for prime numbers?
Push the limits of this program
Share what you come up with with your classmates
Help each other through any blocks
Record your results on your DailyLog
Save your code to your wiki
10-1-07
Eat your dinner first
9-27-07
Kjell
kjell Jave 8 - http://chortle.ccsu.edu/CS151/Notes/chap08/ch08_1.html
8 programming exercises - http://chortle.ccsu.edu/CS151/Notes/chap08/progExercises08.html
code each of the programming exercises. Make them work, test the limits of the code.
Follow the notes around the programming exercises. check back with the chapter to get clarification.
When you have coded all the versions of the programming exercises and feel you understand the limits of the Primitive Data Types, feel free to move to Chapter 9. http://chortle.ccsu.edu/CS151/Notes/chap09/ch09_1.html
Maintain your daily log to show what you are doing, and to make note of any problems you have.
You should hand in your WeeklyUpdate.
9-26-07
KJell
kjell Jave 8 - http://chortle.ccsu.edu/CS151/Notes/chap08/ch08_1.html
8 programming exercises - http://chortle.ccsu.edu/CS151/Notes/chap08/progExercises08.html
code each of the programming exercises. Make them work, test the limits of the code.
Two command windows
You can use one command window for editing, and one for file access.
Make an entry for today at the top of your DailyLog
Keep track of your efforts in the DailyLog.
Explain what you have learned and problems you have in the DailyLog.
Save your files to your wiki as you work
You can save the classes as well as the .java code
This week you will need to do a WeeklyUpdate for Thursday at the start of class.
9-24-07
Kjell java 6 - http://chortle.ccsu.edu/CS151/Notes/chap06/ch06_1.html
Kjell java 7 - http://chortle.ccsu.edu/CS151/Notes/chap07/ch07_1.html
Kjell toc - http://chortle.ccsu.edu/CS151/cs151java.html
Programming environments - dos editor, notepad, word, What are the differences?
For now, you should be hand coding the programs in the dos editor.
Create a DailyLog
Use the DailyLog to keep track of the work that you do
Save copies of the code that you write and the classes you create
Make links from your DailyLog page to them
Make written notes of the things you discover as you do the day's work.
Keep track of questions and problems you encounter as you do the day's work.
9-21-07
kjell java - http://chortle.ccsu.edu/CS151/cs151java.html
Chapter 5 - http://chortle.ccsu.edu/CS151/Notes/chap05/ch05_1.html
Can we see what the bytecode looks like?
saving files on your wiki - accessing them from home/school
making a record of what you program
getting help
Create a Links** section on your FrontPage - Put a link to kjell, and any other java related tutorials you think might be useful.
9-19-07
Load java sdk
Kjell java
Steven's games
Steven's Links
9-17-07
Remembering Steve
Local organization looking fr some web design - intersted?
Engineering club meeting next Tuesday afternoon This year's focus will be on creating a Fab Lab with computer controlled tools.
9-17-07
Remembering Steve
9-13-07
Present topics to the group
Discussion of Java - What can it do? What are its differences from C++?
Plan out approach to remainder of the term
9-12-07
Hand back of research.
Present topics to the group
Discussion of Java - What can it do? What are its differences from C++?
Plan out approach to remainder of the term
9-11-07
Robotics/science club meeting this afternoon in room 234 with Mrs. Lewis
check the handback from last class
Respond to the notes on the handback in todays research/writing.
Gather more information
How does your topic relate to the needs of programmers in java?
You should have at least 5-10 links to valid information about your topic
You should have at least 5-10 paragraphs of your own writing about your topic.
Next class we will begin presenting to the group
9-7-07
Select topics, no more than two people can work on the same topic. People who are both working on the same topic need to collaborate and share information.
The purpose of this assignment is to gather a lot of information about java quickly. We will need to get this info together to be presented to the whole group.
9-6-07
Structure of course
Possible topic on Game Design
9-3-07
Intro to course
Intro to assignments
Welcome back from summer!