Welcome to TiddlyWiki created by Jeremy Ruston, Copyright © 2007 UnaMesa Association
!Demonstration:
<<player id=001 flash content\Java\048000-DoWhileLoop\048-DemoDoWhileLoop\048-DemoDoWhileLoop_controller.swf 640 480>>
!Notes
<<player id=002 flash content\Java\048000-DoWhileLoop\048-NotesDoWhileLoop\048-NotesDoWhileLoop_controller.swf 640 480>>
*Power Point Notes
!Activity
Ex:
<<player id=003 flash content\Java\048000-DoWhileLoop\049-ActMarketCapCalculator\049-ActMarketCapCalculator_controller.swf 640 480>>
*(049)Market Cap Calculator
!Demonstration:
<<player id=001 flash content\Java\050000-ForLoop\050-DemoForLoop\050-DemoForLoop_controller.swf 640 480>>
!Notes
<<player id=002 flash content\Java\050000-ForLoop\050-NotesForLoop\050-NotesForLoop_controller.swf 640 480>>
*Power Point Notes
!Activity
Ex:
<<player id=003 flash content\Java\050000-ForLoop\050-ActDirectDescendents\050-ActDirectDescendents_controller.swf 640 480>>
*(050)"Direct Descendents" Program
!Demonstration:
<<player id=001 flash content\Java\028000-IfThenElse\028-DemoTestResults\028-DemoTestResults_controller.swf 640 480>>
__''Code Needed For Demo:''__
This code is incomplete! Students to follow the instructor to get the remainder of the code.
{{{
//This program uses if...then...else if statements
import javax.swing.JOptionPane; //Needed for JOptionPane
/**
This program asks the user to enter a numeric test score
and displays a letter grade for the score. The program displays
an error message if an invaled numeric score is entered.
*/
public class crow3_028_TestResultsDemo
{
public static void main(String [] args)
{
int intScore; // Numeric test score
String strInput; // To hold the user's input
// Get the numeric test score.
strInput = JOptionPane.showInputDialog("Enter your numeric " +
"test score and I will tell you the grade: ");
intScore = Integer.parseInt(strInput);
//We will be placing code in here!
System.exit(0);
}
}
}}}
*[[Student Demonstration File(Incomplete)|content\Java\028000-IfThenElse\Lesson\Demo\028-TestResultsDemoCode.txt]] - Click the link for a file that contains the incomplete code.
!Notes
<<player id=002 flash content\Java\028000-IfThenElse\028-NotesElseIfStatements\028-NotesElseIfStatements_controller.swf 640 480>>
*Power Point Notes
!Activity
Ex:
<<player id=003 flash content\Java\028000-IfThenElse\029-ActCarSalesman\029-ActCarSalesman_controller.swf 640 480>>
*(029)Car Salesman Program
!Demonstration:
<<player id=001 flash content\Java\046000-WhileLoop\046-DemoWhileLoop\046-DemoWhileLoop_controller.swf 640 480>>
__''Code Needed For Demo:''__
{{{
//This demo will use a While Loop
//This demo will also create a user controlled loop
import java.text.DecimalFormat; //needed for the DecimalFormat class
import java.util.Scanner; //Needed for the Scanner class
public class crow3_046_RiskyJobDemo
{
public static void main(String[]args)
{
//Welcome users to the program
System.out.println("Welcome to the Risky Job demo!");
//Declare variables
int intCounter = 1; //Our good ol' buddy the counter
double dblMoney; //This will keep track of the money we make
//Create Decimal Formatter object
DecimalFormat formatter = new DecimalFormat("$#,##0.00");
//PART 1
//Do this one first and then comment it out
//System.out.println("You work 5 days as a fisherman.");
//System.out.println("How much do you make?");
//Create the while loop
//while (intCounter <= 5)
//{
// dblMoney = 1000.00 * intCounter;
// System.out.println("Day " + intCounter + ": You have made " + formatter.format(dblMoney));
// intCounter++;
//}
//PART 2
//Declare additional variable
int intTimes; //Number of times we will work
//Creating a Scanner object to read input
Scanner keyboard = new Scanner(System.in);
//Here we are setting a user controlled loop
System.out.print("How many days will you work? ");
//Putting information into a variable
intTimes = keyboard.nextInt();
System.out.println("You work " + intTimes + " as a fisherman.");
intCounter = 1; //Set the counter
//Create the user controlled while loop
while (intCounter <= intTimes)
{
dblMoney = 1000.00 * intCounter;
System.out.println("Day " + intCounter + ": You have made " + formatter.format(dblMoney));
intCounter++;
}
}
}
}}}
*[[Student Demonstration File(Complete)|content\Java\046000-WhileLoop\Lesson\Demo\crow3_046_RiskyJobDemo.java]] - Click the link for a file that contains the code.
!Notes
<<player id=002 flash content\Java\046000-WhileLoop\046-NotesWhileLoop\046-NotesWhileLoop_controller.swf 640 480>>
*[[Power Point Notes|content\Java\046000-WhileLoop\Lesson\046-WhileLoops.ppt]] - Click the link for the notes.
!Activity
Ex:
<<player id=003 flash content\Java\046000-WhileLoop\047-ActCasinoNight\047-ActCasinoNight_controller.swf 640 480>>
*(047)Casino Night
<<player id=001 flash content\TiddlyWiki\01-TiddlyWiki\TiddlyWiki01_controller.swf 640 480>>
<<player id=002 flash content\TiddlyWiki\02-TiddlyWiki\02-TiddlyWiki_controller.swf 640 480>>
*I am NOT a CPA.
*I am NOT a Tax Attorney.
*If you are looking for tax advice, double-check anything that I say.
*My understanding of tax is very basic and I am probably wrong.
<<player id=099 flash content\FedIncomeTax\00000-Warning\000-Warning_controller.swf 640 480>>
!Demonstration:
<<player id=001 flash content\Java\057000-AppendingFiles\057-DemoAppendingFiles\057-DemoAppendingFiles_controller.swf 640 480>>
__''Demonstration Code:''__
Students!! Notice that the code below has no comments. You will need to add comments when you copy and paste this in your tiddly-wiki!
{{{
import java.util.Scanner;
import java.io.*;
public class crow3_057_AppendingDataDemo
{
public static void main(String[]args) throws IOException
{
////Demo Part 1 - using the FileWriter
////---------------------------------
FileWriter fwriter = new FileWriter("GoodBands.txt", true);
PrintWriter outputFile = new PrintWriter(fwriter);
outputFile.println("Coldplay");
outputFile.println("Vampire Weekend");
outputFile.close();
System.out.println("File updated with awesome bands.");
////Demo Part 2 - Specifying File Location
////---------------------------------------
//PrintWriter outputFile = new PrintWriter("C:\\Music\\MoreGoodBands.txt");
//outputFile.println("Kanye West");
//outputFile.println("The Chordettes");
//outputFile.close();
//Scanner keyboard = new Scanner(System.in);
//System.out.print("Enter the file name: ");
//String strFileName = keyboard.nextLine();
//FileWriter fwriter = new FileWriter(strFileName, true);
//PrintWriter outputFile2 = new PrintWriter(fwriter);
//outputFile2.println("Coldplay");
//outputFile2.println("Vampire Weekend");
//outputFile2.close();
//System.out.println("File updated!");
}
}
}}}
*[[Student Demonstration File(Without Comments)|content\Java\057000-AppendingFiles\Lesson\Demo\057-AppendingDataDemo.txt]] - Click the link for a file that contains the code.
!Notes
<<player id=002 flash content\Java\057000-AppendingFiles\057-NotesAppendingFiles\057-NotesAppendingFiles_controller.swf 640 480>>
*Power Point Notes
!Activity
Ex:
<<player id=003 flash content\Java\057000-AppendingFiles\058-ActGoodMovies\058-ActGoodMovies_controller.swf 640 480>>
*(058)Good Movies Program
<<player id=001 flash content\Finance\000010-BanksAndAPY\00000-BanksAndAPY_controller.swf 640 480>>
!Demonstration:
<<player id=001 flash content\Java\083000-ClassesObjects\083-DemoObjects\083-DemoObjects_controller.swf 640 480>>
__''Demonstration Code:''__
Main Class:
{{{
//Package just means that this is part of a project and there
//is more than one file that goes with this project. All of the classes
//in the project should have this statement:
package crow6_083_rectangleclassdemo;
//Here is where we have our import statement
import javax.swing.JOptionPane; // For the JOptionPane class
//Declaring the Main public class
//You are used to seeing something like: crow3_083_RectangleClassDemo here
//Technically, we should have made all of our
//classes start Upper Case like: Crow3_083_RectangleClassDemo
public class Main
{
//This is the main method.
public static void main(String[] args)
{
//Declare variables
String strInput; //Placeholder for String variable
double dblNumber; //Placeholder for double variable
//Introduction for user
JOptionPane.showMessageDialog(null, "Mister Crow, Period 3 \n Welcome to the Rectangle Demo Program!");
//Create a Rectangle object and assign its address to the box variable
Rectangle box = new Rectangle();
//Call the box object's setLength method.
strInput = JOptionPane.showInputDialog("Enter the length of the rectangle: ");
dblNumber = Double.parseDouble(strInput);
box.setLength(dblNumber);
//Call the box object's setWidth method.
strInput = JOptionPane.showInputDialog("Enter the width of the rectangle: ");
dblNumber = Double.parseDouble(strInput);
box.setWidth(dblNumber);
//Display the object's length and width using the getLength and get Width methods.
JOptionPane.showMessageDialog(null,"The box's length is " + box.getLength());
JOptionPane.showMessageDialog(null,"The box's width is " + box.getWidth());
//Display the object's area using the getArea method.
JOptionPane.showMessageDialog(null,"The box's Area is " + box.getArea());
//Exiting out of the program
JOptionPane.showMessageDialog(null,"Goodbye! Thanks for using this program!");
}
}
}}}
Rectangle Class:
{{{
package crow6_083_rectangleclassdemo;
//We don't use static in the class declaration because we may create
//many instances of this class
public class Rectangle
{
//Setting the class variables
private double dblLength;
private double dblWidth;
//This is the setLength( ) method. It is a mutator method.
public void setLength(double dblPLength)
{
dblLength = dblPLength;
System.out.println("dblLength is " + dblLength);
}
//This is the setWidth( ) method. It is a mutator method.
public void setWidth(double dblPWidth)
{
dblWidth = dblPWidth;
System.out.println("dblWidth is " + dblWidth);
}
//This is the getLength( ) method. It is an accessor method.
public double getLength()
{
return dblLength;
}
//This is the getWidth( ) method. It is an accessor method.
public double getWidth()
{
return dblWidth;
}
//This is the getArea method. We do not create an Area variable.
//The Area may become stale. That means the Area may be incorrect if
//someone changes the length. If there was an area variable that variable
//would not change automatically.
public double getArea()
{
//Declare variable
double dblArea;
dblArea = dblWidth * dblLength;
return dblArea;
}
}
}}}
!Notes:
<<player id=002 flash content\Java\083000-ClassesObjects\083-NotesObjects\083-NotesObjects_controller.swf 640 480>>
<<player id=001 flash content\FedIncomeTax\01000-CommunityProperty\01000-CommunityProperty_controller.swf 640 480>>
!Community Property Income
__Community Property:__
*Income from property is considered joint or community property.
*If husband and wife file separately they have to equally share the income on their returns.
*Different states have different rules.
*Illinois is not a community property state.
*Wisconsin is a community property state.
*Ex:
*Husband has $1,000,000 before marriage.
*He gets married. The $1,000,000 grows to $1,500,000.
*He gets divoved. He keeps the $1,000,000, but his wife is entitled to half of the $500,000 gain.
*The $500,000 gain is community property.
California Rule:
*Property acquired before marriage is still that person's property.
*If husband and wife file separately only the one who owns the property reports it.
Texas Rule:
*Income from properties acquired before marriage is considered community income.
*If spouses file separately they must share that income.
__Section 66 (For Newly Divorced Couples)__
*Deals with how to treat community property.
*Deals with separated couples who were still technically married sometime during the year.
__Tenancy By Entirety__
*If property is held by a couple, all the income must be included by:
**husband in his return.....OR
**shared equally by huband and wife.
__Joint Tenants and Tenants In Common__
*Joint Tentant - person dies and their interest passes to the surviving joint tenant
*Tenants In Common - person dies and their interest passes to heirs. The heirs are taxed according to their proportionate share.
!Demonstration:
<<player id=001 flash content\Java\036000-ComparingStrings\036-DemoComparingStrings\036-DemoComparingStrings_controller.swf 640 480>>
__''Code From Demonstration:''__
{{{
//This program will compare strings using method
// This program is for a command prompt
import java.util.Scanner; //Needed for the Scanner class
public class crow3_036_CompareStringsDemo
{
public static void main(String[]args)
{
//Declare variables
String strName1;
String strName2;
//Creating a Scanner object to read input
Scanner keyboard = new Scanner(System.in);
//Get the first name
System.out.print("What is the first name? ");
strName1 = keyboard.nextLine();
//Get the second name
System.out.print("What is the second name? ");
strName2 = keyboard.nextLine();
//-------------------------------------------------
//The following doesn't work! You can't use relational operators
//to compare strings!
//if (strName1 == strName2)
//{
// System.out.println(strName1 + " and " + strName2 + " are the same!");
//}
//else
//{
// System.out.println(strName1 + " and " + strName2 + " are not the same!");
//}
//----------------------------------------------------------------
//equals method
//Comparing the two names with the equals() method
if (strName1.equals(strName2))
{
System.out.println(strName1 + " and " + strName2 + " are the same!");
}
else
{
System.out.println(strName1 + " and " + strName2 + " are not the same!");
}
//-----------------------------------------------------------------
//equals method
//This compares the first name to the string literal "Mister Crow"
if (strName1.equals("Mister Crow"))
{
System.out.println(strName1 + " and Mister Crow are the same!");
}
else
{
System.out.println(strName1 + " and Mister Crow are not the same!");
}
//-----------------------------------------------------------------
//compareTo method
//This method can determine which string is greater than, equal to, or less than
//another string
if (strName1.compareTo(strName2) == 0)
{
System.out.println(strName1 + " and " + strName2 + " are the same!");
}
else if (strName1.compareTo(strName2) > 0)
{
System.out.println(strName1 + " is greater than " + strName2);
}
else if (strName1.compareTo(strName2) < 0)
{
System.out.println(strName1 + " is less than " + strName2);
}
//------------------------------------------------------
//equalsIgnoreCase, compareToIgnoreCase
//These methods will ignore the case
if (strName1.equalsIgnoreCase(strName2))
{
System.out.println(strName1 + " and " + strName2 + " are the same!");
}
else
{
System.out.println(strName1 + " and " + strName2 + " are not the same!");
}
if (strName1.compareToIgnoreCase(strName2) == 0)
{
System.out.println(strName1 + " and " + strName2 + " are the same!");
}
else if (strName1.compareToIgnoreCase(strName2) > 0)
{
System.out.println(strName1 + " is greater than " + strName2);
}
else if (strName1.compareTo(strName2) < 0)
{
System.out.println(strName1 + " is less than " + strName2);
}
}
}
}}}
*[[Student Demonstration File|content\Java\036000-ComparingStrings\Lesson\crow3_036_CompareStringsDemo.java]] - Click the link for a file that contains the code.
!Notes
<<player id=002 flash content\Java\036000-ComparingStrings\036-NotesStringComparison\036-NotesStringComparison_controller.swf 640 480>>
*[[Power Point Notes|content\Java\036000-ComparingStrings\Lesson\036-StringComparison.ppt]] - Click the link for the notes.
!Activity
Ex:
<<player id=003 flash content\Java\036000-ComparingStrings\037-ActPasswordVerification\037-ActPasswordVerification_controller.swf 640 480>>
*(037)Password Verification Program
<<player id=001 flash content\Finance\000002-CompoundInterest\ClassOfCrow-CompoundInterest_controller.swf 640 480>>
!Demonstration:
<<player id=001 flash content\Java\007000-DataTypes\007-DemoDataTypes\007-DemoDataTypes_controller.swf 640 480>>
__''Files or Code Needed For Demo:''__
{{{
//This program is a demo for introducing Data Types
public class crow3_007_DataTypesDemo
{
public static void main(String[] args)
{
//Demo - Part 1
int intNumber;
double dblNumber;
intNumber = 10;
dblNumber = 10.90;
System.out.println("The small number is " + intNumber);
System.out.println("The big number is " + dblNumber);
//Demo - Part 2
//Now we will test to see what happens when
//you put an int data type into a double data type
//dblNumber = intNumber;
//System.out.println("The big number is " + dblNumber);
//Demo - Part 3
//Let's reset everything
//intNumber = 10;
//dblNumber = 10.90;
//Now we will test to see what happens when
//you put a double data type into an int data type
// *Java will not let you build this!
//intNumber = dblNumber;
//System.out.println("The small number is " + intNumber);
//Demo - Part 4
//Force the narrowing conversion using a cast operator
//intNumber = (int)dblNumber;
//System.out.println("The small number is " + intNumber);
}
}
}}}
!Notes
<<player id=002 flash content\Java\007000-DataTypes\007-NotesDataTypes\007-NotesDataTypes_controller.swf 640 480>>
!Activity
Ex:
<<player id=003 flash content\Java\007000-DataTypes\007-ActDataTypes\007-ActDataTypes_controller.swf 640 480>>
*(008)Convert This Activity
!Homework:
Day 1:
*Students should finish any previous programs if they have not yet completed those assignments.
Day 2:
*Students should finish the "Convert This" program if they did not complete during class.
!Demonstration:
<<player id=001 flash content\Java\040000-DecimalFormat\040-DemoDecimalFormat\040-DemoDecimalFormat_controller.swf 640 480>>
__''Code Needed For Demo:''__
{{{
//This program works with the DecimalFormat class and the printf function
import java.text.DecimalFormat; //needed for the DecimalFormat class
import java.util.Scanner; //Needed for the Scanner class
public class crow3_040_PartyNumbersDemo
{
public static void main(String [] args)
{
//PART 1 - Setting up program
//Declare variable
double dblNumber;
//Creating a Scanner object to read input
Scanner keyboard = new Scanner(System.in);
//Getting the number
System.out.print("You buy pizzas. How much do the pizzas cost? ");
//Putting information into a variable
dblNumber = keyboard.nextDouble();
//PART 2 - No Number Formatting
//Displaying the number with NO formatting
System.out.println(" ");
System.out.println("NO FORMATTING:");
System.out.println("The pizzas cost: " + dblNumber);
//PART 3 - Using the DecimalFormat Class
//Create an object, or an instance, of the DecimalFormat class
DecimalFormat formatter = new DecimalFormat("#0.00");
//Use the formatter object to format the numbers
System.out.println(" ");
System.out.println("DecimalFormat Class:");
System.out.println("The pizzas cost: " + formatter.format(dblNumber));
//Create an object, or an instance, of the DecimalFormat class
DecimalFormat formatter2 = new DecimalFormat("#0");
//Use the formatter object to format the numbers
System.out.println(" ");
System.out.println("DecimalFormat Class 2:");
System.out.println("The pizzas cost: " + formatter2.format(dblNumber));
//Create an object, or an instance, of the DecimalFormat class
DecimalFormat formatter3 = new DecimalFormat("#00000.0");
//Use the formatter object to format the numbers
System.out.println(" ");
System.out.println("DecimalFormat Class 3:");
System.out.println("The pizzas cost: " + formatter3.format(dblNumber));
//Create an object, or an instance, of the DecimalFormat class
DecimalFormat formatter4 = new DecimalFormat("#,##0.00");
//Use the formatter object to format the numbers
System.out.println(" ");
System.out.println("DecimalFormat Class 4:");
System.out.println("The pizzas cost: " + formatter4.format(dblNumber));
//Create an object, or an instance, of the DecimalFormat class
DecimalFormat formatter5 = new DecimalFormat("$#,##0.00");
//Use the formatter object to format the numbers
System.out.println(" ");
System.out.println("DecimalFormat Class 5:");
System.out.println("The pizzas cost: " + formatter5.format(dblNumber));
//Create an object, or an instance, of the DecimalFormat class
//This one will use a percentage
DecimalFormat formatter6 = new DecimalFormat("#0%");
//Use the formatter object to format the numbers
System.out.println(" ");
System.out.println("DecimalFormat Class 6:");
double dblNumber3 = .12;
double dblNumber4 = 1.34;
System.out.println(formatter6.format(dblNumber3));
System.out.println(formatter6.format(dblNumber4));
}
}
}}}
*[[Student Demonstration File(Complete)|content\Java\040000-DecimalFormat\Lesson\Demo\crow3_040_PartyNumbersDemo.java]] - Click the link for a file that contains the code.
!Notes
<<player id=002 flash content\Java\040000-DecimalFormat\040-NotesDecimalFormat\040-NotesDecimalFormat_controller.swf 640 480>>
*[[Power Point Notes|content\Java\040000-DecimalFormat\Lesson\040-DecimalFormatClass.ppt]] - Click the link for the notes.
!Activity
Ex:
<<player id=003 flash content\Java\040000-DecimalFormat\041-ActFiveCrazyBosses\041-ActFiveCrazyBosses_controller.swf 640 480>>
*(041)Five Crazy Bosses
!Demonstration:
<<player id=001 flash content\Java\026000-DecisionStructuresReview\026-DemoDecisionStructures\026-DemoDecisionStructures_controller.swf 640 480>>
!Example Code
{{{
// This program uses an integer for an If Then Else Statement!
// This program is for a command prompt
import java.util.Scanner; //Needed for the Scanner class
public class crow3_026a_IfDemo //This is the class body
{
public static void main (String[] args) //This is the method body
{
//Declare Variables
int intNumber;
//Creating a Scanner object to read input
Scanner keyboard = new Scanner(System.in);
//Display Name
System.out.println("Name: Mister Crow Period: 3");
System.out.println(" ");
//Asking Yes or Not question
System.out.print("Will you go outside today? (Enter 1 for Yes or 2 for No):");
//Putting information into an integer variable
intNumber = keyboard.nextInt();
//Displaying output
if (intNumber == 1)
System.out.println("What a wonderful day!");
else
System.out.println("Seriously, get a life.");
}
}
}}}
!Activity
Ex:
<<player id=003 flash content\Java\026000-DecisionStructuresReview\027-ActUFOAbduction\027-ActUFOAbduction_controller.swf 640 480>>
*(027)Alien Abduction Program
!Demonstration:
<<player id=001 flash content\Java\020000-DialogBoxString\020-DemoDialogBoxString\020-DemoDialogBoxString_controller.swf 640 480>>
!Notes
<<player id=002 flash content\Java\020000-DialogBoxString\020-NotesDialogBoxString\020-NotesDialogBoxString_controller.swf 640 480>>
!Activity
Ex:
<<player id=003 flash content\Java\020000-DialogBoxString\021-ActHelloName\021-ActHelloName_controller.swf 640 480>>
*(021)Hello Name Program
<<player id=001 flash content\FedIncomeTax\01500-Recapture\01500-Recapture_controller.swf 640 480>>
!Divorce and Separation
Alimony - a series of support payments received after divorce or legal separation.
Two Sets of Rules
*Before 1985
*After 1984
__Before 1985__
If the following are met then alimony is deductible for the giver and taxable for the receiver:
*Payment is required under terms of divorce.
*Payment must be to deal with legal support. (Can't be a payment made before divorce.)
*Payments must be periodic. (Can't be lump sum, payments must be for a period of 10 years or more!)
*Payments must not be for child support.
*The spouse with custody was entitled to the exemption.
__After 1984__
The following have to be met to be deductible as alimony:
*Payments must be in cash.
*Payments must be made in a divorce.
*Parties must live in separate households.
*Alimony ends with payee's death.
*Parties can't have a joint return.
*Custodial parent is entitled to exemption unless they claim the right to waive it.
*Husband makes a payment:
**Big chunk is paid at the beginning.
**Maybe it's not alimony.
**Maybe it's a payout of exisiting property.
!Recapture
Recapture is relabeling of income. It can be applied with lots of things. In this chapter it deals with alimony.
*After a divorce, the spouse that made lots of money may have to give the other spouse alimony.
*The divorce may also demand the assets accumulated during marriage be divided.
*Uh-oh! Here's a problem. During those first three years of divorce, you may have weird payments that have combined:
**Alimony, (which is supposed to be steady, even payments) which is:
***Deductible by the payor.
***Considered income by the receiver. This is not good for the receiver - they have to pay taxes!
**Division of Existing Property.
*You don't get taxed on Division of Existing Property.
*You do get taxed on alimony since it is considered income.
*So how do you separate the __alimony__ from __Division of Existing Property__?
*The IRS has a formula for figuring out how much of the payment is alimony and how much is division of existing property.
Ex:
*Year 1 Payment: $90,000
*Year 2 Payment: $50,000
*Year 3 Payment: $20,000
Here are the steps:
#Is Year 2 > (Year 3 + $15,000)
**Yes.
#Year 2 Payment - Year 3 Payment - $15,000 = __Year 2 Recapture__
**$50,000 - $20,000 -$15,000 = $15,000
#Year 2 Payment - Year 2 Recapture = __Adjusted Year 2 Payment__
**$50,000 - $5,000 = $45,000
#(Adjusted Year 2 Payment + Year 3 Payment)/2 = __Average Payments__
**($45,000 + $20,000)/2 = $32,500
#Year 1 Payment - Average Payments - $15,000 = __Year 1 Recapture__
**$90,000 - $32,500 - $15,000 = $42,500
#Year 1 Recapture + Year 2 Recapture = __Recapture__
**$42,500 + $15,000 = $57,500
*__Receiver of Alimony:__
**$57,500 exceeds the Year 3 payment of $20,000.
**The receiver would DEDUCT $37,500. (This helps offset all of the income he's had in the past.)
*__Payor of Alimony:__
**They must recapture $57,500 as income.
**They are paying out $20,000 which is a deduction.
**$57,500 - $20,000 = $37,500
**The payor must claim $37,500 of income.
Ex:
*Year 1 Payment: $500,000
*Year 2 Payment: $60,000
*Year 3 Payment: $50,000
*Here's what you need to know:
**There is no Year 2 Recapture.
**There IS recapture for Year 1.
***(60000 + 50000)/2 = 55000 (__Average Payments__)
***500000 - 55000 = 445000 (Recapture for Year 1)
***You don't subtract another 15,000.
***That's a lot of recapture. You can apply that to other income for that year(not just alimony). Also, you can also apply that recapture to past years and to future years.
__Other Rules__:
*If the receiver of alimony can deduct any legal fees that are associated with forcing the payor to pay.
**Ex: Johnny is late on his alimony payments. Karen, his ex, hires a lawyer who goes after him. Johnny pays his alimony and Karen gets to deduct any expenses. Johnny doesn't get to deduct anything.
*Transfer of Property - This is not taxable during marriage or during year after divorce.
*Child Support:
**NOT TAXABLE
**NOT DEDUCTIBLE
**Child Support has to be paid first before alimony. Any payments always count toward child support first.
*Reporting Requirement
**The taxpayer paying alimony has to furnish the payee's taxpayer ID on the tax return.
!A Warning
*[[A Warning]] - Please Watch Me First
*I am NOT a CPA.
*I am NOT a Tax Attorney.
*If you are looking for tax advice, double-check anything that I say.
*My understanding of tax is very basic and I am probably wrong.
!Individual Taxation
00100-[[The Tax Formula]]
00200-[[Itemized and Standard Deductions]]
00300-[[Personal Exemptions and Dependents]]
00400-[[Filing Status]]
00500-Tax Returns For Dependents (Didn't Understand)
00600-[[Self Employment Tax]]
!Gross Income
00700-Gross Income Definition
00800-[[Inter Vivos Transfer]]
00900-Income Doctrines
01000-[[Community Property Income]]
01100-Compensation
01200-Below Market Loans
01300-Rental Income
01400-Dividends
01500-[[Divorce and Recapture]]
01600-Debt and Bankruptcy
01700-Stock Option Plans
!Exclusions
01800-[[Social Security]]
01900-Savings Bonds and Educational Expenses
02000-State and Municipal Bonds
02100-Fringe Benefits
02200-Annuities
02300-Workers Compensation
02400-Accident and Health Plans, Military Expense
02500-Cafeteria Plan
!Demonstration:
<<player id=001 flash content\Java\054000-FileCreation\054-DemoFileCreation\054-DemoFileCreation_controller.swf 640 480>>
!Notes
<<player id=002 flash content\Java\054000-FileCreation\054-NotesFileCreation\054-NotesFileCreation_controller.swf 640 480>>
*Power Point Notes
!Activity
Ex:
<<player id=003 flash content\Java\054000-FileCreation\054a-ActFileCreation\054a-ActFileCreation_controller.swf 640 480>>
*[[(054a)Mad Lyrics Modification Program|content\Java\054000-FileCreation\Lesson\054a-MadLyricsModification.doc]]
!Demonstration:
<<player id=001 flash content\Java\061000-FileExistRandom\061-DemoFileExistenceRandom\061-DemoFileExistenceRandom_controller.swf 640 480>>
__''Code Needed For Demo:''__
{{{
//This program does the following:
// -Checks for a file's existence
// -Creates a new file
// -Overwrites a file
// -Appends data to a file
// -Uses the Random class to create random numbers
import java.util.Scanner; //Needed for Scanner class
import java.io.*; //Needed for file and IOException
import java.util.Random; //Needed to create random numbers
public class crow3_061_RandomnessDemo
{
public static void main(String[] args) throws IOException
{
//Declare variable
double dblNumber;
int intChoice; //For program choice
String strFileName; //For file name
String strLine; //Used to read info in file
//Creating an object that will create random numbers
Random randomNumber = new Random();
//Create a Scanner object for keyboard input
Scanner keyboard = new Scanner(System.in);
//Get the file name
System.out.print("Enter the name of your file: ");
strFileName = keyboard.nextLine();
//Create a file object
File file = new File(strFileName);
//See If the File Exists
if (!file.exists())
{
//If the file DOES NOT EXIST we will give the user the following options
System.out.println("That file does not exist!");
System.out.println("Enter 1 to create the file.");
System.out.println("Enter 2 to exit the program.");
System.out.println(" ");
System.out.print("Enter selection here: ");
intChoice = keyboard.nextInt();
//If user wants to create file
if (intChoice == 1)
{
//Create file and open a connection to it
PrintWriter outputFile = new PrintWriter(strFileName);
//Writing Random Number to the file
outputFile.println(randomNumber.nextDouble()); //Prints a random double number
outputFile.println(randomNumber.nextInt()); //Prints a random Integer
outputFile.println(randomNumber.nextInt(10)); //Prints a random Integer between 1 and 10
outputFile.println(randomNumber.nextInt(1000)); //Prints a random Integer between 1 and 1000
//Close the file
outputFile.close();
System.out.println(" ");
System.out.println(strFileName + " has been created.");
System.out.println("Random Numbers have been written to the file.");
}
//If user wants to exit program
else
{
System.out.println("Good bye! Program is closing.");
System.exit(0);
}
}
else
{
//If the file EXISTS we will give the user the following options
System.out.println("That file already exists!");
System.out.println("Enter 1 to overwrite the file.");
System.out.println("Enter 2 to append to the file.");
System.out.println("Enter 3 to read the contents of the file.");
System.out.println("Enter 4 to exit the program.");
System.out.println(" ");
System.out.print("Enter selection here: ");
intChoice = keyboard.nextInt();
//If user wants to overwrite file
if (intChoice == 1)
{
//Overwrite file and open a connection to it
PrintWriter outputFile = new PrintWriter(strFileName);
//Writing Random Number to the file
outputFile.println(randomNumber.nextDouble()); //Prints a random double number
outputFile.println(randomNumber.nextInt()); //Prints a random Integer
outputFile.println(randomNumber.nextInt(10)); //Prints a random Integer between 1 and 10
outputFile.println(randomNumber.nextInt(1000)); //Prints a random Integer between 1 and 1000
//Close the file
outputFile.close();
System.out.println(" ");
System.out.println(strFileName + " has been overwritten with new data.");
System.out.println("Random Numbers have been written to the file.");
}
//If user wants to append data
if (intChoice == 2)
{
//Creating a FileWriter object that appends data
FileWriter fwriter = new FileWriter(strFileName, true);
//You still have to create a PrintWriter object to write to the file
PrintWriter outputFile = new PrintWriter(fwriter);
//Writing Random Number to the file
outputFile.println(randomNumber.nextDouble()); //Prints a random double number
outputFile.println(randomNumber.nextInt()); //Prints a random Integer
outputFile.println(randomNumber.nextInt(10)); //Prints a random Integer between 1 and 10
outputFile.println(randomNumber.nextInt(1000)); //Prints a random Integer between 1 and 1000
//Close the file
outputFile.close();
System.out.println(" ");
System.out.println(strFileName + " has been appended with new data.");
System.out.println("Random Numbers have been written to the file.");
}
//If user wants to read the file
else if (intChoice == 3)
{
//Create a Scanner object to read the file.
Scanner inputFile = new Scanner(file);
while (inputFile.hasNext())
{
//Read the next line of text in the file
strLine = inputFile.nextLine();
//Display the last line read
System.out.println(strLine);
}
//Close the file
inputFile.close();
System.out.println("Contents of file have been displayed! Program is closing.");
System.exit(0);
}
//If user wants to exit program
else if (intChoice == 4)
{
System.out.println("Good bye! Program is closing.");
System.exit(0);
}
else
{
System.out.println("Invalid Choice! Program is closing.");
System.exit(0);
}
}
}
}
}}}
*[[Student Demonstration Code File(Complete)|content\Java\061000-FileExistRandom\Lesson\Demo\crow3_061_RandomnessDemo.java]] - Click the link for a file that contains the code.
!Notes
<<player id=002 flash content\Java\061000-FileExistRandom\061-NotesFileExistenceRandom\061-NotesFileExistenceRandom_controller.swf 640 480>>
*Power Point Notes
!Activity
Ex:
<<player id=003 flash content\Java\061000-FileExistRandom\061-ActClairvoyance\061-ActClairvoyance_controller.swf 640 480>>
*(062)Clairvoyance
*[[Partial Code|content\Java\061000-FileExistRandom\Lesson\Activity\062-PartialCode.txt]] - Click here for the code you need to start the program.
<<player id=001 flash content\FedIncomeTax\00400-FilingStatus\004-FilingStatus_controller.swf 640 480>>
!!Filing Status and Requirements
*__Married Individuals Filing Jointly__
**Joint return is not allowed if a spouse is a nonresident alien at any time during tax year.
***However, a special election can be made to treat the spouse as a citizen. For example, if Jacque is from France and making tons of money, the government wants a cut of that!
***Otherwise, it's "Married Filing Separately."
**Both spouses sign the return and are liable for tax, interest, or penalties.
**Determination of marriage is made at the close of the year.
**Best to file jointly when incomes are not equal.
*__Married Individuals Filing Separately__
**Best to file separately if there are large medical expenses.
**Smaller AGI of a separate return helps with a medical deduction. You can have a medical deduction if your medical expenses EXCEED 7.5 % of your AGI.
**IRS code does put limitations on deductions and credits when married taxpayers file separately.
*__Single Individuals__
*__Heads of Household__
**Unmarried individuals who maintain a household of dependents can get the Head of Household status.
**Over 1/2 of the cost of maintaining the household has to come from the taxpayer.
**Parents who are dependent do not need to live with the taxpayer. The taxpayer can still get the Head of Household status. BUT they HAVE to live in a nursing home or retirement home. They can't live in their own house.
**A retirement home is considered a "maintained household."
**It is possible for a household to be a portion of a home(like the top apartment in a 3 level house).
**''Abandoned Spouse Requirements:''
***Taxpayer must file a separate return.
***Taxpayer must cover over half the cost of maintaining home.
***Taxpayer's home must be the principal residence of a child for more than half a year.
***Abandoned Spouses qualify for Head of Household status - this gives them a lower tax rate.
***__There has to be an abandoned child too!__
*__Surviving Spouses__
**Surviving Spouses get tax benefits.
**They use the same rate as married taxpayers filing jointly.
**The year you lose your partner you can still file as "Married Filing Jointly."
**The next two years you can use "Surviving Spouse," but that third year you would file as "Single."
!Basic Finance
000001-[[Simple Interest]]
000002-[[Compound Interest]]
000003-[[Rule Of 72]]
!Investing
000010-[[Banks and APY]]
000011-[[Wealth and Inflation]]
000012-[[Stocks - Part 01]]
000013-[[Stocks - Part 02]]
000014-[[Stocks - Part 03]]
000014-[[Mister Crow's Stock Contest]]
!Financial Calculator
005000-[[Ordinary Annuity on BA2Plus]]
005100-[[Simple and Compound Interest on BA2Plus]]
To get started with this blank [[TiddlyWiki]], you'll need to modify the following tiddlers:
* [[SiteTitle]] & [[SiteSubtitle]]: The title and subtitle of the site, as shown above (after saving, they will also appear in the browser title bar)
* [[MainMenu]]: The menu (usually on the left)
* [[DefaultTiddlers]]: Contains the names of the tiddlers that you want to appear when the TiddlyWiki is opened
You'll also need to enter your username for signing your edits: <<option txtUserName>>
/***
|Name|HTMLFormattingPlugin|
|Source|http://www.TiddlyTools.com/#HTMLFormattingPlugin|
|Documentation|http://www.TiddlyTools.com/#HTMLFormattingPluginInfo|
|Version|2.4.0|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Description|embed wiki syntax formatting inside of HTML content|
The ~HTMLFormatting plugin allows you to ''mix wiki-style formatting syntax within HTML formatted content'' by extending the action of the standard TiddlyWiki formatting handler.
!!!!!Documentation
>see [[HTMLFormattingPluginInfo]]
!!!!!Revisions
<<<
2009.01.05 [2.4.0] in wikifyTextNodes(), pass w.highlightRegExp and w.tiddler to wikify() so that search term highlighting and tiddler-relative macro processing will work
| see [[HTMLFormattingPluginInfo]] for additional revision details |
2005.06.26 [1.0.0] Initial Release (as code adaptation - pre-dates TiddlyWiki plugin architecture!!)
<<<
!!!!!Code
***/
//{{{
version.extensions.HTMLFormattingPlugin= {major: 2, minor: 4, revision: 0, date: new Date(2009,1,5)};
// find the formatter for HTML and replace the handler
initHTMLFormatter();
function initHTMLFormatter()
{
for (var i=0; i<config.formatters.length && config.formatters[i].name!="html"; i++);
if (i<config.formatters.length) config.formatters[i].handler=function(w) {
if (!this.lookaheadRegExp) // fixup for TW2.0.x
this.lookaheadRegExp = new RegExp(this.lookahead,"mg");
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source)
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
var html=lookaheadMatch[1];
// if <nowiki> is present, just let browser handle it!
if (html.indexOf('<nowiki>')!=-1)
createTiddlyElement(w.output,"span").innerHTML=html;
else {
// if <hide linebreaks> is present, suppress wiki-style literal handling of newlines
if (html.indexOf('<hide linebreaks>')!=-1) html=html.replace(/\n/g,' ');
// remove all \r's added by IE textarea and mask newlines and macro brackets
html=html.replace(/\r/g,'').replace(/\n/g,'\\n').replace(/<</g,'%%(').replace(/>>/g,')%%');
// create span, let browser parse HTML
var e=createTiddlyElement(w.output,"span"); e.innerHTML=html;
// then re-render text nodes as wiki-formatted content
wikifyTextNodes(e,w);
}
w.nextMatch = this.lookaheadRegExp.lastIndex; // continue parsing
}
}
}
// wikify #text nodes that remain after HTML content is processed (pre-order recursion)
function wikifyTextNodes(theNode,w)
{
function unmask(s) { return s.replace(/\%%\(/g,'<<').replace(/\)\%%/g,'>>').replace(/\\n/g,'\n'); }
switch (theNode.nodeName.toLowerCase()) {
case 'style': case 'option': case 'select':
theNode.innerHTML=unmask(theNode.innerHTML);
break;
case 'textarea':
theNode.value=unmask(theNode.value);
break;
case '#text':
var txt=unmask(theNode.nodeValue);
var newNode=createTiddlyElement(null,"span");
theNode.parentNode.replaceChild(newNode,theNode);
wikify(txt,newNode,highlightHack,w.tiddler);
break;
default:
for (var i=0;i<theNode.childNodes.length;i++)
wikifyTextNodes(theNode.childNodes.item(i),w); // recursion
break;
}
}
//}}}
|Name|HTMLFormattingPluginInfo|
|Source|http://www.TiddlyTools.com/#HTMLFormattingPlugin|
|Documentation|http://www.TiddlyTools.com/#HTMLFormattingPluginInfo|
|Version|2.4.0|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|documentation|
|Requires||
|Description|documentation for HTMLFormattingPlugin|
The ~HTMLFormatting plugin allows you to freely ''mix wiki-style formatting syntax within HTML formatted content'' by extending the action of the standard TiddlyWiki formatting handler.
!!!!!Usage
<<<
The shorthand Wiki-style formatting syntax of ~TiddlyWiki is very convenient and enables most content to be reasonably well presented. However, there are times when tried-and-true HTML formatting syntax allows more more precise control of the content display.
When a tiddler is about to be displayed, ~TiddlyWiki looks for tiddler content contained within {{{<html>}}} and {{{</html>}}} markers. When present, the TiddlyWiki core simply passes this content directly to the browser's internal "rendering engine" to process as ~HTML-formatted content. However, TiddlyWiki does not also process the HTML source content for any embedded wiki-formatting syntax it may contain. This means that while you can use HTML formatted content, you cannot mix wiki-formatted content within the HTML formatting.
This plugin extends the TiddlyWiki core processing so that, after the HTML formatting has been processed, all the pieces of text occuring within the HTML block are then processed one piece at a time, so that normal wiki-style formatting can be applied to the individual text pieces.
Note: To bypass this extended processing for a specific section of HTML content, embed ''{{{<nowiki>}}}'' //anywhere// inside the {{{<html>...</html>}}} delimiters, and wiki formatting will not be applied to that content.
<<<
!!!!!Line breaks
<<<
One major difference between Wiki formatting and HTML formatting is how "line breaks" are processed. Wiki formatting treats all line breaks as literal content to be displayed //as-is//. However, because HTML normally ignores line breaks and actually processes them as simple "word separators" instead, many people who write HTML include extra line breaks in their documents, just to make the "source code" easier to read.
Even though you can use HTML tags within your tiddler content, the default treatment for line breaks still follows the Wiki-style rule (i.e., all new lines are displayed as-is). When adding HTML content to a tiddler (especially if you cut-and-paste it from another web page), you should take care to avoid adding extra line breaks to the text.
If removing all the extra line breaks from your HTML content would be a big hassle, you can quickly //override the default Wiki-style line break rule// so that the line breaks use the standard HTML rules, by placing ''{{{<hide linebreaks>}}}'' //anywhere// within the HTML content. This automatically converts all line breaks to spaces before rendering the content, so that the literal line breaks will be processed as simple word-breaks instead.
Note: this does //not// alter the actual tiddler content that is stored in the document, just the manner in which it is displayed. Any line breaks contained in the tiddler will still be there when you edit its content. Also, to include a literal line break when the ''<{{{hide linebreaks}}}>'' tag is present, you will need to use a ''<{{{br}}}>'' or ''<{{{p}}}>'' HTML tag instead of simply typing a line break.
<<<
!!!!!How it works
<<<
The TW core support for HTML does not let you put ANY wiki-style syntax (including TW macros) *inside* the {{{<html>...</html>}}} block. Everything between {{{<html>}}} and {{{</html>}}} is handed to the browser for processing and that is it.
However, not all wiki syntax can be safely passed through the browser's parser. Specifically, any TW macros inside the HTML will get 'eaten' by the browser since the macro brackets, {{{<<...>>}}} use the "<" and ">" that normally delimit the HTML/XML syntax recognized by the browser's parser.
Similarly, you can't use InlineJavascript within the HTML because the {{{<script>...</script>}}} syntax will also be consumed by the browser and there will be nothing left to process afterward. Note: unfortunately, even though the browser removes the {{{<script>...</script>}}} sequence, it doesn't actually execute the embedded javascript code that it removes, so any scripts contained inside of <html> blocks in TW are currently being ignored. :-(
As a work-around to allow TW *macros* (but not inline scripts) to exist inside of <html> formatted blocks of content, the plugin first converts the {{{<<}}} and {{{>>}}} into "%%(" and ")%%", making them "indigestible" so they can pass unchanged through the belly of the beast (the browser's HTML parser).
After the browser has done its job, the wiki syntax sequences (including the "undigested" macros) are contained in #text nodes in the browser-generated DOM elements. The plugin then recursively locates and processes each #text node, converts the %%( and )%% back into {{{<<}}} and {{{>>}}}, passes the result to wikify() for further rendering of the wiki-formatted syntax into a containing SPAN that replaces the previous #text node. At the end of this process, none of the encoded %%( and )%% sequences remain in the rendered tiddler output.
<<<
!!!!!Revisions
<<<
2009.01.05 [2.4.0] in wikifyTextNodes(), pass w.highlightRegExp and w.tiddler to wikify() so that search term highlighting and tiddler-relative macro processing will work
2008.10.02 [2.3.0] added use of {{{<nowiki>}}} marker to bypass all wikification inside a specific HTML block
2008.09.19 [2.2.0] in wikifyTextNodes(), don't wikify the contents of STYLE nodes (thanks to MorrisGray for bug report)
2008.04.26 [*.*.*] plugin size reduction: more documentation moved to HTMLFormattingInfo
2008.01.08 [*.*.*] plugin size reduction: documentation moved to HTMLFormattingInfo
2007.12.04 [*.*.*] update for TW2.3.0: replaced deprecated core functions, regexps, and macros
2007.06.14 [2.1.5] in formatter, removed call to e.normalize(). Creates an INFINITE RECURSION error in Safari!!!!
2006.09.10 [2.1.4] update formatter for 2.1 compatibility (use this.lookaheadRegExp instead of temp variable)
2006.05.28 [2.1.3] in wikifyTextNodes(), decode the *value* of TEXTAREA nodes, but don't wikify() its children. (thanks to "ayj" for bug report)
2006.02.19 [2.1.2] in wikifyTextNodes(), put SPAN element into tiddler DOM (replacing text node), BEFORE wikifying the text content. This ensures that the 'place' passed to any macros is correctly defined when the macro is evaluated, so that calls to story.findContainingTiddler(place) will work as expected. (Thanks for bug report from GeoffSlocock)
2006.02.05 [2.1.1] wrapped wikifier hijack in init function to eliminate globals and avoid FireFox 1.5.0.1 crash bug when referencing globals
2005.12.01 [2.1.0] don't wikify #TEXT nodes inside SELECT and TEXTAREA elements
2005.11.06 [2.0.1] code cleanup
2005.10.31 [2.0.0] replaced hijack wikify() with hijack config.formatters["html"] and simplified recursive WikifyTextNodes() code
2005.10.09 [1.0.2] combined documentation and code into a single tiddler
2005.08.05 [1.0.1] moved HTML and CSS definitions into plugin code instead of using separate tiddlers
2005.07.26 [1.0.1] Re-released as a plugin. Added <{{{html}}}>...</{{{nohtml}}}> and <{{{hide newlines}}}> handling
2005.06.26 [1.0.0] Initial Release (as code adaptation - pre-dates TiddlyWiki plugin architecture!!)
<<<
!Notes
<<player id=002 flash content\Java\001100-HistoryOfJava\00H-JavaHistoryNotes\00H-JavaHistoryNotes_controller.swf 640 480>>
!Activity
*(00H)History Of Java Research Sheet
!Homework:
*Students should finish the research assignment for homework.
!Demonstration:
<<player id=001 flash content\Java\044000-IncrementOperator\044-DemoIncrementOperator\044-DemoIncrementOperator_controller.swf 640 480>>
__''Code From Demonstration:''__
{{{
//This program will use the ++ and -- operators
public class crow3_044_MagicShowDemo
{
public static void main(String[]args)
{
//Welcome to the magic show.
System.out.println("I'm the Magic Man... Now you see me. Now you DON'T!");
//Create variable
int intNumber;
//Initialize variable
intNumber = 5;
//Display Number
System.out.println("Our magic number is currently " + intNumber);
//Increment Number
System.out.println("Hold on to your butts. Now I will increase this number.");
//intNumber = intNumber + 1; This is the old way!
//intNumber += 1; This is the old way!
intNumber ++; //pronounced "Number plus plus"
System.out.println("The magic number is now " + intNumber + "! WHOA!");
//Decrement Number
System.out.println("Oh... but wait. It gets better. Now I will decrease this number.");
//intNumber = intNumber - 1; This is the old way!
//intNumber -= 1; This is the old way!
intNumber --;
System.out.println("The magic number is now " + intNumber + "! AMAZING!");
System.out.println("That was post fix mode.");
//Prefix mode
System.out.println("Get ready for prefix mode! Die number, die!");
--intNumber;
--intNumber;
System.out.println("The magic number is now " + intNumber + "!");
System.out.println("Live, number live!");
++intNumber;
++intNumber;
++intNumber;
++intNumber;
++intNumber;
System.out.println("Help! I've created a monster! The number is now " + intNumber);
//Difference between prefix and postfix mode
System.out.println(" ");
System.out.println("So what is the difference between prefix and postfix?");
//Postfix mode
intNumber = 5;
System.out.println(intNumber++);
System.out.println("This was postfix mode.");
System.out.println("The increment happens AFTER the println method.");
System.out.println(" ");
//Prefix mode
intNumber = 5;
System.out.println(++intNumber);
System.out.println("This was prefix mode.");
System.out.println("The increment happens BEFORE the println method.");
//What will the following be?
//intNumber = 2;
//System.out.println(intNumber++);
}
}
}}}
*[[Student Demonstration File|content\Java\044000-IncrementOperator\Lesson\Demo\crow3_044_MagicShowDemo.java]] - Click the link for a file that contains the code.
!Notes
<<player id=002 flash content\Java\044000-IncrementOperator\044-NotesIncrementOperators\044-NotesIncrementOperators_controller.swf 640 480>>
*[[Power Point Notes|content\Java\044000-IncrementOperator\Lesson\044-IncrementDecrementOperators.ppt]] - Click the link for the notes.
!Activity
Ex:
<<player id=003 flash content\Java\044000-IncrementOperator\045-ActShadowHare\045-ActShadowHare_controller.swf 640 480>>
*(045)Shadow Hare Program
Click on the following subjects to find a specific topic:
[[Finance]]
[[Java - Unit 01]]
[[Java - Unit 02]]
[[Java - Unit 03]]
[[Java - Unit 04]]
[[Java - Unit 05]]
[[TiddlyWiki]]
[[Federal Income Tax]]
[[Tech Tips]]
[[WikiMedia Tutorials]]
How do you install fonts? It's easy and fun!
<<player id=001 flash content\TechTips\00001-Fonts\00001-Fonts_controller.swf 640 480>>
!Demonstration:
<<player id=001 flash content\Java\002000-InstallJava\000-InstallJavaDemo\InstallJava_controller.swf 640 480>>
__''Files or Code Needed For Demo:''__
Students will follow the teacher's instructions during the demonstration.
!Notes
<<player id=002 flash content\Java\002000-InstallJava\000-InstallJavaNotes\000-InstallJavaNotes_controller.swf 640 480>>
!Activity
*(000)Installing Java At Home
*At the end of the notes students should receive the instruction sheet for changing the PATH property.
*Also, the student's assignment (if there is time) is to download both of these to their flash drive:
**JDK
**Notepad++
*They are to install these at home.
!Homework:
*Students need to install the Java JDK and Netbeans onto their computer at home.
<<player id=001 flash content\FedIncomeTax\00800-InterVivosTransfer\00800-InterVivosTransfer_controller.swf 640 480>>
!!Income is NOT:
Are the following income?
*Here's $50. - No! It is a gift.
*$100,000 to the beneficiary of a life insurance policy. - No! Life Insurance is income tax free!
*Loan of $100 - No. Loans are not taxable.
*Here's $50 to wash my car. - Yes! That is income.
*Here's your $20,000 of the $300,000 you earned in commission. - Yes Commission is income when you get paid the $20,000.
-Prepaid Rent - You pay tax on the cash that comes in. You can only deduct the expense when it is earned.
The following are NOT income:
*Gifts
**__Inter vivos Giving__:
***This is a gift that you give while you are alive.
***The recipient will be taxed on that gift. The basis is 0.
***Ex: Let's say you receive a $100,000 house from a person while they are alive.
***$100,000 Sales Price - 0 Basis = $100,000 to be taxed!
**__Testamentary Disposition__:
***This is a gift that is given when a person dies. The gift is set aside in their will.
***The IRS says that the basis for the gift is the Fair Market Value of the gift at the date of death.
***Ex: Let's say you receive $100,000 house from a person in their will when they die.
***$100,000 Sales Price - $100,000 Fair Market Value = $0 amount to be taxed.
***It's much better to be in that will!
**Corporations can receive gifts. For example, Boeing given property in downtown Chicago. it was a "contribution."
*Life Insurance
*Loans
<<player id=001 flash content\Access\100000-IntroToAccess\100000-IntroToAccess_controller.swf 640 480>>
!Demonstration:
<<player id=001 flash content\Java\066000-MethodsIntro\066-DemoMethodsIntro\066-DemoMethodsIntro_controller.swf 640 480>>
__''Code Needed For Demo:''__
Roar Lion Demo:
{{{
//This program defines and calls a simple method
public class crow3_066_RoarLionDemo
{
public static void main(String[] args)
{
//The following prints from the main method
System.out.println("This is printing from the main method!");
//The following will call the roarLion method
roarLion();
//The following prints from the main method
System.out.println("Now we are back in the main method again.");
}
//Here we are defining the roarLion method
public static void roarLion()
{
System.out.println("ROARRRR!! Now we are in the roarLion method.");
}
}
}}}
Method Madness Demo:
{{{
//This demo has 4 methods: main, awesomeMethod, radicalMethod, loopyMethod
public class crow3_067_MethodMadnessDemo
{
public static void main(String [] args)
{
System.out.println("The program will always start in the main method.");
System.out.println("Right now we are in the main method.");
//Call the awesomeMethod
awesomeMethod();
System.out.println("Now we are back in the main method again!");
//call the radicalMethod
radicalMethod();
System.out.println("And we're back in the main method again.");
System.out.println("Boring... Let's get loopy!");
//call the loopyMethod
loopyMethod();
System.out.println("For giggles, let's go back to the Awsome method...");
//calling the awesomeMethod
awesomeMethod();
System.out.println("Back in the main method again. This program is done!");
System.out.println("Good bye!");
}
//This is the AWESOME method
public static void awesomeMethod()
{
System.out.println("Now we are in the AWESOME method.");
System.out.println("It truly is AWESOME to be in this method.");
}
//This is the RADICAL method
public static void radicalMethod()
{
System.out.println("RADICAL!! I'm in the RADICAL method!");
}
//This method has a loop that loops the radical method
public static void loopyMethod()
{
System.out.println("Now we are in the loopy method!");
System.out.println("This method will call the RADICAL method 5 times.");
System.out.println("Here we go: ");
//Calling the radicalMethod using a loop
for (int intCounter = 0; intCounter < 5; intCounter++)
{
radicalMethod();
}
System.out.println("That was fun! Now we will leave the loopy method!");
}
}
}}}
!Notes
<<player id=002 flash content\Java\066000-MethodsIntro\066-NotesMethodsIntro\066-NotesMethodsIntro_controller.swf 640 480>>
<<player id=001 flash content\FedIncomeTax\00200-Deductions\02-Deductions_controller.swf 640 480>>
!!Standard Deductions
*Single in 2009: $5700
*Married Filing Jointly: $11,400
*The standard reduction reduces the need to audit returns.
''Additional Standard Deduction''
You get more on your standard deduction if you are:
*Aged (You have to be 65 before the close of the year)
**If you die, you have to reach 65 to get the deduction.
*Blind
''Married Filing Separately''
*Both spouses either have to itemize OR take standard deduction.
!!Itemized Deductions
*Medical Expenses
**You can deduct these if they exceed 7.5% of your AGI.
**This gives lower income people some relief.
*State and Local Taxes
*Property Taxes
*Home Mortgage Interest
*Charitable Contributions
**These deductions can't be 50% greater than your AGI
**Cash
**Appreciated Property - this is what wealthy people like to give.
*Casualty Losses
*Employee Expenses
*Education - you can only deduct education expenses IF your employer requires you to go to classes to keep your job.
''Limits on Itemized Deductions:''
*Threshold Amount for Single AND Joint: $166,800
*If you make above that AND your itemized deductions are above the standard deduction:
:Total Itemized Deductions - ( (AGI - 166,800) * .03 * (''1/3'') ) = Adjusted Itemized Deductions
*The ''(1/3)'' in the equation comes from the PHASE IN of the PHASE OUT.
**The PHASE OUT is the phasing out of the entire standard deduction for those with income over $166,800.
**The PHASE IN has to do with congress not wanting people to get hit all at once with this rule.
***2009 Adjusted Itemized Deductions = Total Itemized Deductions - ( (AGI - 166,800) * .03 * (''1/3'') )
***2010 Adjusted Itemized Deductions = Total Itemized Deductions - ( (AGI - 166,800) * .03 * (''2/3'') )
***2011 Adjusted Itemized Deductions = Total Itemized Deductions - ( (AGI - 166,800) * .03 * (''3/3'') )
!!Difference Between Tax Credit and Tax Deduction
*A deduction or exemption reduces the taxable income. It indirectly affects the tax liability.
*A credit directly reduces the tax liability. Here are some examples of tax credits:
**Earned Income Credit
**Child Tax Credit
**Credit For The Elderly
**General Business Credit
**Dependent Care Credit
**Education Credits
**Foreign Tax Credit
(09-22-09) [[The Command Prompt]]
(09-24-09) [[History of Java]]
(09-28-09) [[Installing Java]]
(09-29-09) [[Java Virtual Machine]]
(10-01-09) [[The "println" Method]]
(10-02-09) [[Variables]]
(10-05-09) [[Data Types]]
(10-07-09) [[Netbeans IDE]]
(10-13-09) [[Operators]]
(10-15-09) [[The Math Class]]
(10-16-09) [[The String Class]]
(10-20-09) [[The Scanner Class]]
(10-21-09) [[Unit 01 Quiz]]
(10-26-09) [[Organizing Your Code Repository]]
(10-27-09) [[Dialog Boxes With Strings]]
(10-28-09) [[Parsing Data]]
(10-30-09) [[Review for Unit 1 Test]]
(11-02-09) [[Unit 01 Test]]
(11-10-09) [[Decision Structures Intro]]
(11-12-09) [["If...Then...Else" Statements]]
(11-17-09) [[Nested If Statements Alice Review]]
(11-23-09) [[Nested If Statements]]
(12-02-09) [[Logical Operators]]
(12-09-09) [[Comparing Strings]]
(12-11-09) [[Switch Statements]]
(12-16-09) [[DecimalFormat Class]]
(01-15-10) [[Review for Unit 2 Test]]
(01-19-10) [[Unit 02 Test]]
(01-04-10) [[Increment Operator]]
(01-05-10) [["While" Loop]]
(01-08-10) [["Do While" Loop]]
(01-12-10) [["For" Loop]]
(01-25-10) [[Sentinel Values]]
(02-09-10) [[Loops Quiz]]
(02-01-10) [[File Creation Using PrintWriter]]
(02-03-10) [[Writing To Files Using Loops]]
(02-05-10) [[Appending Files]]
(02-10-10) [[Reading From Files]]
(02-17-10) [[File Existence and Random Numbers]]
(02-19-10) [[Unit 03 Test]]
(02-23-10) [[Intro To Methods]]
(02-24-10) [[Passing A Value]]
(02-26-10) [[Multiple Arguments]]
[[Returning A Value]]
[[Methods And Strings]]
!Demonstration:
<<player id=001 flash content\Java\002100-JavaVirtualMachine\001-JavaProgramDemo\JavaVirtualMachineDemo_controller.swf 640 480>>
__''Files or Code Needed For Demo:''__
*[[(001)-DemoFiles.zip|content\Java\002100-JavaVirtualMachine\Lesson\Demo\001-DemoFiles.zip]] - Extract these files with 7-Zip.
!Notes
<<player id=002 flash content\Java\002100-JavaVirtualMachine\001-JVMNotes\JavaVirtualMachinePowerPoint_controller.swf 640 480>>
!Activity
*(002)Flowchart Activity
!Homework:
Day 1:
*Students will need to download and install the JDK at home if they have not done so already.
*Also, students should practice using the command prompt at home!
Day 2:
*Students should finish the flowchart if they did not finish it in class.
!Notes
<<player id=000 flash content\Java\034000-LogicalOperators\034-NotesLogicalOperators\034-NotesLogicalOperators_controller.swf 640 480>>
*[[Power Point Notes|content\Java\034000-LogicalOperators\LessonDay01\034-LogicalOperators.ppt]] - Click the link for the notes.
!Activity - (034)Can You Graduate Program:
<<player id=001 flash content\Java\034000-LogicalOperators\034-ActCanYouGraduate\034-ActCanYouGraduate_controller.swf 640 480>>
__''Code(Incomplete) Needed For Activity:''__
{{{
//This program uses logical operators
import javax.swing.JOptionPane; //needed for the JOptionPane class
public class crow2_034_CanYouGraduateDemo
{
public static void main(String[]args)
{
//Declare the variables
int intSchoolYear;
int intServiceHours;
int intRemaining;
String strInput;
//Get the user's year in school
strInput = JOptionPane.showInputDialog("What year are you? (Enter 1 for Freshmen, " +
"2 for Sophomore, 3 for Junior, and 4 for Senior.)");
intSchoolYear = Integer.parseInt(strInput);
//Get the user's service learning hours
strInput = JOptionPane.showInputDialog("How many service learning hours do you have?");
intServiceHours = Integer.parseInt(strInput);
//Determine if the user can graduate or is on track to graduate
if (intSchoolYear >= 4 && intServiceHours >= 40)
{
JOptionPane.showMessageDialog(null, "Congrats! You have enough service learning hours to graduate!");
}
else if (intSchoolYear >= 4 && intServiceHours < 40 )
{
//Determine remaining hours
intRemaining = 40 - intServiceHours;
//Berate person for not having done their Service Hours.
JOptionPane.showMessageDialog(null, "You only have " + intServiceHours + " hours? You have " + intRemaining + " left to do if you want to graduate!");
}
else if (intSchoolYear == 3 && intServiceHours >= 30 )
//Students will fill in the rest of the code here!
System.exit(0);
}
}
}}}
*[[(034)Can You Graduate Program(Incomplete)|content\Java\034000-LogicalOperators\LessonDay01\Demo\crow2_034_CanYouGraduateDemoIncomplete.java]]
!Activity - (035)Burn Those Calories Program:
<<player id=004 flash content\Java\034000-LogicalOperators\035-ActBurnCalories\035-ActBurnCalories_controller.swf 640 480>>
__''Here is some code from the program to get you started:''__
{{{
//Declare the variables
int intChoice;
double dblCaloriesAte;
double dblNumber;
double dblCaloriesBurned;
double dblCaloriesLeftover;
//Creating a Scanner object to read input
Scanner keyboard = new Scanner(System.in);
//Part 1: Calories Ate --------------------------------------------------------
//Determining the type of food
System.out.print("What type of food did you eat? (Enter 1 for Pizza or 2 for Big Mac):");
//Putting information into a variable
intChoice = keyboard.nextInt();
//This will determine how many calories they ate
if (intChoice == 1)
{
System.out.print("How many slices did you eat? ");
dblNumber = keyboard.nextDouble();
dblCaloriesAte = dblNumber * 300.0;
}
else
{
System.out.print("How many Bic Macs did you eat? ");
dblNumber = keyboard.nextDouble();
dblCaloriesAte = dblNumber * 540.0;
}
}}}
*(035)Burn Those Calories Program
!Quiz Instructions
Ex:
<<player id=001 flash content\Java\053000-LoopsQuiz\053-QuizCrazyCultCalculator\053-QuizCrazyCultCalculator_controller.swf
640 480>>
*(053)Crazy Cult Quiz
!Demonstration:
<<player id=001 flash content\Java\076000-MethodsStrings\076-DemoMethodsStrings\076-DemoMethodsStrings_controller.swf 640 480>>
__''Demonstration Code:''__
{{{
//This program will pass strings to a method and return a string
import javax.swing.JOptionPane; //needed for the JOptionPane class
public class crow3_076_CompanyName
{
public static void main(String [] args)
{
//Declare variables
String strScience;
String strVerb;
String strLastName;
String strEnding;
String strCompanyName;
int intChoice;
String strInput;
//Introduction for user
JOptionPane.showMessageDialog(null, "Welcome to the Company Name Creator!");
//Get the variables from the user
strScience = JOptionPane.showInputDialog("Enter a word related to science (Ex: Genome): ");
strVerb = JOptionPane.showInputDialog("Enter a sophisticated verb (Ex: Holding): ");
strLastName = JOptionPane.showInputDialog("Type your last name: ");
strInput = JOptionPane.showInputDialog("Enter a number between 1 and 3: ");
intChoice = Integer.parseInt(strInput);
switch (intChoice)
{
case 1:
strEnding = "Inc.";
break;
case 2:
strEnding = "Corporation";
break;
case 3:
strEnding = "LLC";
break;
default:
strEnding = "Crack Shack. (You did not enter a valid selection earlier.) ";
}
//Send variables to method
strCompanyName = companyName(strLastName, strScience, strVerb, strEnding);
//Display finished name
JOptionPane.showMessageDialog(null, "Congratulations, your company name is: " + strCompanyName);
}
//This is the companyName method
public static String companyName(String strOne, String strTwo, String strThree, String strFour)
{
//Declare variable
String strName;
//Put the strings together
strName = strOne + " " + strTwo + " " + strThree + " " + strFour;
//Return strName to the main method
return strName;
}
}
}}}
<<player id=001 flash content\Finance\000090-MrCrowContest\000090-MrCrowContest_controller.swf 640 480>>
!Demonstration:
<<player id=001 flash content\Java\071000-MultipleArguments\071-DemoPassingMultipleArguments\071-DemoPassingMultipleArguments_controller.swf 640 480>>
__''Code Needed For Demo:''__
{{{
//This program passes multiple arguments to a method
import javax.swing.JOptionPane; //needed for the JOptionPane class
import java.text.DecimalFormat; //needed for the DecimalFormat class
public class crow3_071_SpecialSomeoneDemo
{
public static void main(String [] main)
{
//Declare variables
String strInput; //This holds data before it is parsed
double dblAllowance; //Allowance per week
double dblWeeks; //Number of weeks you get paid
double dblDinner; //Cost of dinner
//Introduction for user
JOptionPane.showMessageDialog(null, "Welcome to the Special Someone Demo!");
JOptionPane.showMessageDialog(null, "Mister Crow, Period 3");
//Get the Allowance
strInput = JOptionPane.showInputDialog("What is your allowance per week?");
dblAllowance = Double.parseDouble(strInput);
//Get the number of weeks
strInput = JOptionPane.showInputDialog("How many weeks do you save your allowance?");
dblWeeks = Double.parseDouble(strInput);
//Passing two values into the Total Allowance method
totalAllowance(dblAllowance, dblWeeks);
JOptionPane.showMessageDialog(null, "You meet a special someone and take them out on a date.");
//Get the cost of the dinner
strInput = JOptionPane.showInputDialog("How much do you spend on dinner?");
dblDinner = Double.parseDouble(strInput);
//Passing three values into the moneyLeftover method
moneyLeftover(dblAllowance, dblWeeks, dblDinner);
}
//totalAllowance method
public static void totalAllowance(double dblOne, double dblTwo)
{
//Declare variable
double dblTotal; //Total amount of money earned
//Create an object, or an instance, of the DecimalFormat class
DecimalFormat formatter = new DecimalFormat("$#,##0.00");
//Calculate Total
dblTotal = dblOne * dblTwo;
//Display total
JOptionPane.showMessageDialog(null, " Allowance Per Week: " + formatter.format(dblOne) +
" \n Weeks You Saved: " + formatter.format(dblTwo) +
" \n ----------------------------- " +
" \n Total Allowance: " + formatter.format(dblTotal));
}
//moneyLeftover method
public static void moneyLeftover(double dblOne, double dblTwo, double dblFood)
{
//Declare variable
double dblTotal; //Money leftover
//Create an object, or an instance, of the DecimalFormat class
DecimalFormat formatter = new DecimalFormat("$#,##0.00");
//Calculate Total
dblTotal = (dblOne * dblTwo) - dblFood;
//Display total
JOptionPane.showMessageDialog(null, "After your date, you have " + formatter.format(dblTotal));
}
}
}}}
!Demonstration:
<<player id=001 flash content\Java\032000-NestedIfStatement\032-DemoNestedIf\032-DemoNestedIf_controller.swf 640 480>>
__''Incomplete Code Needed For Demo:''__
{{{
// This program uses Nested If Statements
// This program is for a command prompt
import java.util.Scanner; //Needed for the Scanner class
public class crow3_032_NestedIfDemo
{
public static void main (String[] args) //This is the method body
{
//Declare Variables
int intNumber;
//Creating a Scanner object to read input
Scanner keyboard = new Scanner(System.in);
//Display Name
System.out.println("Gone To The Movies Demo");
System.out.println(" ");
System.out.println(" ");
System.out.println("It is Saturday, and you are headed to the movie theater to see _______! ");
System.out.println("Uh-oh! You're running late!");
System.out.println("Will you stay on the street or take a shortcut through the alley?");
//Asking User Question
System.out.print("Enter 1 for (Stay On Street) or 2 for (Take Alley):");
//Putting information into an integer variable
intNumber = keyboard.nextInt();
//Displaying output - *We will be putting code in here!
}
}
}}}
*[[Student Demonstration File(Incomplete)|content\Java\032000-NestedIfStatement\Lesson\Demo\032-NestedIfDemo.txt]] - Click the link for a file that contains the code.
!Notes
<<player id=002 flash content\Java\032000-NestedIfStatement\032-NotesNestedIf\032-NotesNestedIf_controller.swf 640 480>>
*Power Point Notes
!Activity
Ex:
<<player id=003 flash content\Java\032000-NestedIfStatement\033-ActChooseOwnAdventure\033-ActChooseOwnAdventure_controller.swf 640 480>>
*(033)"Choose Your Own Adventure" Mini-Project
!Demonstration:
<<player id=001 flash content\Java\030000-NestedIfAliceReview\030-DemoMummyAttack\030-DemoMummyAttack_controller.swf 640 480>>
*[[Alice File(Incomplete)|content\Java\030000-NestedIfAliceReview\Lesson\Demo\030-EgyptQuestionsDemo.a2w]] - Click the link to download the Alice project that contains the incomplete code.
!Activity
Ex:
<<player id=003 flash content\Java\030000-NestedIfAliceReview\031-ActAskHerOut\031-ActAskHerOut_controller.swf 640 480>>
*(031)"Ask Her Out" Program
!Demonstration:
<<player id=001 flash content\Java\009000-Netbeans\009-DemoNetbeans\009-DemoNetbeans_controller.swf 640 480>>
__''Files or Code Needed For Demo:''__
{{{
// This program is a demo that introduces the Netbeans program but also reviews
// the narrowing conversion the students learned yesterday.
public class crow3_009_LastNameFirstInitial
{
public static void main(String[ ] args)
{
int intAnswer;
double dblAnswer;
double dblNumber1;
double dblNumber2;
dblNumber1 = 30;
dblNumber2 = 7;
//Now we will test to see what happens when
//you put a double data type into an int data type
dblAnswer = dblNumber1/dblNumber2;
intAnswer = (int)dblAnswer;
System.out.println("The first number is " + dblNumber1);
System.out.println("The second number is " + dblNumber2);
System.out.println("The double type answer is " + dblAnswer);
System.out.println("The int type answer is " + intAnswer);
}
}
}}}
!Notes
<<player id=002 flash content\Java\009000-Netbeans\009-NotesNetbeans\009-NotesNetbeans_controller.swf 640 480>>
!Activity
Ex:
<<player id=003 flash content\Java\009000-Netbeans\010-ActNetbeans\010-ActNetbeans_controller.swf 640 480>>
*(010)IDE Search Program
!Homework:
Day 1:
*Students need to work on incomplete programs at home.
Day 2:
*Students need to work on incomplete programs at home.
!Lesson Plan Information
__''Objective:''__
The student will be able to use the Netbeans IDE to create a simple Java program.
__''Why This Is Important:''__
Students will be using the Netbeans IDE for the remainder of the year to design their Java programs.
__''Standards:''__
6. Technology Operations and Concepts
*Students demonstrate a sound understanding of technology concepts, systems, and operations.
*Performance Indicator: a. understand and use technology systems.
!Demonstration:
<<player id=001 flash content\Java\011000-Operators\011-DemoOperators\011-DemoOperators_controller.swf 640 480>>
__''Files or Code Needed For Demo:''__
{{{
//This program is a demo for operators
public class crow3_011_OperatorDemo
{
public static void main(String[] args)
{
//Part 1 - This part of the program will focus on the modulus operator
//Declare variables
int intNumber1, intNumber2;
int intLeftover;
int intAnswer;
//We will be putting code in here
//---------------------------------------------------
//Part 2 - This part of the program will focus on integer division
double dblParts;
dblParts = 28/5; //Put in 28 first. Run the program. Then put in 28.0 and run.
System.out.println("Part 2:");
System.out.println("The answer is " + dblParts);
}
}
}}}
*[[Student Demonstration Code(Incomplete)|content\Java\011000-Operators\Lesson\Demo\011-OperatorDemoStudentCode.txt]] - Click the link for a file that contains the code.
!Notes
<<player id=002 flash content\Java\011000-Operators\011-NotesOperators\011-NotesOperators_controller.swf 640 480>>
!Activity
Ex:
<<player id=003 flash content\Java\011000-Operators\012-ActOperators\012-ActOperators_controller.swf 640 480>>
*(012)Nice Paycheck Program
<<player id=001 flash content\Finance\005000-BA2PlusOrdinaryAnnuity\BA2Plus-OrdinaryAnnuity_controller.swf 640 480>>
!Demonstration:
<<player id=001 flash content\Java\019100-BeOrganized\020-BeOrganized\020-BeOrganized_controller.swf 640 480>>
<!--{{{-->
<div id='header' class='header'>
<div id='title'>
<div id='topMenu' refresh='content' tiddler='MainMenu'></div>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
</div>
<div id='sidebar'>
<div id='sidebarOptions' refresh='content' tiddler='SideBarOptions'></div>
<div id='sidebarTabs' refresh='content' force='true' tiddler='SideBarTabs'></div>
</div>
<div id='displayArea'>
<div id='messageArea'></div>
<div id='tiddlerDisplay'></div>
<div class='clearAll'></div>
</div>
<div id='contentFooter' refresh='content' tiddler='contentFooter'></div>
<!--}}}-->
!Demonstration:
<<player id=001 flash content\Java\022000-DialogBoxParse\022-DemoTriangleArea\022-DemoTriangleArea_controller.swf 640 480>>
__''Files or Code Needed For Demo:''__
{{{
import javax.swing.JOptionPane;
public class crow3_022_TriangleAreaDemo
{
public static void main(String[] args)
{
String strInput; //String used to grab input
double dblHeight; //Triangle's Height
double dblWidth; //Triangle's Width
double dblArea; //Triangle's Area
//Get the Triangle's height
strInput = JOptionPane.showInputDialog("What is the triangle's height?");
//Convert the input to a double number type
dblHeight = Double.parseDouble(strInput);
//Get the Triangle's width
strInput = JOptionPane.showInputDialog("What is the triangle's width?");
//Convert the input to a double number type
dblWidth = Double.parseDouble(strInput);
//Calculate the Triangle's Area
dblArea = (dblHeight * dblWidth * .5);
//Display the Triangle Area to the user
JOptionPane.showMessageDialog(null, "The area of the triangle is: " + dblArea);
//End the program
System.exit(0);
}
}
}}}
!Notes
<<player id=002 flash content\Java\022000-DialogBoxParse\022-NotesParseData\022-NotesParseData_controller.swf 640 480>>
!Activity
Ex:
<<player id=003 flash content\Java\022000-DialogBoxParse\023-ActLotteryWinner\023-ActLotteryWinner_controller.swf 640 480>>
*(023)Lottery Winner Program
!Demonstration:
<<player id=001 flash content\Java\069000-PassingValue\069-DemoPassingValue\069-DemoPassingValue_controller.swf 640 480>>
__''Code Needed For Demo:''__
{{{
//We will pass an argument to a method in this program
public class crow3_069_SquareThisDemo
{
public static void main(String [] args)
{
System.out.println("I will be passing values to three methods.");
System.out.println(" ");
//Passing Arguments to the squareNumber method
System.out.println("First I will pass values to the squareNumber method.");
squareNumber(2);
squareNumber(5);
squareNumber(125);
System.out.println(" ");
//Passing Arguments to the cubeNumber Method
System.out.println("Now I will pass values to the cubeNumber method.");
cubeNumber(2);
cubeNumber(5);
cubeNumber(125);
System.out.println(" ");
}
//This is the squareNumber method
public static void squareNumber(int intNum)
{
int intAnswer;
intAnswer = intNum * intNum;
System.out.println("The square of " + intNum + " is " + intAnswer + ".");
}
//This is the cubeNumber method
public static void cubeNumber(int intNum)
{
int intAnswer;
intAnswer = intNum * intNum * intNum;
System.out.println("The cube of " + intNum + " is " + intAnswer + ".");
}
}
}}}
<<player id=001 flash content\FedIncomeTax\00300-PersonalExemptions\03-PersonalExemptions_controller.swf 640 480>>
!!Personal Exemptions
Personal Exemption:
*The government wants to help you out.
*An exemption is money you earn that you don't have to pay tax on.
*It's another deduction from income.
*Taxpayers are allowed a __personal exemption__ and __one for each dependent__.
*2009 exemption is $3,650.
High-Income Phaseout of Exemptions
*Uh oh! If you make too much money the government takes away part of your exemptions. GASP! (Like it matters when you're making $250,200!)
**Threshold Amount: $250,200 for Joint Return.
**Threshold Amount: $166,800 for Single Taxpayer.
*If you make more than the figures above the government uses the following formula to decrease your exemption:
{{{
AGI - Threshold Amount = Excess Over Threshold
Excess Over Threshold / 2,500 = (The number of $2,500s - round up!)
(Number of $2,500s) * (2%) * (1/3) = (Reduction in Personal Exemptions, a %)
Exemptions Total * (Reduction in Personal Exempions) = (The Amount To Decrease Your Exemption)
}}}
!!Dependents:
*Qualifying Child
**R - Relationship - son, stepson, etc.., legally adopted, and foster child.
**A - Age - Under 19, Under 24 if a full-time student(enrolled for 5 months full-time according to university).
**S - Support - The child may not provide over half their support.
***If both parents claim the child, the kid goes to the one with whom they live the most.
**H - Principal Abode - live in house with taxpayer for over half the year. The H stands for Housing.
**A - Alive - If the dependent is alive part of the year it counts. For example, if a couple has a baby and then the newborn dies it counts.
*Qualifying Relative
**Relative OR Membership of Household
***Relative of taxpayer (including stepfather, son-in-law, older daughter, older son)
***Member of Household - a nonrelated person must be a member of the household for the entire year.
***(The taxpayer must maintain and occupy the household)
**Gross Income
***The gross income of the dependent must be less than $3,650 (the personal exemption amount)
***Gross Income is determined before the deduction of any expenses(materials, taxes, depreciation).
**Support
***Over 1/2 of the support of the dependent must be furnished by taxpayer.
***Support includes food, shelter, clothing, medical and dental care, education, and similar items.
***Welfare payments must not provide more than half the support.
***Scholarships don't count as support. Amounts for tuition payments also don't count.
Special Rules For Dependents
*You can still claim a dead dependent (grandpa) if they lived with you the entire previous year.
*The dependent has to be a U.S. citizen or national, except for kids.
*If __multiple people__ support the person under 50% (like brothers and sisters) only one can take the deduction. __BUT a person is not allowed to take a deduction IF they didn't support ABOVE 10%.__
*A person can waive the exemption for a person(Form 8332 which is a declaration). The noncustodial parent must attach the declaration to their return when claiming the kid.
*Dependents don't get a deduction for being blind or aged!
<<player id=001 flash content\WikiMedia\PersonalWikipedia-Part1\PersonalWikipedia-Part1_controller.swf 640 360>>
<<player id=002 flash content\WikiMedia\PersonalWikipedia-Part2\PersonalWikipedia-Part2_controller.swf 640 360>>
/***
|Name|PlayerPlugin|
|Source|http://www.TiddlyTools.com/#PlayerPlugin|
|Version|1.1.4|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides||
|Options|##Configuration|
|Description|Embed a media player in a tiddler|
!!!!!Usage
<<<
{{{<<player [id=xxx] [type] [URL] [width] [height] [autoplay|true|false] [showcontrols|true|false] [extras]>>}}}
''id=xxx'' is optional, and specifies a unique identifier for each embedded player. note: this is required if you intend to display more than one player at the same time.
''type'' is optional, and is one of the following: ''windows'', ''realone'', ''quicktime'', ''flash'', ''image'' or ''iframe''. If the media type is not specified, the plugin automatically detects Windows, Real, QuickTime, Flash video or JPG/GIF images by matching known file extensions and/or specialized streaming-media transfer protocols (such as RTSP:). For unrecognized media types, the plugin displays an error message.
''URL'' is the location of the media content
''width'' and ''height'' are the dimensions of the video display area (in pixels)
''autoplay'' or ''true'' or ''false'' is optional, and specifies whether the media content should begin playing as soon as it is loaded, or wait for the user to press the "play" button. Default is //not// to autoplay.
''showcontrols'' or ''true'' or ''false'' is optional, and specifies whether the embedded media player should display its built-in control panel (e.g., play, pause, stop, rewind, etc), if any. Default is to display the player controls.
''extras'' are optional //pairs// of parameters that can be passed to the embedded player, using the {{{<param name=xxx value=yyy>}}} HTML syntax.
''If you use [[AttachFilePlugin]] to encode and store a media file within your document, you can play embedded media content by using the title of the //attachment tiddler//'' as a parameter in place of the usual reference to an external URL. When playing an attached media content, you should always explicitly specify the media type parameter, because the name used for the attachment tiddler may not contain a known file extension from which a default media type can be readily determined.
<<<
!!!!!Configuration
<<<
Default player size:
width: <<option txtPlayerDefaultWidth>> height: <<option txtPlayerDefaultHeight>>
<<<
!!!!!Examples
<<<
+++[Windows Media]...
Times Square Live Webcam
{{{<<player id=1 http://www.earthcam.com/usa/newyork/timessquare/asx/tsq_stream.asx>>}}}
<<player id=1 http://www.earthcam.com/usa/newyork/timessquare/asx/tsq_stream.asx>>
===
+++[RealOne]...
BBC London: Live and Recorded news
{{{<<player id=2 http://www.bbc.co.uk/london/realmedia/news/tvnews.ram>>}}}
<<player id=2 http://www.bbc.co.uk/london/realmedia/news/tvnews.ram>>
===
+++[Quicktime]...
America Free TV: Classic Comedy
{{{<<player id=3 http://www.americafree.tv/unicast_mov/AmericaFreeTVComedy.mov>>}}}
<<player id=3 http://www.americafree.tv/unicast_mov/AmericaFreeTVComedy.mov>>
===
+++[Flash]...
Asteroids arcade game
{{{<<player id=4 http://www.80smusiclyrics.com/games/asteroids/asteroids.swf 400 300>>}}}
<<player id=4 http://www.80smusiclyrics.com/games/asteroids/asteroids.swf 400 300>>
Google Video
{{{<<player id=5 flash http://video.google.com/googleplayer.swf?videoUrl=http%3A%2F%2Fvp.video.google.com%2Fvideodownload%3Fversion%3D0%26secureurl%3DoQAAAIVnUNP6GYRY8YnIRNPe4Uk5-j1q1MVpJIW4uyEFpq5Si0hcSDuig_JZcB9nNpAhbScm9W_8y_vDJQBw1DRdCVbXl-wwm5dyUiiStl_rXt0ATlstVzrUNC4fkgK_j7nmse7kxojRj1M3eo3jXKm2V8pQjWk97GcksMFFwg7BRAXmRSERexR210Amar5LYzlo9_k2AGUWPLyRhMJS4v5KtDSvNK0neL83ZjlHlSECYXyk%26sigh%3Dmpt2EOr86OAUNnPQ3b9Tr0wnDms%26begin%3D0%26len%3D429700%26docid%3D-914679554478687740&thumbnailUrl=http%3A%2F%2Fvideo.google.com%2FThumbnailServer%3Fcontentid%3De7e77162deb04c42%26second%3D5%26itag%3Dw320%26urlcreated%3D1144620753%26sigh%3DC3fqXPPS1tFiUqLzmkX3pdgYc2Y&playerId=-91467955447868774 400 326>>}}}
<<player id=5 flash http://video.google.com/googleplayer.swf?videoUrl=http%3A%2F%2Fvp.video.google.com%2Fvideodownload%3Fversion%3D0%26secureurl%3DoQAAAIVnUNP6GYRY8YnIRNPe4Uk5-j1q1MVpJIW4uyEFpq5Si0hcSDuig_JZcB9nNpAhbScm9W_8y_vDJQBw1DRdCVbXl-wwm5dyUiiStl_rXt0ATlstVzrUNC4fkgK_j7nmse7kxojRj1M3eo3jXKm2V8pQjWk97GcksMFFwg7BRAXmRSERexR210Amar5LYzlo9_k2AGUWPLyRhMJS4v5KtDSvNK0neL83ZjlHlSECYXyk%26sigh%3Dmpt2EOr86OAUNnPQ3b9Tr0wnDms%26begin%3D0%26len%3D429700%26docid%3D-914679554478687740&thumbnailUrl=http%3A%2F%2Fvideo.google.com%2FThumbnailServer%3Fcontentid%3De7e77162deb04c42%26second%3D5%26itag%3Dw320%26urlcreated%3D1144620753%26sigh%3DC3fqXPPS1tFiUqLzmkX3pdgYc2Y&playerId=-91467955447868774 400 326>>
YouTube Video
{{{<<player id=6 flash http://www.youtube.com/v/OdT9z-JjtJk 400 300>>}}}
<<player id=6 flash http://www.youtube.com/v/OdT9z-JjtJk 400 300>>
===
+++[Still Images]...
GIF (best for illustrations, animations, diagrams, etc.)
{{{<<player id=7 image images/meow.gif auto auto>>}}}
<<player id=7 image images/meow.gif auto auto>>
JPG (best for photographs, scanned images, etc.)
{{{<<player id=8 image images/meow2.jpg 200 150>>}}}
<<player id=8 image images/meow2.jpg 200 150>>
===
<<<
!!!!!Revisions
<<<
2008.05.10 [1.1.4] in handlers(), immediately return if no params (prevents error in macro). Also, refactored auto-detect code to make type mapping configurable.
2007.10.15 [1.1.3] in loadURL(), add recognition for .PNG (still image), fallback to iframe for unrecognized media types
2007.08.31 [1.1.2] added 'click-through' link for JPG/GIF images
2007.06.21 [1.1.1] changed "hidecontrols" param to "showcontrols" and recognize true/false values in addition to 'showcontrols', added "autoplay" param (also recognize true/false values), allow "auto" as value for type param
2007.05.22 [1.1.0] added support for type=="iframe" (displays src URL in an IFRAME)
2006.12.06 [1.0.1] in handler(), corrected check for config.macros.attach (instead of config.macros.attach.getAttachment) so that player plugin will work when AttachFilePlugin is NOT installed. (Thanks to Phillip Ehses for bug report)
2006.11.30 [1.0.0] support embedded media content using getAttachment() API defined by AttachFilePlugin or AttachFilePluginFormatters. Also added support for 'image' type to render JPG/GIF still images
2006.02.26 [0.7.0] major re-write. handles default params better. create/recreate player objects via loadURL() API for use with interactive forms and scripts.
2006.01.27 [0.6.0] added support for 'extra' macro params to pass through to object parameters
2006.01.19 [0.5.0] Initial ALPHA release
2005.12.23 [0.0.0] Started
<<<
!!!!!Code
***/
//{{{
version.extensions.PlayerPlugin= {major: 1, minor: 1, revision: 4, date: new Date(2008,5,10)};
config.macros.player = {};
config.macros.player.html = {};
config.macros.player.handler= function(place,macroName,params) {
if (!params.length) return; // missing parameters - do nothing
var id=null;
if (params[0].substr(0,3)=="id=") id=params.shift().substr(3);
var type="";
if (!params.length) return; // missing parameters - do nothing
var p=params[0].toLowerCase();
if (p=="auto" || p=="windows" || p=="realone" || p=="quicktime" || p=="flash" || p=="image" || p=="iframe")
type=params.shift().toLowerCase();
var url=params.shift(); if (!url || !url.trim().length) url="";
if (url.length && config.macros.attach!=undefined) // if AttachFilePlugin is installed
if ((tid=store.getTiddler(url))!=null && tid.isTagged("attachment")) // if URL is attachment
url=config.macros.attach.getAttachment(url); // replace TiddlerTitle with URL
var width=params.shift();
var height=params.shift();
var autoplay=false;
if (params[0]=='autoplay'||params[0]=='true'||params[0]=='false')
autoplay=(params.shift()!='false');
var show=true;
if (params[0]=='showcontrols'||params[0]=='true'||params[0]=='false')
show=(params.shift()!='false');
var extras="";
while (params[0]!=undefined)
extras+="<param name='"+params.shift()+"' value='"+params.shift()+"'> ";
this.loadURL(place,id,type,url,width,height,autoplay,show,extras);
}
if (config.options.txtPlayerDefaultWidth==undefined) config.options.txtPlayerDefaultWidth="100%";
if (config.options.txtPlayerDefaultHeight==undefined) config.options.txtPlayerDefaultHeight="480"; // can't use "100%"... player height doesn't stretch right :-(
config.macros.player.typeMap={
windows: ['mms', '.asx', '.wvx', '.wmv', '.mp3'],
realone: ['rtsp', '.ram', '.rpm', '.rm', '.ra'],
quicktime: ['.mov', '.qt'],
flash: ['.swf', '.flv'],
image: ['.jpg', '.gif', '.png'],
iframe: ['.htm', '.html', '.shtml', '.php']
};
config.macros.player.loadURL=function(place,id,type,url,width,height,autoplay,show,extras) {
if (id==undefined) id="tiddlyPlayer";
if (!width) var width=config.options.txtPlayerDefaultWidth;
if (!height) var height=config.options.txtPlayerDefaultHeight;
if (url && (!type || !type.length || type=="auto")) { // determine type from URL
u=url.toLowerCase();
var map=config.macros.player.typeMap;
for (var t in map) for (var i=0; i<map[t].length; i++)
if (u.indexOf(map[t][i])!=-1) var type=t;
}
if (!type || !config.macros.player.html[type]) var type="none";
if (!url) var url="";
if (show===undefined) var show=true;
if (!extras) var extras="";
if (type=="none" && url.trim().length) type="iframe"; // fallback to iframe for unrecognized media types
// adjust parameter values for player-specific embedded HTML
switch (type) {
case "windows":
autoplay=autoplay?"1":"0"; // player-specific param value
show=show?"1":"0"; // player-specific param value
break;
case "realone":
autoplay=autoplay?"true":"false";
show=show?"block":"none";
height-=show?60:0; // leave room for controls
break;
case "quicktime":
autoplay=autoplay?"true":"false";
show=show?"true":"false";
break;
case "image":
show=show?"block":"none";
break;
case "iframe":
show=show?"block":"none";
break;
}
// create containing div for player HTML
// and add or replace player in TW DOM structure
var newplayer = document.createElement("div");
newplayer.playerType=type;
newplayer.setAttribute("id",id+"_div");
var existing = document.getElementById(id+"_div");
if (existing && !place) place=existing.parentNode;
if (!existing)
place.appendChild(newplayer);
else {
if (place==existing.parentNode) place.replaceChild(newplayer,existing)
else { existing.parentNode.removeChild(existing); place.appendChild(newplayer); }
}
var html=config.macros.player.html[type];
html=html.replace(/%i%/mg,id);
html=html.replace(/%w%/mg,width);
html=html.replace(/%h%/mg,height);
html=html.replace(/%u%/mg,url);
html=html.replace(/%a%/mg,autoplay);
html=html.replace(/%s%/mg,show);
html=html.replace(/%x%/mg,extras);
newplayer.innerHTML=html;
}
//}}}
// // Player-specific API functions: isReady(id), isPlaying(id), toggleControls(id), showControls(id,flag)
//{{{
// status values:
// Windows: 0=Undefined, 1=Stopped, 2=Paused, 3=Playing, 4=ScanForward, 5=ScanReverse
// 6=Buffering, 7=Waiting, 8=MediaEnded, 9=Transitioning, 10=Ready, 11=Reconnecting
// RealOne: 0=Stopped, 1=Contacting, 2=Buffering, 3=Playing, 4=Paused, 5=Seeking
// QuickTime: 'Waiting', 'Loading', 'Playable', 'Complete', 'Error:###'
// Flash: 0=Loading, 1=Uninitialized, 2=Loaded, 3=Interactive, 4=Complete
config.macros.player.isReady=function(id)
{
var d=document.getElementById(id+"_div"); if (!d) return false;
var p=document.getElementById(id); if (!p) return false;
if (d.playerType=='windows') return !((p.playState==0)||(p.playState==7)||(p.playState==9)||(p.playState==11));
if (d.playerType=='realone') return (p.GetPlayState()>1);
if (d.playerType=='quicktime') return !((p.getPluginStatus()=='Waiting')||(p.getPluginStatus()=='Loading'));
if (d.playerType=='flash') return (p.ReadyState>2);
return true;
}
config.macros.player.isPlaying=function(id)
{
var d=document.getElementById(id+"_div"); if (!d) return false;
var p=document.getElementById(id); if (!p) return false;
if (d.playerType=='windows') return (p.playState==3);
if (d.playerType=='realone') return (p.GetPlayState()==3);
if (d.playerType=='quicktime') return (p.getPluginStatus()=='Complete');
if (d.playerType=='flash') return (p.ReadyState<4);
return false;
}
config.macros.player.showControls=function(id,flag) {
var d=document.getElementById(id+"_div"); if (!d) return false;
var p=document.getElementById(id); if (!p) return false;
if (d.playerType=='windows') { p.ShowControls=flag; p.ShowStatusBar=flag; }
if (d.playerType=='realone') { alert('show/hide controls not available'); }
if (d.playerType=='quicktime') // if player not ready, retry in one second
{ if (this.isReady(id)) p.setControllerVisible(flag); else setTimeout('config.macros.player.showControls("'+id+'",'+flag+')',1000); }
if (d.playerType=='flash') { alert('show/hide controls not available'); }
}
config.macros.player.toggleControls=function(id) {
var d=document.getElementById(id+"_div"); if (!d) return false;
var p=document.getElementById(id); if (!p) return false;
if (d.playerType=='windows') var flag=!p.ShowControls;
if (d.playerType=='realone') var flag=true; // TBD
if (d.playerType=='quicktime') var flag=!p.getControllerVisible();
if (d.playerType=='flash') var flag=true; // TBD
this.showControls(id,flag);
}
config.macros.player.fullScreen=function(id) {
var d=document.getElementById(id+"_div"); if (!d) return false;
var p=document.getElementById(id); if (!p) return false;
if (d.playerType=='windows') p.DisplaySize=3;
if (d.playerType=='realone') p.SetFullScreen();
if (d.playerType=='quicktime') { alert('full screen not available'); }
if (d.playerType=='flash') { alert('full screen not available'); }
}
//}}}
// // Player HTML
//{{{
// placeholder (no player)
config.macros.player.html.none=' \
<table id="%i%" width="%w%" height="%h%" style="background-color:#111;border:0;margin:0;padding:0;"> \
<tr style="background-color:#111;border:0;margin:0;padding:0;"> \
<td width="%w%" height="%h%" style="background-color:#111;color:#ccc;border:0;margin:0;padding:0;text-align:center;"> \
\
%u% \
\
</td></tr></table>';
//}}}
//{{{
// JPG/GIF/PNG still images
config.macros.player.html.image='\
<a href="%u%" target="_blank"><img width="%w%" height="%h%" style="display:%s%;" src="%u%"></a>';
//}}}
//{{{
// IFRAME web page viewer
config.macros.player.html.iframe='\
<iframe id="%i%" width="%w%" height="%h%" style="display:%s%;background:#fff;" src="%u%"></iframe>';
//}}}
//{{{
// Windows Media Player
// v7.1 ID: classid=CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6
// v9 ID: classid=CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95
config.macros.player.html.windows=' \
<object id="%i%" width="%w%" height="%h%" style="margin:0;padding:0;width:%w%;height:%h%px;" \
classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" \
codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715" \
align="baseline" border="0" \
standby="Loading Microsoft Windows Media Player components..." \
type="application/x-oleobject"> \
<param name="FileName" value="%u%"> <param name="ShowControls" value="%s%"> \
<param name="ShowPositionControls" value="1"> <param name="ShowAudioControls" value="1"> \
<param name="ShowTracker" value="1"> <param name="ShowDisplay" value="0"> \
<param name="ShowStatusBar" value="1"> <param name="AutoSize" value="1"> \
<param name="ShowGotoBar" value="0"> <param name="ShowCaptioning" value="0"> \
<param name="AutoStart" value="%a%"> <param name="AnimationAtStart" value="1"> \
<param name="TransparentAtStart" value="0"> <param name="AllowScan" value="1"> \
<param name="EnableContextMenu" value="1"> <param name="ClickToPlay" value="1"> \
<param name="InvokeURLs" value="1"> <param name="DefaultFrame" value="datawindow"> \
%x% \
<embed src="%u%" style="margin:0;padding:0;width:%w%;height:%h%px;" \
align="baseline" border="0" width="%w%" height="%h%" \
type="application/x-mplayer2" \
pluginspage="http://www.microsoft.com/windows/windowsmedia/download/default.asp" \
name="%i%" showcontrols="%s%" showpositioncontrols="1" \
showaudiocontrols="1" showtracker="1" showdisplay="0" \
showstatusbar="%s%" autosize="1" showgotobar="0" showcaptioning="0" \
autostart="%a%" autorewind="0" animationatstart="1" transparentatstart="0" \
allowscan="1" enablecontextmenu="1" clicktoplay="0" invokeurls="1" \
defaultframe="datawindow"> \
</embed> \
</object>';
//}}}
//{{{
// RealNetworks' RealOne Player
config.macros.player.html.realone=' \
<table width="%w%" style="border:0;margin:0;padding:0;"><tr style="border:0;margin:0;padding:0;"><td style="border:0;margin:0;padding:0;"> \
<object id="%i%" width="%w%" height="%h%" style="margin:0;padding:0;" \
CLASSID="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA"> \
<PARAM NAME="CONSOLE" VALUE="player"> \
<PARAM NAME="CONTROLS" VALUE="ImageWindow"> \
<PARAM NAME="AUTOSTART" Value="%a%"> \
<PARAM NAME="MAINTAINASPECT" Value="true"> \
<PARAM NAME="NOLOGO" Value="true"> \
<PARAM name="BACKGROUNDCOLOR" VALUE="#333333"> \
<PARAM NAME="SRC" VALUE="%u%"> \
%x% \
<EMBED width="%w%" height="%h%" controls="ImageWindow" type="audio/x-pn-realaudio-plugin" style="margin:0;padding:0;" \
name="%i%" \
src="%u%" \
console=player \
maintainaspect=true \
nologo=true \
backgroundcolor=#333333 \
autostart=%a%> \
</OBJECT> \
</td></tr><tr style="border:0;margin:0;padding:0;"><td style="border:0;margin:0;padding:0;"> \
<object id="%i%_controls" width="%w%" height="60" style="margin:0;padding:0;display:%s%" \
CLASSID="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA"> \
<PARAM NAME="CONSOLE" VALUE="player"> \
<PARAM NAME="CONTROLS" VALUE="All"> \
<PARAM NAME="NOJAVA" Value="true"> \
<PARAM NAME="MAINTAINASPECT" Value="true"> \
<PARAM NAME="NOLOGO" Value="true"> \
<PARAM name="BACKGROUNDCOLOR" VALUE="#333333"> \
<PARAM NAME="SRC" VALUE="%u%"> \
%x% \
<EMBED WIDTH="%w%" HEIGHT="60" NOJAVA="true" type="audio/x-pn-realaudio-plugin" style="margin:0;padding:0;display:%s%" \
controls="All" \
name="%i%_controls" \
src="%u%" \
console=player \
maintainaspect=true \
nologo=true \
backgroundcolor=#333333> \
</OBJECT> \
</td></tr></table>';
//}}}
//{{{
// QuickTime Player
config.macros.player.html.quicktime=' \
<OBJECT ID="%i%" WIDTH="%w%" HEIGHT="%h%" style="margin:0;padding:0;" \
CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" \
CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab"> \
<PARAM name="SRC" VALUE="%u%"> \
<PARAM name="AUTOPLAY" VALUE="%a%"> \
<PARAM name="CONTROLLER" VALUE="%s%"> \
<PARAM name="BGCOLOR" VALUE="#333333"> \
<PARAM name="SCALE" VALUE="aspect"> \
<PARAM name="SAVEEMBEDTAGS" VALUE="true"> \
%x% \
<EMBED name="%i%" WIDTH="%w%" HEIGHT="%h%" style="margin:0;padding:0;" \
SRC="%u%" \
AUTOPLAY="%a%" \
SCALE="aspect" \
CONTROLLER="%s%" \
BGCOLOR="#333333" \
EnableJavaSript="true" \
PLUGINSPAGE="http://www.apple.com/quicktime/download/"> \
</EMBED> \
</OBJECT>';
//}}}
//{{{
// Flash Player
config.macros.player.html.flash='\
<object id="%i%" width="%w%" height="%h%" style="margin:0;padding:0;" \
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" \
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"> \
<param name="movie" value="%u%"> \
<param name="quality" value="high"> \
<param name="SCALE" value="exactfit"> \
<param name="bgcolor" value="333333"> \
%x% \
<embed name="%i%" src="%u%" style="margin:0;padding:0;" \
height="%h%" width="%w%" quality="high" \
pluginspage="http://www.macromedia.com/go/getflashplayer" \
type="application/x-shockwave-flash" scale="exactfit"> \
</embed> \
</object>';
//}}}
<<player id=001 flash content\Access\100200-QueriesInAccess\00007-QueriesInAccess_controller.swf 640 480>>
!Demonstration:
<<player id=001 flash content\Java\059000-ReadingFromFiles\059-DemoReadingFromFiles\059-DemoReadingFromFiles_controller.swf 640 480>>
__''Code Needed For Demo:''__
{{{
import java.util.Scanner; //Needed for Scanner class
import java.io.*; //Needed for file and IOException
//This program reads data from a file
public class crow3_059_31FlavorsDemo
{
public static void main(String [] args) throws IOException
{
//Declare Variables
int intChoice; //For program choice
String strFileName; //For file name
String strLine; //For line of text
double dblNumber; //For the number in the file
//Create a Scanner object for keyboard input
Scanner keyboard = new Scanner(System.in);
System.out.println("Enter 1 to see 1 Flavor from 31Flavors.txt.");
System.out.println("Enter 2 to see 31 Flavors from 31Flavors.txt.");
System.out.println("Enter 3 to see 31 Numbers from 31Numbers.txt.");
System.out.print("Enter selection here: ");
intChoice = keyboard.nextInt();
if (intChoice == 1)
{
//Get the file name
System.out.print("Enter the name of a file (31Flavors.txt): ");
keyboard.nextLine(); //Use to fix memory buffer problem
strFileName = keyboard.nextLine();
//Create a file object and create a Scanner object to read the file.
File file = new File(strFileName);
Scanner inputFile = new Scanner(file);
//Read the first line from the file
strLine = inputFile.nextLine();
//Display the line
System.out.println("The first line in the file is: ");
System.out.println(strLine);
//Close the file
inputFile.close();
}
else if (intChoice == 2)
{
//Get the file name
System.out.print("Enter the name of a file (31Flavors.txt): ");
keyboard.nextLine(); //Used to fix memory buffer problem
strFileName = keyboard.nextLine();
//Create a file object and create a Scanner object to read the file.
File file = new File(strFileName);
Scanner inputFile = new Scanner(file);
while (inputFile.hasNext())
{
//Read the next line of text in the file
strLine = inputFile.nextLine();
//Display the last line read
System.out.println(strLine);
}
//Close the file
inputFile.close();
}
else
{
//Get the file name
System.out.print("Enter the name of a file (31Numbers.txt): ");
keyboard.nextLine(); //Used to fix memory buffer problem
strFileName = keyboard.nextLine();
//Create a file object and create a Scanner object to read the file.
File file = new File(strFileName);
Scanner inputFile = new Scanner(file);
while (inputFile.hasNext())
{
//Read the next line of text in the file
dblNumber = inputFile.nextDouble();
//Display the last line read
System.out.println(dblNumber);
}
//Close the file
inputFile.close();
}
}
}
}}}
*[[Student Demonstration Code File(Complete)|content\Java\059000-ReadingFromFiles\Lesson\Demo\crow3_059_31FlavorsDemo.java]] - Click the link for a file that contains the code.
[[059-31Flavors.txt|content\Java\059000-ReadingFromFiles\Lesson\Demo\059-31Flavors.txt]] - - This goes in the Java project folder.
[[059-31Numbers.txt|content\Java\059000-ReadingFromFiles\Lesson\Demo\059-31Numbers.txt]] - - This goes in the Java project folder.
!Notes
<<player id=002 flash content\Java\059000-ReadingFromFiles\059-NotesReadingFromFiles\059-NotesReadingFromFiles_controller.swf 640 480>>
*Power Point Notes
!Activity
Ex:
<<player id=003 flash content\Java\059000-ReadingFromFiles\060-ActAlbumsOfTheYear\060-ActAlbumsOfTheYear_controller.swf 640 480>>
*(060)Albums Of The Year
<<player id=001 flash content\Access\100300-GeneratingReports\00008-GeneratingReports_controller.swf 640 480>>
!Demonstration:
<<player id=001 flash content\Java\074000-ValueReturningMethods\074-DemoValueReturningMethods\074-DemoValueReturningMethods_controller.swf 640 480>>
__''Code Needed For Demo:''__
{{{
//This program uses 3 methods that return values
//This program uses a method to find the Circle Area, Cylinder Surface Area, and Cylinder Volume
import java.util.Scanner; //Needed for Scanner class
public class crow3_074_CylinderMethodDemo
{
public static void main(String [] args)
{
//Declare Variables
double dblHeight = 0.0;
double dblRadius = 0;
double dblCircleArea;
double dblCylinderSurfaceArea;
double dblCylinderVolume;
//Create a Scanner object for keyboard input
Scanner keyboard = new Scanner(System.in);
//Introduction to this demo program
System.out.println("Welcome to the Cylinder Methods Program");
System.out.println("-------------------------------------------");
System.out.println(" ");
//Get the height and radius from the user
System.out.print("Enter the height of the cylinder: ");
dblHeight = keyboard.nextDouble();
System.out.print("Enter the radius of the cylinder: ");
dblRadius = keyboard.nextDouble();
//Using the circleArea( ) method to calculate the area of the circle
dblCircleArea = circleArea(dblRadius);
//Using the cylinderSA ( ) method to calculate the surface area of the cylinder
dblCylinderSurfaceArea = cylinderSA(dblRadius, dblHeight);
//Use the cylinderVolume ( ) method to calculate the volume of the cylinder
dblCylinderVolume = cylinderVolume(dblRadius, dblHeight);
//Display the calculations to the user
System.out.println(" ");
System.out.println("------------------------------");
System.out.println("Circle Area: " + dblCircleArea);
System.out.println("Cylinder Surface Area: " + dblCylinderSurfaceArea);
System.out.println("Cylinder Volume: " + dblCylinderVolume);
}
//This method calculates the Circle Area
public static double circleArea(double dblPRadius)
{
//Declare variable
double dblArea;
//Calculate Circle area
dblArea = Math.PI * Math.pow(dblPRadius, 2);
//return the Area to dblCircleArea
return dblArea;
}
//This method calcultes the Surface Area of the Cylinder
public static double cylinderSA(double dblPRadius, double dblPHeight)
{
//Declare variable
double dblSurfaceArea;
//Calculate surface area
dblSurfaceArea = (2 * Math.PI * dblPRadius * dblPHeight) + (2 * Math.PI * Math.pow(dblPRadius, 2));
//Return the dblSurfaceArea to the main method
return dblSurfaceArea;
}
//This method calcultes the Volume of the Cylinder
public static double cylinderVolume(double dblPRadius, double dblPHeight)
{
//Declare variable
double dblVolume;
//Calculate surface area
dblVolume = (Math.PI * Math.pow(dblPRadius, 2)) * dblPHeight;
//Return the dblSurfaceArea to the main method
return dblVolume;
}
}
}}}
!Demonstration:
<<player id=001 flash content\Java\024000-DemoTestReview\024-DemoTestReview\024-DemoTestReview_controller.swf 640 480>>
*(024)Posters Program
{{{
/*
* This program is for a review session to prepare students for their upcoming test.
*
*/
import javax.swing.JOptionPane;
public class crow3_024_PostersReview
{
public static void main(String[] args)
{
//Declare variables
String strInput; //Used for reading input
double dblStatueHeight;
double dblCylinderRadius;
double dblCubeArea;
double dblCylinderArea;
double dblDifferenceArea;
double dblPosterWidth;
double dblPosterLength;
double dblPosterArea;
double dblNumPostersNeeded;
//Display your name
JOptionPane.showMessageDialog(null, "Name: John Smith Period: 3");
//Get the height of the Statue
strInput = JOptionPane.showInputDialog("How tall are the statues?");
dblStatueHeight = Double.parseDouble(strInput);
//Calculate Radius of Cylinder Statue
dblCylinderRadius = dblStatueHeight / 2;
//Calculate the Surface Area of the Cylinder Statue
dblCylinderArea = (Math.PI * Math.pow(dblCylinderRadius, 2.0)) + (2 * Math.PI * dblCylinderRadius * dblStatueHeight);
//Calculate the Surface Area of the Cube Statue
dblCubeArea = 5 * Math.pow(dblStatueHeight, 2.0);
//Calculate the difference
dblDifferenceArea = dblCubeArea - dblCylinderArea;
//Display results
JOptionPane.showMessageDialog(null, "The Surface Area for the Cube statue is " + dblCubeArea + ".");
JOptionPane.showMessageDialog(null, "The Surface Area for the Cylinder statue is " + dblCylinderArea + ".");
JOptionPane.showMessageDialog(null, "The Cube statue has " + dblDifferenceArea + " more square feet than the Cylinder statue.");
//Get the length of the poster
strInput = JOptionPane.showInputDialog("Enter the poster length: ");
dblPosterLength = Double.parseDouble(strInput);
//Get the width of the poster
strInput = JOptionPane.showInputDialog("Enter the poster width: ");
dblPosterWidth = Double.parseDouble(strInput);
//Calculate the area of the posters and display results
dblPosterArea = dblPosterWidth * dblPosterLength;
JOptionPane.showMessageDialog(null, "The Poster Area is " + dblPosterArea + " feet squared.");
//Calculate the extra number of posters needed to cover the cube
dblNumPostersNeeded = dblDifferenceArea / dblPosterArea;
JOptionPane.showMessageDialog(null, "You will need " + dblNumPostersNeeded + " extra posters to cover the cube statue.");
//End the program
System.exit(0);
}
}
}}}
!Test Review:
<<player id=001 flash content\Java\041000-ExamReview\041C-ExamPreparation\041C-ExamPreparation_controller.swf 640 480>>
__''Code From Review Session:''__
{{{
import java.util.Scanner;
import java.text.DecimalFormat;
public class crow1_041C_TriangleReview
{
public static void main(String []args)
{
//Declare variables
double dblWidth;
double dblLength;
double dblArea;
int intCategory = 0;
double dblBuildingCost = 0;
//Create a Scanner object
Scanner keyboard = new Scanner(System.in);
System.out.print("Please enter the length: ");
dblLength = keyboard.nextDouble();
System.out.print("Please enter the width: ");
dblWidth = keyboard.nextDouble();
//Calculate Area of triangle
dblArea = dblWidth * dblLength * .5;
//Use If Statements to determine the category of the triangle
if (dblArea <= 20)
{
intCategory = 1;
}
else if (dblArea <= 100)
{
intCategory = 2;
}
else if (dblArea > 100)
{
intCategory = 3;
}
//Use Switch statements to determine price
switch(intCategory)
{
case 1:
dblBuildingCost = 1000.00;
break;
case 2:
dblBuildingCost = 100000.00;
break;
case 3:
dblBuildingCost = 1000000.00;
break;
default:
dblBuildingCost = 1.00;
}
if ((dblWidth >= (2*dblLength)) || (dblLength >= (2*dblWidth)))
{
dblBuildingCost = dblBuildingCost + 100000.00;
System.out.println("You've been charged an extra $100,000 due to a side" +
"being twice the other side.");
}
//Create Decimal Formatter object
DecimalFormat formatter = new DecimalFormat("$#,##0.00");
//Display price to customer
System.out.println("Triangle Width: " + dblWidth);
System.out.println("Triangle Length: " + dblLength);
System.out.println("Triangle Area: " + dblArea);
System.out.println("Total Cost: " +formatter.format(dblBuildingCost));
}
}
}}}
*[[Student Demonstration File|content\Java\041000-ExamReview\Lesson\crow1_041C_TriangleReview.java]] - Click the link for a file that contains the code.
*[[041C-Triangle Review Program|content\Java\041000-ExamReview\Lesson\041C-ReviewForTest.doc]] - This should be shown on the overhead projector.
<<player id=001 flash content\Finance\000003-RuleOf72\RuleOf72_controller.swf 640 480>>
<<player id=001 flash content\FedIncomeTax\00600-SelfEmploymentTax\06-SelfEmploymentTax_controller.swf 640 480>>
!!Self-Employment Tax
*The self-employment tax is levied to get money for federal programs.
*FICA Tax (15.3%):
**OASDI (Old Age, Survivors, and Diability Benefits) - 12.4%
***There is a cap on this. You can't be taxed on more than $106,800 of your income.
**Medicare - 2.9%
***There is no cap on this.
*The government gives people who are self-employed a break. They give you a "deemed deduction."
**__Deemed Deduction__ = 7.65% * Self Employment Income
**This is just another way of saying that you are taxed on 92.35% of your self employment income.
*Steps to Calculating the FICA tax:
#Find Net Earnings
**Self Income * .9235 = __Net Earnings__
#Calculate Your FICA tax
**Net Earnings * 12.4% = OASDI tax
**Net Earnings * 2.9% = Medicare tax
#Find your Total Self Employment Tax
**OASDI tax + Medicare Tax = __Total Self Employment Tax__
#(Self Employmen Tax / 2) = __Deduction from Gross Income__
Ex:
{{{
45,000 - Gross Income from Self-Employment
- 15,000 - Business Expense Deductions
--------------------------------------------------------------------
30,000 - Net Self-Employment Income
- 2,295 - Deemed Deduction (30,000 * 7.65%)
--------------------------------------------------------------------
27,705 - Net Earnings From Self-Employment (30,000 * 92.35%)
27,705 * 12.4% = 3,435.42
27,705 * 2.9% = 803.45
------------------------------
4,238.87
4238.87 / 2 = 2,119.43 (Deduction From Gross Income)
}}}
*If earnings less than $400 there is not self-employment tax.
*Wages to a child under 18 (an allowance) from a parent are not subject to the self-employment tax.
*As mentioned, the government taxes you up to $106,800.
**$106,800 * 12.4% = $13,444
What if you make $106,800 over 40 years?
*$13,444 a year, 40 years, interest rate = 12%
*You'd have over $10,000,000 dollars!
*Usually employees pay 7% of their SS.
*The employer pics up the rest(the other 7%).
*This is why employers LOVE independent contractors:
**Independent contractors have to pay ALL of the Social Security tax.
!Demonstration:
<<player id=001 flash content\Java\051000-SentinelValue\051-DemoSentinelValue\051-DemoSentinelValue_controller.swf 640 480>>
__''Code Needed For Demo:''__
{{{
//This program uses an accumulator for adding the total
//This program also uses a sentinel value for terminating the loop
import java.util.Scanner; //Needed for the Scanner class
public class crow3_051_TheSentinel
{
public static void main(String [] main)
{
//Declare variables
int intNumber;
int intTotal = 0; //This accumulator is initialized with a starting value.
//Creating a Scanner object to read input
Scanner keyboard = new Scanner(System.in);
//Displaying instructions
System.out.println("Enter a number and the program will add it to a running total.");
System.out.println("Enter -1 when finished.");
System.out.println(" ");
//Get the first number to add
System.out.print("Enter a number or -1 to end: ");
intNumber = keyboard.nextInt();
//Accumulate points until -1 is entered.
//-1 is the sentinel value, the value which causes the loop to terminate.
while (intNumber != -1)
{
//Add intNumber to intTotal
//intTotal is the accumulator, otherwise known as a running total
intTotal += intNumber;
//Get the next number
System.out.print("Enter a number or -1 to end: ");
intNumber = keyboard.nextInt();
}
//Display the accumulator (the running total)
System.out.println("The total of the numbers entered is " + intTotal);
}
}
}}}
*[[Student Demonstration File(Complete)|content\Java\051000-SentinelValue\Lesson\Demo\crow3_051_TheSentinel.java]] - Click the link for a file that contains the code.
!Notes
<<player id=002 flash content\Java\051000-SentinelValue\051-NotesSentinelValue\051-NotesSentinelValue_controller.swf 640 480>>
*Power Point Notes
!Activity
Ex:
<<player id=003 flash content\Java\051000-SentinelValue\052-ActShoppingSpree\052-ActShoppingSpree_controller.swf 640 480>>
*(052)Shopping Spree Program
<<tabs txtMainTab "Tags" "All tags" TabTags "Timeline" "Timeline" TabTimeline "All" "All tiddlers" TabAll "More" "More lists" TabMore>>
<<player id=001 flash content\Finance\000001-SimpleInterest\ClassOfCrow-SimpleInterest_controller.swf 640 480>>
<<player id=001 flash content\Finance\005100-BA2PlusCompoundInterest\BA2Plus-SimpleCompoundInterest_controller.swf 640 480>>
<<player id=001 flash content\FedIncomeTax\03100-SocialSecurity\031-SocialSecurity_controller.swf 640 480>>
!Retirement Income(Social Security)
*Benefits from retirement systems of other countries IS taxed.
Is Social Security taxable?.... It depends. You have to look at your provisional income. What is __provisional income__?
*Provisional Income includes the following:
**Half of your social security benefits.
**Modified Adjusted Gross Income. This includes:
***Interest on Tax-Exempt Bonds.
***Interest on U.S. savings bonds.
***Employer adoption assistance.
***Interest deduction on high education loans.
***Deduction for qualified education expenses.
***Foreign income.
****(You normally exclude that stuff but it has to be factored in here)
*__''PROVISIONAL INCOME''__ = modified AGI + (Social Security Benefits / 2)
There are 2 thresholds with provisional income:
#First Threshold:
**$25,000 if you are single
**$32,000 if you are married filing jointly
#Second Threshold:
**$34,000 if you are single
**$44,000 if you are married filing jointly
''__First Threshold:__''
*Social Security __IS__ taxed when __PROVISIONAL INCOME__ is:
**greater than $25,000(Base Amount) if you are single.
**greater than $32,000(Base Amount) if you are married filing jointly.
Now, how much Social Security do you include? To figure that out, you have to figure out which one of the following is less:
#__50% of Excess__
**Provisional Income - Base Amount = Excess
**(Excess / 2) = __50% of Excess__
#__50% of Social Security Benefit__
**(Social Security Benefits)/2 = __50% of Social Security Benefits__
So, include whichever is the less to your Gross Income:
*__50% of Excess__
*__50% of Social Security Benefits__
''__Second Threshold:__''
*Social Security __IS__ taxed ''EVEN MORE'' when __PROVISIONAL INCOME__ is:
**greater than $34,000(Base Amount) if you are single.
**greater than $44,000(Base Amount) if you are married filing jointly.
Include the lesser of the following to Gross Income:
#85% of Social Security Benefits
#The lesser of:
##85% * (Provisional Income - Threshold) + (Social Security taxable according to First Threshold)
##85% * (Provisional Income - Threshold) + $4500(single) or +$6000(married filing jointly)
*Married Couples filing separately get the shaft. They must include in their grosss income the lesser of:
**85% of Social Security benefits. OR....
**85% of their provisional income.
<<player id=001 flash content\Access\100100-FiltersSorts\100100-FiltersSorts_controller.swf 640 480>>
<<player id=001 flash content\Finance\000020-Stocks01\00002-Stocks01_controller.swf 640 480>>
<<player id=001 flash content\Finance\000080-Stocks02\000080-Stocks02_controller.swf 640 480>>
<<player id=001 flash content\Finance\000080-Stocks03\000080-Stocks03_controller.swf 640 480>>
/*{{{*/
/*Bleach Theme for TiddlyWiki*/
/*Design and CSS by Saq Imtiaz*/
/*Version 1.0*/
/*}}}*/
/*{{{*/
/***
!General
***/
body {
background: #fff;
}
#contentWrapper{
margin: 2.5em auto;
width:850px;
line-height: 1.6em;
border:1px solid #999;
font-size: 11px;
font-family: Lucida Grande, Tahoma, Arial, Helvetica, sans-serif;
color: #555;height:1%;
}
.clearAll {clear:both;}
.tagClear {clear:none;}
/*}}}*/
/*{{{*/
/***
!Header
***/
#header {background:#fff; border-bottom:1px solid #999;padding: 2.5em 2em 1.6em 2em; height:1%;
}
.siteTitle {
font-family: 'Trebuchet MS' sans-serif;
font-weight: bold;
font-size: 32px;
color: #EF680E;
background-color: #FFF;
}
.siteSubtitle {
font-size: 1.0em;
display:block;
color: #999999; margin-top:0.5em !important; margin-top:1em; margin-left:3em;
}
#topMenu { positon:relative; float:right; display:inline; margin-right:2em;}
#topMenu br {display:none; }
#topMenu { background: #fff; color:#000;padding: 1em 1em;}
#topMenu a, #topMenu .tiddlyLink, #topMenu .button {margin:0 0.5em; color:#666;}
/*}}}*/
/*{{{*/
/***
!displayArea
***/
#displayArea {margin-left:1.35em; margin-right:16.3em; margin-top:0; padding-top:1em; padding-bottom:10px;}
/*}}}*/
/*{{{*/
/***
!Sidebar
***/
#sidebar {position:relative;float:right; line-height: 1.4em; border-left:0px solid#000; display:inline; background:#fff; right:0;
width: 16em;}
/***
!SidebarOptions
***/
#sidebarOptions {padding-left:0.5em; border-left:1px solid #999;padding-top:1em;}
#sidebarOptions a {
color:#999;
text-decoration: none;}
#sidebarOptions a:hover, #sidebarOptions .button:active {
color:#333;
background-color: #fff;border:1px solid #fff;
}
#sidebarOptions input {border:1px solid #999; width:10em;}
/***
!SidebarTabs
***/
#sidebarTabs {border-left:1px solid #999;}
#sidebarTabs .tabContents {background:#fff;}
#sidebarTabs .tabContents .tiddlyLink, #sidebarTabs .tabContents .button{color:#999;}
#sidebarTabs .tabContents .tiddlyLink:hover,#sidebarTabs .tabContents .button:hover{color:#333;background:#fff;border:none;}
#sidebarTabs .tabContents .button:hover, #sidebarTabs .tabContents .highlight, #sidebarTabs .tabContents .marked, #sidebarTabs .tabContents a.button:active{color:#333;background:#fff}
.tabSelected{color:#fff; background:#999;}
.tabUnselected {
background: #ccc;
}
.tabSelected, .tabSelected:hover {
color: #fff;
background: #999;
border: solid 1px #999;
padding-bottom:1px;
}
#sidebarTabs .tabUnselected:hover { border-bottom: none;padding-bottom:3px;color:#4F4B45}
.tabUnselected {
color: #999;
background: #eee;
border: solid 1px #ccc;
padding-bottom:1px;
}
#sidebarTabs .tabUnselected { border-bottom: none;padding-bottom:3px;}
#sidebarTabs .tabSelected{padding-bottom:3px;}
#sidebarOptions .sliderPanel {
background: #fff; border:none;
font-size: .9em;
}
#sidebarOptions .sliderPanel a {font-weight:normal; }
#sidebarOptions .sliderPanel input {border:1px solid #999;width:auto;}
#sidebarOptions .sliderPanel .txtOptionInput {border:1px solid #999;width:9em;}
#sidebarTabs .tabContents {border-right:0; border-left:0; border-bottom:1px solid#999; padding-left:4px;}
.listLink,#sidebarTabs .tabContents {line-height:1.5em;}
.listTitle {color:#666;}
#sidebarTabs .tabUnselected:hover { border-bottom: none;padding-bottom:3px;color:#4F4B45}
#sidebarTabs .txtMoreTab .tabContents {border-left:1px solid #999;}
#sidebarTabs .txtMainTab .tabContents li a{font-weight:bold;}
/*}}}*/
/*{{{*/
.title {color:#EF680E;}
.subtitle, .subtitle a { color: #999999; font-size: 1em;margin:0.2em; font-variant: small-caps;}
.shadow .title{color:#999;}
.selected .toolbar a {color:#999999;}
.selected .toolbar a:hover {color:#333; background:transparent;border:1px solid #fff;}
.toolbar .button:hover, .toolbar .highlight, .toolbar .marked, .toolbar a.button:active{color:#333; background:transparent;border:1px solid #fff;}
* html .viewer pre {
margin-left: 0em;
}
* html .editor textarea, * html .editor input {
width: 98%;
}
a,#sidebarOptions .sliderPanel a{
color:#EF680E;
text-decoration: none;
}
a:hover,#sidebarOptions .sliderPanel a:hover {
color:#EF680E;
background-color: #fff;
border-bottom:1px dotted #EF680E;
}
.viewer .button, .editorFooter .button{
color: #555;
border: 1px solid #EF680E;
}
.viewer .button:hover,
.editorFooter .button:hover{
color: #fff;
background: #EF680E;
border-color: #EF680E;
}
.viewer .button:active, .viewer .highlight,.editorFooter .button:active, .editorFooter .highlight{color:#fff; background:#DF691B;border-color:#DF691B;}
#topMenu a, #topMenu .button {
padding: 20px 10px; border:none; font-weight:bold;
}
#topMenu a:link{
text-decoration: none;
}
#topMenu a:hover, #topMenu .button:hover {
background-color: #fff;
color:#EF680E;
border:none;
}
.tagging, .tagged {
border: 1px solid #eee;
background-color: #F7F7F7;
}
.selected .tagging, .selected .tagged {
background-color: #eee;
border: 1px solid #BFBAB3;
}
.tagging .listTitle, .tagged .listTitle {
color: #bbb;
}
.selected .tagging .listTitle, .selected .tagged .listTitle {
color: #666;
}
.tagging .button, .tagged .button {
color:#aaa;
}
.selected .tagging .button, .selected .tagged .button {
color:#BFBAB3;
}
.highlight, .marked {background:transparent; color:#111; border:none; text-decoration:underline;}
.tagging .button:hover, .tagged .button:hover, .tagging .button:active, .tagged .button:active {
border: none; background:transparent; text-decoration:underline; color:#333;
}
.popup {
background: #999;
border: 1px solid #999;
}
.popup li.disabled {
color: #000;
}
.popup li a, .popup li a:visited {
color: #eee;
border: none;
}
.popup li a:hover {
background: #6F6A68;
color: #fff;
border: none;
}
.tiddler {
padding-bottom: 40px;
/*border-bottom: 1px solid #999; */
}
#messageArea {
border: 4px solid #999;
background: #f5f5f5;
color: #999;
font-size:90%;
}
#messageArea a:hover { background:#f5f5f5; border:none;}
#messageArea .button{
color: #666;
border: 1px solid #CC6714;
}
#messageArea .button:hover {
color: #fff;
background: #999;
border-color: #999;
}
.viewer blockquote {
border-left: 5px solid #888;
}
.viewer table {
border: 2px solid #888;
}
.viewer th, thead td {
background: #888;
border: 1px solid #888;
color: #fff;
}
.viewer pre {
border: 1px solid #999;
background: #f5f5f5;
}
.viewer code {
color: #111; background:#f5f5f5;
}
.viewer hr {
border-top: dashed 1px #999;
}
.editor input {
border: 1px solid #888;
}
.editor textarea {
border: 1px solid #888;
}
.tabContents {background:#f7f7f7;}
h1,h2,h3,h4,h5 { color: #555; background: transparent; padding-bottom:2px; font-family: Arial, Helvetica, sans-serif; }
h1 {font-size:18px;}
h2 {font-size:16px;}
h3 {font-size: 14px;}
#contentFooter {background:#999; color:#dfdfdf; clear: both; padding: 0.5em 1em; }
#contentFooter a {
color: #dfdfdf;
border-bottom: 1px dotted #fff; font-weight:normal;
}
#contentFooter a:hover {
color: #FFFFFF;
background-color:transparent;
}
/*}}}*/
!Demonstration:
<<player id=001 flash content\Java\038000-SwitchStatements\038-DemoSwitchStatements\038-DemoSwitchStatements_controller.swf 640 480>>
!Notes
<<player id=002 flash content\Java\038000-SwitchStatements\038-NotesSwitchStatements\038-NotesSwitchStatements_controller.swf 640 480>>
*[[Power Point Notes|content\Java\038000-SwitchStatements\Lesson\038-SwitchStatements.ppt]] - Click the link for the notes.
!Activity
Ex:
<<player id=003 flash content\Java\038000-SwitchStatements\039-ActUSDAGrading\039-ActUSDAGrading_controller.swf 640 480>>
*(039)USDA Grading Program
!Operating System Stuff
*[[Installing Fonts In Windows]] - How do you install a font? Where is the fonts folder? Find out here!
!Microsoft Access 2007
*[[Intro To Access]]
*[[Sorts And Filters]]
*[[Queries In Access]]
*[[Reports In Access]]
!Demonstration:
<<player id=001 flash content\Java\003000-PrintLnMethod\003-Demo\003-Demo_controller.swf 640 480>>
__''Files or Code Needed For Demo:''__
{{{
// This is a Java program!
public class Demo
{
public static void main (String[ ] args)
{
System.out.println("This is the Demo!");
}
}
}}}
!Notes
<<player id=002 flash content\Java\003000-PrintLnMethod\003-Notes\003-Notes_controller.swf 640 480>>
!Activity
Ex:
<<player id=003 flash content\Java\003000-PrintLnMethod\004-Activity\004-Activity_controller.swf 640 480>>
*(004)Best Poem Ever!
!Homework:
*Students should this program at home for homework.
!Demonstration:
<<player id=001 flash content\Java\001000-CommandPrompt\00G-CmdPromptDemo\CommandPrompt_controller.swf 640 480>>
!Notes
<<player id=002 flash content\Java\001000-CommandPrompt\00G-CmdPromptNotes\00G-CmdPromptNotes_controller.swf 640 480>>
!Activity
*(00G)Command Prompt Activity
!Homework:
*Students need to bring a flash drive to class if they have not done so already.
!Demonstration:
<<player id=001 flash content\Java\013000-MathClass\013-DemoMathClass\013-DemoMathClass_controller.swf 640 480>>
__''Files or Code Needed For Demo:''__
{{{
//This program is a demo for the Math Class
public class crow3_013_MathClassDemo
{
public static void main(String[] args)
{
//Declare variables
double dblNumber1, dblNumber2;
double dblPower1, dblPower2, dblSquareRoot1, dblSquareRoot2, dblPiNumber;
//Initialize variables
dblNumber1 = 5;
dblNumber2 = 3;
//Find the answer using exponents (5^3)
dblPower1 = Math.pow(dblNumber1, dblNumber2);
System.out.println(dblPower1);
dblPower2 = Math.pow(5.0, 3.0);
System.out.println(dblPower2);
//Find the answer using square roots
dblSquareRoot1 = Math.sqrt(dblPower1);
System.out.println(dblSquareRoot1);
dblSquareRoot2 = Math.sqrt(25);
System.out.println(dblSquareRoot2);
//Using the Pi constant
dblPiNumber = Math.PI * 1;
System.out.println(dblPiNumber);
}
}
}}}
*[[Student Demonstration Code|content\Java\013000-MathClass\Lesson\Demo\013-MathClassDemo.txt]] - Click the link for a file that contains the code.
!!Notes
<<player id=002 flash content\Java\013000-MathClass\013-NotesMathClass\013-NotesMathClass_controller.swf 640 480>>
!Activity
Ex:
<<player id=003 flash content\Java\013000-MathClass\014-ActMathClass\014-ActMathClass_controller.swf 640 480>>
*(014)Math Class Program
!Demonstration:
<<player id=001 flash content\Java\017000-ScannerClass\017-DemoScannerClass\017-DemoScannerClass_controller.swf 640 480>>
__''Code Needed For Demo:''__
{{{
//Declaring variables
String strName; //To hold the user's name
int intAge; //To hold the user's age
double dblNum; //To hold the user's height
//*Place Scanner here
//Get the user's name
System.out.print("What is your name? ");
//*method
//Get the user's age
System.out.print("What is your age? ");
//*method
//Get the user's income
System.out.print("What is your favorite number? ");
//*method
//Display the information back to the user.
System.out.println("Hello " + strName + ". Your age is " + intAge +
" and your favorite number is " + dblNum + ".");
}}}
*[[Student Demonstration File(Incomplete)|content\Java\017000-ScannerClass\Lesson\Demo\017-ScannerClassDemo.txt]] - Click the link for the incomplete code.
!Notes
<<player id=002 flash content\Java\017000-ScannerClass\017-NotesScannerClass\017-NotesScannerClass_controller.swf 640 480>>
!Activity
Ex:
<<player id=003 flash content\Java\017000-ScannerClass\018-ActAreaProgram\018-ActAreaProgram_controller.swf 640 480>>
*(018)Area Program
!Demonstration:
<<player id=001 flash content\Java\015000-StringClass\015-DemoStringClass\015-DemoStringClass_controller.swf 640 480>>
__''Code Needed For Demo:''__
{{{
//This demo demonstrates how a few of the methods in the String class library work.
public class crow3_015_StringClassDemo
{
public static void main(String[] args)
{
//Declare the main string variable "strShoebox"
String strShoebox = "Tropic Thunder was a horrible movie.";
//Declare other variables and use the string methods
String strUppercase = strShoebox.toUpperCase();
String strLowercase = strShoebox.toLowerCase();
char charSingleLetter = strShoebox.charAt(5);
int intShoeboxSize = strShoebox.length();
//Print the variables to the screen
System.out.println(strShoebox);
System.out.println(strUppercase);
System.out.println(strLowercase);
System.out.println(charSingleLetter);
System.out.println(intShoeboxSize);
}
}
}}}
*[[Student Demonstration File(Complete)|content\Java\015000-StringClass\Lesson\Demo\crow3_015_StringClassDemo.java]] - Click the link for a file that contains the code.
!Notes
<<player id=002 flash content\Java\015000-StringClass\015-NotesStringClass\015-NotesStringClass_controller.swf 640 480>>
!Activity
Ex:
<<player id=003 flash content\Java\015000-StringClass\016-ActFunnyQuote\016-ActFunnyQuote_controller.swf 640 480>>
*(016)Funny Quote Program
<<player id=001 flash content\FedIncomeTax\00100-FederalTaxA\01-FederalTaxA_controller.swf 640 480>>
!!The Tax Formula
Gross Income
- Deductions FOR AGI
{{{---------------------}}}
Adjusted Gross Income (AGI)
- Itemized Deductions OR Standard Deduction
- Personal Exemptions
{{{---------------------}}}
Taxable Income
Here is the rest of the tax formula:
Taxable Income
x Tax Rate
{{{---------------------}}}
Tax Liability
- Tax Credit and Prepayments
+ Alternative Minimum Tax (if any)
+ Employment Taxes (if any)
{{{---------------------}}}
__Net Tax Due__ OR __Refund__
Parts of the Tax Formula Have Different Names At Times:
Deductions FOR AGI:
*Class A Deductions
*"Above The Line"
*Full Straight Deductions - these are deductions that the government leaves alone.
Itemized Deduction OR Standard Deductions:
*Class B Deductions
*"Below The Line"
*These deductions usually get knocked out by AGI rules.
Click on one of the links to learn about a topic.
!Quiz Instructions
Ex:
<<player id=001 flash content\Java\019000-Unit1Quiz\019-ActBicycleRamp\019-ActBicycleRamp_controller.swf 640 480>>
*(019)Bicycle Ramp Pogram
!Practical Portion of Test:
<<player id=001 flash content\Java\025000-Unit1Test\025-TestSilverShavings\025-TestSilverShavings_controller.swf 640 480>>
*(025)Silver Shavings
!Practical Portion of Test:
<<player id=001 flash content\Java\042000-Unit2Test\042-ActShippingCostsTest\042-ActShippingCostsTest_controller.swf 640 480>>
*(042)Shipping Costs
!Exam Instructions
Ex:
<<player id=001 flash content\Java\063000-Unit3Test\063-ExamMathTutor\063-ExamMathTutor_controller.swf 640 480>>
*[[(063)Math Tutor Exam:|content\Java\063000-Unit3Test\Lesson\063-Unit3TestMathTutor.doc]]
Here is the partial code:
{{{
//Need to add import statements here
public class //CLASS NAME GOES HERE
{
public static void main (String [] args) //NEEDS CODE to enable throwing exceptions
{
//Declare Variables
int intRandomNumber1; //Needs description
int intRandomNumber2; //Needs description
int intSum; //Needs description
int intTimes; //Needs description
int userAnswer; //Needs description
int intCounter; //Needs description
//Tell the user who created the program
System.out.println("Name: (YOUR NAME), Period: (YOUR PERIOD)");
System.out.println("-------------------------------------------------------------");
System.out.println(" ");
//Create Scanner object below to read keyboard input
//NEED CODE HERE!
//Create object below to generate random numbers
//NEED CODE HERE!
System.out.print("How many problems will you answer? ");
intTimes = keyboard.nextInt();
//Need Code for a For Loop whose iterations depend upon intTimes
//NEED CODE HERE! - LOOP WILL START HERE!
//Generate two random numbers
intRandomNumber1 = //NEED CODE HERE
intRandomNumber2 = //NEED CODE HERE
//Calculate the sum of the numbers
intSum = //NEED CODE HERE!
//Ask user what the sum is
System.out.println("What is the answer?");
System.out.println(intRandomNumber1 + " + " + intRandomNumber2 + " = ");
//Get the user's answer
userAnswer = keyboard.nextInt();
//Creating a FileWriter object that appends data
//NEED CODE HERE THAT WRITES TO A FILE NAMED "LOG.TXT"
//You still have to create a PrintWriter object to write to the file
//NEED CODE HERE THAT CREATES A PRINTWRITER OBJECT THAT ACCESSES THE FILEWRITER OBJECT
//Display the user's results
if (userAnswer == intSum)
{
System.out.println("Correct!");
//NEED CODE HERE THAT will write the outcome and problem to "log.txt". For Ex: Correct! 43 + 32 = 75
}
else
{
System.out.println("Wrong Answer! Correct Answer: " + intSum);
//NEED CODE HERE that will write the outcome and problem to "log.txt". For ex: Incorrect! 43 + 32 = 75 but user entered: 72
}
//Close the file
//NEED CODE HERE!
//NEED CODE HERE! - LOOP ENDS HERE
}
}
}}}
!Demonstration:
<<player id=001 flash content\Java\005000-Variables\005-DemoVariables\005-Demo_controller.swf 640 480>>
__''Files or Code Needed For Demo:''__
{{{
// This program has 2 variables
public class crow3_005_VariableDemo
{
public static void main(String[] args)
{
// Declaring the variables
int intTimes;
String strBandname;
//Putting information into the variables
intTimes = 1;
strBandname = "Coldplay";
//Displaying output on the screen.
System.out.println("My favorite band is " + strBandname + ".");
System.out.println("I have seen this band " + intTimes + " time.");
}
}
}}}
!Notes
<<player id=002 flash content\Java\005000-Variables\005-NotesVariables\005-NotesVariables_controller.swf 640 480>>
!Activity
Ex:
<<player id=003 flash content\Java\005000-Variables\006-ActVariables\006-ActVariables_controller.swf 640 480>>
*(006)Favorite Movies Program
!Homework:
*Students should finish the program from today and yesterday if they did not complete either of them in class.
<<player id=001 flash content\Finance\000011-WealthAndInflation\000001-WealthAndInflation_controller.swf 640 480>>
What is Mail Merge? How does it work?
<<player id=001 flash content\TechTips\00002-MailMergeWord2007\00002-MailMergeWord2007_controller.swf 640 480>>
!Demonstration:
<<player id=001 flash content\Java\055000-FilesLoops\055-DemoWritingToFile\055-DemoWritingToFile_controller.swf 640 480>>
__''Code Needed For Demo:''__
{{{
//This program writes data to a file!
import java.io.*; //Needed to write to a file
import java.util.Scanner; //Needed to read input at the command prompt
public class crow3_055_HotnessListDemo
{
public static void main(String [] args) throws IOException
{
//Declare Variables
String strFileName; //File Name that we will create
String strPersonName; //Name of person
String strHotnessLevel; //Hotness Level of person
int intNumber; //Number of people
int intCounter; //Counter for loop
//Create Scanner Object for keyboard input.
Scanner keyboard = new Scanner(System.in);
//Get the number of people for whom you will rate
System.out.print("How many people will you rate?");
intNumber = keyboard.nextInt();
//Use keyboard object to fix memory problem
keyboard.nextLine();
//Get the filename
System.out.print("What do you want to call your file?");
strFileName = keyboard.nextLine();
//Create file and open a connection to it
PrintWriter outputFile = new PrintWriter(strFileName + ".txt");
//Get data and write it to the file using a loop!
for (intCounter = 1; intCounter <= intNumber; intCounter++)
{
//Get the name of the person
System.out.print("Enter the name of the person " + intCounter + ": ");
strPersonName = keyboard.nextLine();
//Get that person's hotness level
System.out.print("What is the hotness level of " + strPersonName + "? ");
strHotnessLevel = keyboard.nextLine();
//Write the name and the hotness level to a file
outputFile.print(strPersonName + " "); //Prints on the same line
outputFile.println(strHotnessLevel); //Prints on the line and then goes to the next line
}
//Close the file
outputFile.close();
System.out.println("Data written to file!");
}
}
}}}
*[[Student Demonstration File(Complete)|content\Java\055000-FilesLoops\Lesson\Demo\crow3_055_HotnessListDemo.java]] - Click the link for a file that contains the code.
!Activity
Ex:
<<player id=003 flash content\Java\055000-FilesLoops\056-ActMyPeeps\056-ActMyPeeps_controller.swf 640 480>>
*(056)My Peeps(Peoples) Program
<html>
<no wiki>
<a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/3.0/us/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-nc-nd/3.0/us/88x31.png" /></a><br />The works found on this site are licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/3.0/us/">Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 United States License</a>.
</html>