Chapter 3

Posted in Uncategorized on November 19, 2009 by zak1110

3.8: if you replaced the && with || you would change the way the way the code works

3.9: true, true, false, false, true

3.10: a && b

3.11: a || b

3.12: a !|| b

3.14: when you switch the ” ” it no longer compiles.

3.15: The modulo operator returns the remainder from a division.

3.16: result=2 remainder=2

3.18: all possible numbers.

3.20: the increment method calculates the value plus one and returns the remainder of the number after division.

Chapter 3 Definitions

Posted in Uncategorized on October 26, 2009 by zak1110

Abstraction: The ability to ignore details of parts to focus attention on a higher level of a problem.

Modularization: The process of dividing a whole into well-defined parts, which can be built and examined separately, and which interact in well-defined ways.

Divide and Conquer: The technique where one divides problems up into manageable amounts.

Class Diagram: Shows the classes of an application and the relationships between them.

Object Diagram: Shows the objects and their relationships at one moment in time during the execution of an application.

Object Reference: Variables of object types store references to objects.

Overloading: A class may contain more than one constructor, or more than one method of the same name, as long as each has a distinctive set of parameter types.

Internal Method Call: When methods call other methods of the same class as part of their implementation.

External Method Call: When methods call other objects using dot notation.

Dot Notation: Object name, a dot, the method name, and parameters for the call.

Debugger: A software tool that helps in examining how an application executes. Can be used to find bugs.

Breakpoint: A flag attached to a line of source code that will stop the execution of a method at that point.

Chapter 2

Posted in Uncategorized on October 5, 2009 by zak1110

 

2.31: return price+increase;
2.32: return price – discount;
2.35: They show two different outputs because the costs are different.
2.36: It would print out just price, not the user inputted price..
2.37: It would probably come up with an error, because cents is not defined.
2.38: No, because one doesn’t display the price, and the other has an error.
DO: 2.43
2.44: nothing is going to change because zero is positive.
2.45: it controls the size of the circles and the intergers associated with it.
2.47: yes it could be set to negative
2.49: price * discount = saving;
2.50: total / count = mean;
2.51: if ( price>budget)
{
comment = “Topo expensive.”;
}
else
{
comment = “Just right.”;
}
2.52: if ( price>budget)
{
comment = “Topo expensive.”;
}
else
{
comment = “Please enter the correct amount:” price;
}
2.53: because it is returning the balance after it clears it.
2.54: because you are returning the balance and then instantly clearing it, so your actualy balance shown will not be correct

.
2.55: it is both
2.59: the name is getCode and the return is code
2.60: the name is setCredits and the parameter is creditValue
2.62: allows the input of characters to spell out a name, allows the input of numbers to write an age, allows the input of characters to write out a code, allows the input of numbers to shows credits
2.65: public int getAge()
2.68: public class printDetails
{
private String name;
name = setName;
comment = “The name of this person is:” name;
}
2.74: 102, catfish, cat9, 12cat, cat12

Chapter 2 Definitions

Posted in Uncategorized on September 23, 2009 by zak1110

Field: Stores data for an object to use.

Instance Variable: Another name for fields.

Constructor: Allows each object to be set up properly when it is first created.

Method: Consists of two parts, a header and a body.

Method Signature: The fourth line in a method.

Method Body: What the method will actually do.

Parameter: The way in which both constructors and methods receive values is via their parameters.

Accessor: Return information to the caller about the state of an object.

Mutator: Methods that change the state of their objects.

Declaration: Define what happens inside an object when that method is called.

Initialization: Responsible to put each object of that class into a fit state to be used once it is created.

Block: A pair of matching curling brackets.

Statement: Defines what happens inside an object when that method is called.

Assignment Statement: Store the value represented by the right-hand side of the statement in the variable named on the left.

Conditional Statement: takes one of two possible actions based upon the result of a test.

Return Statement: Responsible for returning information in the method’s signature.

Return Type: Defines what kind of information is returned.

Comment: An added line of text for the benefit of human readers of the class definition.

Expression: Things that compute values.

Operator: A symbol that initiates something, Example +=.

Variable: An amount.

Local Variable: A variable declared and used within a single method.

Scope: defines the section of source code from where the variable can be accessed.

Lifetime: how long the variable exists before it is destroyed.

Chapter 1

Posted in Uncategorized on September 21, 2009 by zak1110

Chapter 1 Definitions

Posted in Uncategorized on September 10, 2009 by zak1110

Object: Objects from a problem domain.

Class: What objects are created from, describes the kind of object.

Instance: A particular object.

Method: The commands used to communicate with objects.

Signature: The header of a method.

Parameter: Additional information for a task supplied by a method.

Type: Defines the kinds of values a parameter can take.

State: The set of values of all attributes defining an object.

Source code: Text written in the Java programming language.

Return value: Returned information about an object.

Compiler: translates java code into machine code.

ScreenFlow

Posted in Uncategorized on September 4, 2009 by zak1110

Podcast

Posted in Uncategorized on September 1, 2009 by zak1110

Script for podcast

Posted in Uncategorized on August 28, 2009 by zak1110

You are listening to The Hot Debate. I am your host Zak Shade.

Join me today as I talk about the legalization of marijuana. For the first half I will talk about the history of marijuana followed by ideas from those who are for the legalization and those who are against it.

It is believed that the herb was used by the Scythians as early as the 5th century BC, based on hemp seeds found by archaeologists. There has also been evidence that it was used by the Sadhus in India for religious ceremonies. Some scholars believe that cannabis may have been used in holy anointing oil used in the ancient Judaic culture, and some people believe that the Bible may reference Jesus smoking the plant. Marijuana has only been criminalized in the U.S. since then mid 1900s. It started with the Marijuana Tax Act in 1937 that made it illegal to posses the substance without a federally issued tax stamp. Today there are 60 known cannabinoids that are used medicinally.

 The people who are pro-legalization talk about the war on drugs being an expensive battle, as a great deal of resources go into catching those who buy or sell illegal drugs on the black market, prosecuting them in court, and housing them in jail. There’s another cost to the war on drugs, however, which is the revenue lost by governments who cannot collect taxes on illegal drugs. The study estimates that the average price of 0.5 grams of marijuana sold for $8.60 on the street, while its cost of production was only $1.70. Says Mike Moffatt at About.com. If marijuana was legalized, we could transfer these excess profits caused by the risk-premium from these grow operations to the government, argues Stephen T. Easton.

The anti-legalization people argue that the latest research on marijuana indicates that it is indeed an addictive drug; one that is almost always smoked; one that wrecks the lives of many of its millions of adolescent users. Pot impairs short-term memory, ability to concentrate, and attention span. Studies have shown that otherwise healthy pot smokers-two joints a day-have 25 per cent more airway impairment than cigarette smokers who put away a pack a day. Says Brad Miner of The National Review.

TO conclude my thought i believe that marijuana should be legalized for medical use and, like alcohol, for the use by people over the age of 21 because it is less toxic to the human body then alcohol is.

Podcast

Posted in Uncategorized on August 21, 2009 by zak1110

A.                It is believed that the herb was used by the Scythians as early as the 5th century BC, based on hemp seeds found by archaeologists.There have also been historical implications that it was used by the Sadhus in India for religious ceremonies. Some scholars believe that cannabis may have been an ingredient in the holy anointing oil used in the ancient Judaic culture, and some more speculative individuals believe that the Bible may reference Jesus smoking the plant.Marijuana has only been criminalized in the United States since the mid 1900s. As evidenced by documentation and films of the time, it was originally banned as a way to focus anti-Mexican sentiments. The perception at the beginning of the 20th century was that most smokers were immigrants coming to the United States from the south. The original legislation was in the form of the Marihuana Tax Act in 1937 that made it illegal to possess the substance without a federally issued tax stamp. Since the government had no plans to ever make the stamps, the law essentially made the possession of the substance illegal, nevermind its sale, purchase, or use. In order to curb its influence among the hippie youth, President Nixon signed legislation that made the substance a Schedule 1 drug, putting it in the same category as acid and opiates, in 1970. However in recent decades, National Institute on Drug Abuse-funded studies have not been able to uncover a connection between the use of pot and the abuse of other illegal substances. There are currently 60 known cannabinoids that might have medicinal applications today.

B.             http://economics.about.com/od/incometaxestaxcuts/a/marijuana.htm

                 http://findarticles.com/p/articles/mi_m1282/is_n12_v42/ai_9119707/

C.            Over a million non-violent offenders have been placed in prison for possession of small amounts of a substance now being investigated as a medication. Much of the research is contradictory, either due to the unavailability of research crops that mimic what is available on the street or bias of either the researchers or their benefactors. The association of smoking the herb and cancer is less than what is known to occur with tobacco cigarettes because of significantly fewer carcinogens in its smoke. The plant is also 100 times less toxic to the human body than alcohol, according to an analysis published by Scientific American in 2006. 

D.           TO conclude my thought i believe that marijuana should be legalized for medical use and, like alcohol, for the use by people over the age of 21 because it is less toxic to the human body and less addicting then alcohol and regular tobacco.

Follow

Get every new post delivered to your Inbox.