Wednesday, April 30, 2008

ICA-CP: 4/30/08

Good afternoon!

Your Myers-Briggs program with the menu and boolean addition is due today. On Friday, we will have an optional re-take of the Boolean Algebra quiz for those who wish to take it. Today, we are going over the Boolean Quiz I handed back last class.

So, your last programming assignment of the year is due the last regular day of class. For seniors, that date is Monday, May 12th. For juniors, it's Tuesday, May 20th. The assignment will be another, additional modification of your Myers-Briggs program. For your original program, a user entered a name and the program printed the Myers-Briggs for that person. In the 2nd version (the one due today), you added a menu where the user could choose to print a name, Myers-Briggs value, or both. However, the user still entered only a name. For the third version of the program, a user will be able to choose whether to enter a name or a Myers-Briggs value. If the user enters a name, the menu choices appear whether to print a name, Myers-Briggs value, or both for the user to select. If a user enters a Myers-Briggs value, the program prints the names of all those who match that value. This third version of the program is worth 50 points.

Monday, April 28, 2008

ICA-CP: Question of the Week

[If you are using this to make up missing blog entries, write 100 words for each day you would like credit. For this week, your reply should be at least 300 words.]

Question of the Week: Each time you install an add-on to your myspace or facebook site, your information is made available to thousands of programmers who create the add-on programs. Do you want your private information shared with others, sometimes without your permission? In other words, your myspace and facebook sites may not be private and limited only to family and friends you invite.

Background: For more info, see this article in the San Jose Mercury News: http://www.siliconvalley.com/latestheadlines/ci_9081115?nclick_check=1
Here's another resource: http://www.firstmonday.org/issues/issue11_9/barnes/index.html

ICA-CP: 4/28/08

Good afternoon!

Your boolean algebra quiz is corrected. If you aren't happy with your grade, you can take another version of the test on Friday. The higher of your two scores will go into Powerschool.

Please check Powerschool. All work, except the Myers-Briggs first program, has been entered into Powerschool. A lot of folks still owe me blogs/questions of the week and 10 tech words.

Reminder: Your modified Myers-Briggs program that adds a menu and boolean algebra in the if-statements is due on 4/20, Weds.

Tuesday, April 22, 2008

ICA-CP: 4/22/08 - Happy Earth Day!

Happy Eaerth Day!

Today is a work-on-your-booean-version-of-Myers-Briggs-program day. Remember that it's due next Weds., and is worth 100 points. Also, we will review for the boolean quiz we are having on Thurs., 4/24.

Please see me about the arrays quiz:
La'Shanae
Roneisha
Maria
Jaime
Lizette

Friday, April 18, 2008

ICA-CP Question of the Week: 4/14/08-4/18/08

[This is a 2 meeting week. So, your response to this week's question should be at least 200 words long.]

Question: What us reusability, and how may it be useful and powerful in Java programming? [Hint: Our use of CASE is an example of code reuse. Google up your reference material.]

ICA-CP: 4/18/2008

Good morning!

Today, work on your boolean modification to your Myers-Briggs program. Here are the exact details of the modification:
1) Start with your Myers-Briggs program.
2) Add a menu for a user to choose whether to print name, Myers-Briggs, or both.
3) Use boolean algebra to make the decision with if statements about what to display.
4) This project is due on 4/30/08, Weds., and is worth 100 points.

Also, we will have a quiz on boolean algebra on Thursday, 4/24/08. It will be worth 50 points.

Wednesday, April 16, 2008

ICA-CP Class Info: Boolean Algebra

State:
Boolean algebra is also known as predicate calculus. Boolean algebra uses 1 for true and zero for false, and applies logical truth tables to binary inputs to create an output or result. Boolean algebra is used in electronics to design chips for computers as well as in philosophy to determine the truth of logical statements. Java uses boolean algebra with if and while statements to make decisions.


Elaborate:

We are studying three boolean gates with their truth tables. They are OR, AND, and NOT. The AND gate is represented by && in Java, the OR gate by || and the NOT by ! (exclamation point). The truth tables for AND, OR, and NOT may be found at this link (since a blog does not display tables well): http://www.doc.ic.ac.uk/~dfg/hardware/HardwareLecture01.pdf
At this web site, see Diagram 1.2 Truth Tables. Remember, for an AND gate, the only time the output is true is when both inputs are true. An OR gate output is true if either of the two inputs are true. Finally, the output of a NOT gate is always opposite of the input. For more info, see this wikipedia entry: http://en.wikipedia.org/wiki/Boolean_algebra_%28logic%29

Exemplify:
AND example in Java:
boolean friday = 1;
boolean senior = 1;

if (friday && senior)
{
System.out.println("I can wear free dress.")
}

Since both friday and senior are true, then the program will display "I can wear free dress." However, if we changed the value of friday to false, the program would not execute the if statement and nothing would be displayed.

OR exmaple in Java:


boolean skyIsBlue = 1;
boolean sunIsShining = 0;

if (skyIsBlue || sunIsShining)
{
System.out.println("Weather is good!")
}

Since the skyIsBlue is true, but sunIsShining is false, the program will display "Weather is good." The if statement executes with an OR gate any time one of the conditions is true. In other words, both conditions (skyIsBlue and sunIsShining) do not have to be true to execute the code.

Example of NOT in Java:

boolean dayOff = 1;
boolean holiday = 1;

if (!dayOff && holiday)
{
System.out.println ("It's a school day.")
}

In this example, dayOff is true. But, the NOT changes the input to its opposite value. So, it makes dayOff false. Since the !dayOff is false and the holiday is true, the resultant output of the truth table for the AND gate is false. The if statement does not execute, nothing is printed. (Remember that and AND gate requires both inputs to be true for the output to be true.)

Illustrate:
Using boolean algebra is Java programs is much like making decisions in daily life. If it is Friday and I-am-a-senior, I may wear free dress. However, if I-am-a-senior, and it isn't Friday, then I can't wear free dress. However, boolean algebra in programs may be logically correct sometimes but not make practical sense. For example, if I say this:

boolean raining = 1;
boolean sunIsShining = 1;

if (raining && sunbIsShining)
{
System.out.println("Weather is good!");
}

the program displays "Weather is good!" even though I indicate that it is raining. When we use boolean algebra in Java programs, we follow the truth table logic even though it may not always make practical sense.

ICA-CO: 4/16/08 - Boolean Algebra

Good morning!

Today, we are learning about boolean algebra, which is also known as predicate calculus. Hardware in your computers (including cell phones and ipods) all work on binary encoding. Boolean algebra is a way to manipulate binary statements to create logical decision points. In Java, we use boolean algebra for "if" statements. If you ever take a logic class in college, you will use "predicate calculus" for making logic decisions in philosophy.

New assignment: Add a menu to your Myers-Briggs to give users the choice of displaying name only, Myers-Briggs only, or both. Use boolean algebra to implement the menu.

Friday, April 11, 2008

Question of the week: 4/7/08-4/11/08

[If you are doing the question of the week for this week, you need 300 words. If you are doing this as a make-up for previous blogs, you need 100 words per day of make-up work.]

Here's the question: Do you think that anything you say in a blog could be or should be used in a court case in which you are not directly involved? In other words, should you be held publicly responsible for what you write in a blog? Or, is it an invasion of your privacy and first amendment rights?


Background info: Katherine Seidel, mother of an autistic child, has a blog where she speaks out against vaccinations. She claims that her child's autism was caused by a vaccine. She also criticizes trial lawyers. She has been dragged into a court case in which she is neither the plantiff nor the defendant. The lawyers have subpoenaed her financial and other records. Here's some background about it: http://yro.slashdot.org/yro/08/04/11/1812225.shtml Here's the blog link with Katherine's reply: http://neurodiversity.com/weblog/article/150/

ICA-CP: 4/11/08 - Quiz and Myers-Briggs

Good afternoon!

We have several items due today:

1) Your 10 technology words that did not exist when Michael Jackson was born. Use SEXI to explain and describe. Put your answers in your blog. Worth 50 points.

2) Your Myers-Briggs program. Put the whole BlueJ subdirectory on the R drive under your name. If it's not on the R drive, it's not turned into me. Worth 100 points.

3) A quiz on Java string arrays which may be taken at this web site:
http://www.quia.com/quiz/1365054.html
Worth 40 poitns.

Mr. Isbell will be with you today. Please ask him to get the brainfood out of the closet for you. If you have questions, call my cell phone: 530-383-4217. Progress report are due next week. If you did not do your blogs and would like points, do 100 words for each day of make-up using the Question of the Week. I'll see everyone next week!

Wednesday, April 09, 2008

ICA-CP: 4/9/08

Good afternoon!

We are working on string arrays. You should have your Myers-Briggs program completed and turned into me on the R drive by the end of class on Friday.

So, on Friday, two assignments are due by the end of class:
1) Your Myers-Briggs program worth 100 points.
2) 10 technology words that did not exist when Michael Jackson was born. Explain each word using SEXI giving the usage and description of each word. This should be in your blog. It is worth 50 points.

Two other items for Friday:
1) I won't be in class. You will be finishing up your Myers-Briggs program.
2) Tbere will be a short online quiz on string arrays.

Be sure to read the Friday blog for quiz instructions. If you have questions about your programs, I will be available online and on the phone.