Free Essay

Declarations & Operatorsinjava

In:

Submitted By mail2veeru
Words 3710
Pages 15
DECLARATIONS & OPERATORS
AGENDA
Declaring Primitives, Reference Variables & data type casting - Practical Session Arrays -Practical Session Using Operators -Practical Session

Declaring Primitives & Reference Variables
Java Identifiers All the Java components - classes, variables, and methods need names. In Java these names are called Identifiers – Identifiers are representing the names of variables, methods, classes, etc. – Examples of identifiers are: employee_id, main, System, out. – Java identifiers are case-sensitive. This means that the identifier ‘employee_id’ is not the same as Emplyoee_ID. – Identifiers must begin with either a letter, an underscore “_”, or a dollar sign “$”. Letters may be lower or upper case. Subsequent characters may use numbers 0 to 9. – Identifiers cannot use Java keywords like class, public, void, etc. Examples of legal identifiers: int _id; double $c; long employee_id;

Java Identifiers Coding Guidelines for Classes, Methods & Variables
1. For names (identifiers) of classes, capitalize the first letter of each word of the class name. For example, MyFirstJavaClass 2. For names (identifiers) of methods and variables, the first letter of the word should start with a small letter. For example, myFirstMethod Variable A variable is an item of data used to store the state of objects. A variable has a: – data type The data type indicates the type of value that the variable can hold. – name The variable name must follow rules for identifiers.

Java Keywords
Keywords are predefined identifiers reserved by Java for a specific purpose.You cannot use kywords as names for your variables, classes, methods ... etc. Page 1

List of Java Keywords abstract char double for int private strictfp throws assert boolean class else goto interface protected super transient enum break const extends if long public switch try byte continue final implements native return synchronized void case default finally import new short this volatile catch do float instanceof package static throw while

Declaring and Initializing Variables Declare a variable as follows: [=initial value]; Note: Values enclosed in are required values, while those values in [] are optional. There are two types of variable declarations in Java: Primitive Variables - A primitive variable can be one of eight types: char, boolean, byte, short, int, long, double, or float. Once a primitive has been declared, its primitive type can never change, although in most cases its value can change. Reference variables - A reference variable is used to refer to (or access) an object of a class type. A reference variable can be used to refer to any object of the declared type, or a subtype of the declared type (when polymorphism is involved).

Primitive variable Declaration
Primitive variables can be declared as class variables (static variables), instance variables, method parameters or local variables. byte b; // declare one byte primitive variable boolean flagPrimitive; // declare one boolean primitive variable int a, b, c; // declare three int primitive variables Integer types, the sequence from small to big is byte, short, int, long and that doubles are bigger than floats (floating-point types). All six number types (byte, short, int, long, double & float) in Java are made up of a certain number of 8-bit bytes, and are signed, meaning they can be negative or positive. ( 1 byte = 8 bits) Declaring Reference Variables ‘Reference variables’ can be declared as static variables (class variables), instance variables, method parameters, or local variables. Object o; // declare one reference variable for class type ‘Object’ - here reference variable ‘o’ is used to refer to (or access) an object of class type ‘Object’ Book myBookReferenceVariable; // declare one reference variable for class type ‘Book’ Page 2

- here reference variable ‘myBookReferenceVariable’ is used to refer to (or access) an object of class type ‘Book’ String s1, s2, s3; // declare three reference variables for String class.

Instance Variables
• • Instance variables are defined inside the class. Instance variables are the fields that belong to each unique object.

class Employee { // define fields (instance variables) for ‘Employee’ instances or objects private String name; private String title, private String manager; // other code goes here including access methods for private fields }



Each instance or object of the preceding Employee class can have its own unique values for those three “fields” or "instance variables“ or "properties”.

It can be marked final, transient & with any of the three access modifiers (public, private & protected – will be discussed later).

Local (Automatic/Method) Variables
• • • Local variables are variables declared within a method. Local variable starts its life inside the method, it's also destroyed when the method has completed. Local variable declarations can't use most of the modifiers that can be applied to instance variables, such as public, private & protected Before a local variable can be used, it must be initialized with a value. Typically, you'll initialize a local variable in the same line in which you declare it. A local variable can't be referenced in any code outside the method in which it's declared. (Refer the following example) class Test { public void logIn() { int count = 10; // local variable declaration } public void doSomething(int i) { count = i; // Won't compile! Can't access local variable count // outside the method login() } } Local & Instance Variable Declarations • It is possible to declare a local variable with the same name as an instance variable. It's known as shadowing, as the following code demonstrates:

• • •

Page 3

class TestServer { int count = 9; // Declare an instance variable named count public void logIn() { // method login… int count = 10; // Declare a local variable named count System.out.println("local variable count is " + count); } public void count() { // method count… System.out.println("instance variable count is " + count); } public static void main(String[] args) { new TestServer().logIn(); new TestServer().count(); } } The preceding code produces the following output: local variable count is 10 // It specifies the local variable ‘count’ instance variable count is 9 // It specifies the instance variable ‘count’

‘static’ Variables (class variable) Declarations
• • A ‘static’ variable, is also referred as a class variable, which exists across instances of a class. static means one per class, not one for each object of a class. This means that you can use them without creating an instance (object) of a class.

(Refer the given example in your ‘Declarations&Operators’ application.) Note: • The opposite of a static variable is an instance variable, which is a variable related to a single instance of a class. Each time an instance of a class is created, the system creates one copy of the instance variables related to that class. • By default, all variables are created as instance variables. To make a class variable, you must explicitly declare the variable static.

Page 4

Comparison of modifiers on variables vs. methods
The figure compares the way in which modifiers can be applied to methods vs. variables.

‘final’ Variables & its various applications

final modifier can be applied to classes &

Page 5



Declaring a variable with the final keyword makes it impossible to reinitialize that variable once it has been initialized with an explicit value If a reference variable marked final can't ever be reassigned to refer to a different object.



‘final’ modifier can be applied to variables

Java Data Type Casting (Type Conversion) In java, you can force one data type to another, by a operation called “casting”. A variable of one type can receive

the value of another type.
Java supports two types of castings – primitive data type casting and reference type casting. Reference type casting is nothing but assigning one Java object to another object. It comes with very strict rules and is explained clearly in Object Casting. Now let us go for data type casting.

The cast operator (type) is used to convert numeric values from one numeric type to another or to change an object reference to a compatible type

Java data type casting comes with 3 flavors. 1. Implicit casting 2. Explicit casting 3. Boolean casting. 1. Implicit casting (widening conversion) A data type of lower size (occupying less memory) is assigned to a data type of higher size. This is done implicitly by the JVM. The lower size is widened to higher size. This is also named as automatic type conversion. Examples: int x = 10; // occupies 4 bytes double y = x; // occupies 8 bytes System.out.println(y); // prints 10.0 In the above code 4 bytes integer value is assigned to 8 bytes double value.

Page 6

2. Explicit casting (narrowing conversion) A data type of higher size (occupying more memory) cannot be assigned to a data type of lower size. This is not done implicitly by the JVM and requires explicit casting; a casting operation to be performed by the programmer. The higher size is narrowed to lower size. double x = 10.5; int y = x; // 8 bytes // 4 bytes ; raises compilation error

In the above code, 8 bytes double value is narrowed to 4 bytes int value. It raises error. Let us explicitly type cast it. double x = 10.5; int y = (int) x; The double x is explicitly converted to int y. The thumb rule is, on both sides, the same data type should exist.

3. Boolean casting A boolean value cannot be assigned to any other data type. Except boolean, all the remaining 7 data types can be assigned to one another either implicitly or explicitly; but boolean cannot. We say, boolean is incompatible for conversion. Maximum we can assign a boolean value to another boolean. Following raises error. boolean x = true; int y = x; boolean x = true; int y = (int) x;

// error // error

byte –> short –> int –> long –> float –> double In the above statement, left to right can be assigned implicitly and right to left requires explicit casting. That is, byte can be assigned to short implicitly but short to byte requires explicit casting.

Following char operations are possible. public class Demo { public static void main(String args[]) { char ch1 = 'A'; double d1 = ch1; System.out.println(d1); // prints 65.0 System.out.println(ch1 * ch1); // prints 4225 , 65 * 65 double d2 = 66.0; char ch2 = (char) d2; System.out.println(ch2); } }

// prints B

Practical Session
Define Primitive variables, References variables, Declare Instance variables, local variables & method parameters Demonstration of final variables Demonstration of static variables Demonstrate Java Data Type Casting Page 7

First, unzip your given ‘Declarations & Operators’ Java Application and open it in the IDE as shown in the following slides. Opening Java Application in IDE • • • Start your NetBeans 6.7.1 IDE – (start – Programs – NetBeans – NetBeans IDE 6.7.1 Select ‘Open Project’ from the ‘File’ menu & give Enter ‘Open Project’ dialog box will appear. Browse your project (Declarations&Operators) location, select and open your project.

Opening Java Class in IDE’s Editor • • • Your project ‘Declarations&Operators’ is opened in your IDE. Expand the variables folder under Source Packages as shown below. And, double click the ‘Variables.java’, now IDE editor shows the code of Variables.java

Page 8

Run your Java Program • • Right click over ‘Variables.java’ and click ‘Run File’ Your program outputs are shown in the output window.

Note: ‘Declarations&Operators’ Application has been built. Need not build it again. You can do build operation, if you do any modifications in any of the class of your application (For build operations refer presentation ‘Java_Basics’ – slide 26 & 27)

Page 9

Running Example Programs for Variables To run the remaining examples of ‘variables’ package of your application, repeat the same procedure mentioned in the page.

Arrays
Array Declarations we can use ‘one variable’ to store a list of data and manipulate them more efficiently. This type of variable is called an array. In Java, arrays are objects that store multiple variables of the same type. Arrays can hold either primitives variables or object references variables Declaring an Array of Primitives int [ ] id; // Square brackets before name (recommended) int id [ ]; // Square brackets after name (legal but less readable) Declaring an Array of Object References Book [ ] books; // Recommended Book books [ ]; // Legal but less readable // here ‘Book’ specifies a class and the array holds the object reference variables of class type Book

Array Instantiation To instantiate (in java, this means creation) an array, write the new keyword, followed by the square brackets containing the number of elements you want the array to have. For example, // Primitive array declaration int items[]; // instantiate array object items = new int[100]; or, can also be written as a single statement. //declare and instantiate object int items[] = new int[100]; Note: array index starts from 0. Above diagram shows the array indexes

You can also instantiate an array by directly initializing it with data. For example, int arr[] = {1, 2, 3, 4, 5}; This statement declares and instantiates an array of integers with five elements (initialized to the values 1, 2, 3, 4, and 5).

Page 10

Accessing an Array Element The following code shows how to access/print all the elements in the array. ‘ ’ loop can be used to access ‘for’ the array elements. (next chapter discusses about ‘for’ loop in control statements) To access an array element, we can use a number called an index, which can be used to access an element , in an array. public class ArraySample { public static void main( String[] args ){ int[] ages = new int[100]; // int array declaration… for( int i=0; i) operator returns ‘true’ to boolean primitive ‘b’ System.out.println("The value of b is " + b); // This statement will print ‘true’ } }

‘Equality’ Operators == equals (also known as "equal to") != not equals (also known as "not equal to")

Page 12

Each individual comparisons, for example two numbers (including char), two boolean values, or two object reference variables can be compared by using Equality operators. (See the following examples…). Example: Equality for Primitives class EqualityForPrimitives { public static void main(String[] args) { System.out.println("char 'a' == 'a'? " + ('a' == 'a')); System.out.println("char 'a' == 'b'? " + ('a' == 'b')); System.out.println("5 != 6? " + (5 != 6)); System.out.println("5.0 == 5L? " + (5.0 == 5L)); System.out.println("true == false? " + (true == false)); } } This program produces the following output: character 'a' == 'a'? true character 'a' == 'b'? false 5 != 6? true 5.0 == 5L? true true == false? false Equality for Reference Variables Two reference variables can refer to the same object. import javax.swing.JButton; class CompareReference { public static void main(String[] args) { JButton a = new JButton("Exit"); // here ‘a’ is an object reference variable JButton b = new JButton("Exit"); // here ‘b’ is an object reference variable JButton c = a; System.out.println("Is reference a == b? " + (a == b)); // a & b refer different objects System.out.println("Is reference a == c? " + (a == c)); // a & c refer the same object } } This code creates three reference variables. The first two, a and b, are separate JButton objects that happen to have the same label. The third reference variable, c is initialized to refer to the same object that ‘a’ refers. Output : Is reference a == b? false Is reference a == c? true Arithmetic Operators You're familiar with the basic arithmetic operators. + addition, – subtraction, * multiplication, / division The Remainder (%) Operator The remainder operator divides the left operand by the right operand, and the result is the remainder. class MathTest { public static void main (String [] args) { Page 13

int x = 15; int y = x % 4; // % operator divides ‘x’ by the 4 and the remainder is assigned to y System.out.println("The remainder of x % 4 is " + y); } } Running class MathTest prints the following: The remainder of x % 4 is 3 Increment & Decrement Operators Java has two operators that will increment or decrement a variable by exactly one. ++ increment (prefix and postfix) -- decrement (prefix and postfix) The operator is placed either before (prefix) or after (postfix) a variable to change it value. class MathTest { static int players = 0; public static void main (String [] args) { System.out.println("players online: " + players++); System.out.println("The value of players is “ + players); System.out.println("The value of players is now “ + ++players); } } Output: players online: 0 The value of players is 1 The value of players is now 2 Increment & Decrement Operators with other Operators int x = 2; int y = 3; if ((y == x++) | (x < ++y)) { System.out.println("x = " + x + " y = " + y); } The preceding code prints: x = 3 y = 4 The first expression compares x and y, and the result is false, because the increment on x doesn't happen until after the == test is made. Next, we increment x, so now x is 3. Then we check to see if x is less than y, but we increment y before comparing it with x! So the second logical test is (3 < 4). The result is true. Compound Assignment Operators The compound assignment operators let lazy typists save a few keystrokes off their workload. (+=, -=, *=, and /=) Here are several example assignments, first without using a compound operator, y = y - 6; x = x + 2 * 5; Now, with compound operators: y -= 6; // ‘-=‘ operator subtract 6 from ‘y’ and again assign it to variable ‘y’ x += 2 * 5; The last two assignments give the same result as the first two. Page 14

Note: (such as: * and / are higher precedence than + and -). The expression on the right side of the = will always be evaluated first. String Concatenation Operator The plus sign can also be used to concatenate two strings together ex: String animal = "Grey " + "elephant"; You can combine numbers with Strings. ex: String a = "String"; int b = 3; int c = 7; System.out.println(a + b + c); The int values were simply treated as characters and glued on to the right side of the String, giving the result: String37 However, if you put parentheses around the two int variables, as follows, System.out.println(a + (b + c)); you'll get this: String10 Using parentheses causes the (b + c) to evaluate first Conditional or Ternary Operator The conditional operator is a ternary operator (it has three operands) and is used to evaluate boolean expressions, much like an if statement. syntax: x = (boolean expression) ? value to assign if true : value to assign if false class Salary { public static void main(String [] args) { String grade = “A”; String status = (grade.equals(“A”) ? “Distinction“ : “First Class"; System.out.println(“Grade is " + status); } } A conditional operator starts with a boolean operation, followed by two possible values for the variable to the left of the assignment (=) operator. The first value (the one to the left of the colon) is assigned if the conditional (boolean) test is true, and the second value is assigned if the conditional test is false. Nested Conditional or Ternary Operator You can even nest conditional operators into one statement: class AssignmentOps { public static void main(String [] args) { int sizeOfYard = 10; int numOfPets = 3; String status = (numOfPets= 5 i >= 5 Refer the following slide for coding explanation

Example Explanation: Logical Operators (short-circuit) 1.) When we hit line 3, the first operand in the || expression (in other words, the left side of the || operation) is evaluated.

Page 16

2. )The isItSmall(3) method is invoked, prints "i < 5", and returns true. 3. ) Because the first operand in the || expression on line 3 is true, the || operator doesn't bother evaluating the second operand. 4.) Line 6 is evaluated, beginning with the first operand in the || expression. 5. ) The isItSmall(6) method is called, prints "i >= 5", and returns false. 6. ) Because the first operand in the || expression on line 6 is false, the || operator can't skip the second operand; there's still a chance the expression can be true, if the second operand evaluates to true. 7. ) Then, isItSmall(9) method is invoked and prints "i >= 5". 8. ) The isItSmall(9) method returns false, so the expression on line 6 is false, and thus line 7 never executes. Logical Operators (non-short-circuit) Logical Operators (non-short-circuit) - There are two non-short-circuit logical operators. & non-short-circuit AND | non-short-circuit OR These operators are used in logical expressions just like the && and || operators are used, but because they aren't the short-circuit operators, they evaluate both sides of the expression, always! They're inefficient. Even if the first operand (left side) in an & expression is false, the second operand will still be evaluated even though it's now impossible for the result to be true! And the | is just as inefficient: even if the first operand is true, the JVM will evaluate the second operand Logical Operators (short-circuit) vs. (non-short-circuit) You'll have to know exactly which operands are evaluated and which are not, since the result will vary depending on whether the second operand in the expression is evaluated: int z = 5; if(++z > 5 || ++z > 6) z++; // z = 7 after this code If the first operand in an OR operation is true, the result will be true, so the short-circuit || doesn't waste time looking at the right side of the equation. So, the right hand operand won’t be executed. versus: int z = 5; if(++z > 5 | ++z > 6) z++; // z = 8 after this code And the | is just as inefficient: even if the first operand is true, the JVM will also evaluate the second operand. Logical Operators (^ exclusive-OR (XOR)) ^ exclusive-OR (XOR) The ^ operator is related to the non-short-circuit operators and it always evaluates both the left and right operands in an expression. For an exclusive -OR (^) expression to be true, EXACTLY one operand must be true - for example, System.out.println("xor " + ((23))); produces the output: xor false Note: The preceding expression evaluates to false because BOTH operand one (2 < 3) and operand two (4 > 3) evaluate to true.

Page 17

Logical Operators (! boolean invert) ! boolean invert The ! (boolean invert) operator returns the opposite of a boolean's current value: boolean t = true; boolean f = false; System.out.println("! " + (t & !f)); produces the output: ! true Bitwise Operators Of the six logical operators listed previously, three of them (&, |, and ^) can also be used as "bitwise" operators. byte b1 = 6 & 8; byte b2 = 7 | 9; byte b3 = 5 ^ 4; System.out.println(b1 + " " + b2 + " " + b3); Bitwise operators compare two variables bit by bit, and return a variable whose bits have been set based on whether the two variables being compared had respective bits that were either both "on" (&), one or the other "on" (|), or exactly one "on" (^). Practical Session Relational Operators Arithmetic Operators Conditional or Ternary Operator Logical Operators Open your ‘Declarations&Operators’ Java Application in the IDE and run example programs.

Page 18

Similar Documents

Premium Essay

Unit 3

...Short Answer 5. What 2 things must you normally specify in a variable declaration? • You need to specify the variable type and identifier. 6. What value is stored in uninitialized variable? • In some languages 0 is the default value to uninitialized variables. In other languages uninitialized variables hold random values. Algorithm Workbench 3. Write assignment statements that preform the following operations with the following variables a, b, and c. A. b = 2+a B. a = b*4 C. b = 3.14/a D. a = b-8 4. Assume the variables result, w, x, y, and z are all integers, and the w = 5, x = 4, y = 8, z = 2. What value will be stored in result in each of the following statement? A. x+y=4+5 B. z*2=2*2 C. y/x=8/4 D. y-z=8-2 5. Write a pseudocode statement that declares the variable cost so it can hold real number. • Floating-point variable cost 6. Write a pseudocode statement that declares the variable total so it can hold integer. Initialize the variable with the value 0. • Declare Real price = 99.95 • Display “the original price.’ • Input item original price • Display “price” 7. Write a pseudocode statement that assigns the value 27 to the variable count. • Count:=27 8. Write a pseudocode statement that assigns the sum of 10 and 14 to the variable total. • Set total = 10+14 9. Write a psudocode statement that subtracts the variable downPayment from the variable total and assign the results for the variable due. • Set due = total – downPayment 10. Write...

Words: 375 - Pages: 2

Free Essay

Weakness

...“The child is father to the man” –HORACE MANN The fact that a person may have a weakness may build up much insecurity to start breeding wickedness because they are missing that strength inside of them. It may break them or make them feel angry towards a person that shows success in life. Especially, if it’s in the area, in which the person, can’t strengthen their weakness. In my teaching, this semester with my internship I had a fire brigade silent an alarm without doing the proper procedures in which she should had made a perimeter check of the building. Before she had acknowledged the alarm before making sure, there was any problem. I had to approach her about this situation due to the fact I’m the fire safety director of the building. Her excuse was that she didn’t understand the training, but she knew that button would be silent the system so that the fire department wouldn’t come. If the fire department had come on the premises, she would have to explain to them the cause in which she had little knowledge of what to do. So with that said, you build a child strong he will be good. I wasn’t producing enough knowledge to her to do well. Her wickedness came from weakness in not knowing proper procedures in which she could think of cost someone their life. I truly believe this quote a lot of bad things happen in life because of people weakness. If we could find a way to build our children to be strong and not to have a bad soul in their body, they would be good. Someone could...

Words: 293 - Pages: 2

Premium Essay

Women's Role In The Civil War

...taking women out of the home, breaking down gender roles, and creating more opportunities. Before the war women were obligated to do household jobs like taking care of the kids, doing laundry, etc… however, the first women's movements were made to do exactly the opposite, they wanted to take women out of the home. In the 19th century, women could not own property and were not allowed equal access to education and employment. Married women were obligated to domestic jobs, while single women were allowed to work in factories. However, their wages were half of their male co-workers. ( Riggs, 1479-1480 ) Issues of inequality between men and women were discussed at the Seneca Falls Convention in 1848. During the convention, the “Seneca Falls Declaration of Sentiments was created. This document included a detailed list of the ways in which males have oppressed women, including the right to vote, own property, and earn equal wage and education. In response to this New York, along with a few other states, enacted laws allowing women to own and control property. ( Riggs, 1479-1480) As a result of the start of these advancements, Elizabeth Cady Stanton and Susan B Anthony published “The Revolution.” Newspapers ridiculed their ideas which grew wide public attention to the women's movements in 1868. ( Infobase) In the 19th century, women were seen as inferior to men and too weak to do anything a man does, but the women who fought on the front line during the war proved them wrong. During...

Words: 887 - Pages: 4

Premium Essay

Declaration Of Sentiment Analysis

...site of the first Women’s Rights Convention. With that simple preparation, on the morning of July 19, the roads to the church were jammed with carriages and carts. A crowd was milling around outside when Stanton arrived to find the church inadvertently locked and the key missing. The first day of the meeting was to be for women only, but Stanton and the others did not know how to ask the men who were present to leave. The convention had strong support from some men. In fact, the women asked a man to preside at the convention. 
 For Stanton, then thirty-two, it was only her second public appearance. In the convention’s first order of business, she read the declaration of Sentiments. The document detailed the ways in which women were denied property rights, rights in marriage and divorce, and the vote. The Declaration of Sentiments was...

Words: 665 - Pages: 3

Premium Essay

Address To The Congress On Women's Suffrage Rhetorical Analysis

...My choice for the historic document is Carrie Chapman Catt’s persuasive argument titled "Address to the Congress on Women's Suffrage." Her thesis states “Woman suffrage is inevitable” (Catt 1) and her paper explain why. She has three causes that make up her argument which is both logical and clear. She is asking for Women’s Suffrage; she needs to comport herself in a rational, cohesive, manner. Catt knows the audience she must convince will be men. Therefore, she chose logos as her mode of persuasion. This approach helped her to prove her point. Her introduction is short and succinct. It grabs the readers attention by telling them this is happening and this is why. The body of her speech is made up of three major arguments. First is the history...

Words: 499 - Pages: 2

Premium Essay

Elizabeth Cady Stanton Comparison

...In Elizabeth Cady Stanton's Declaration of the Rights of Women, she copies Thomas Jefferson's style and technique to advocate for women's rights. Comparing both Stanton and Jefferson, I believe they share some similarities. Elizabeth Cady Stanton was an American abolitionist, social activist, writer, suffragist and leading figure of the early women's right movement. She wrote the Declaration of Sentiments(or Declaration of the Rights of Women) which fought for the civil, political, social, and religious rights of women in the 1800's. Thomas Jefferson was the third president of the United States. He was also a historian, philosopher, American Founding Father, and the author of the Declaration of Independence. Jefferson was also...

Words: 377 - Pages: 2

Premium Essay

Elizabeth Cady's Legacy

...Elizabeth Cady Stanton has many titles associated with her name: wife, mother, abolitionist, suffragist, social activist, but mainly a protector, defender, and fighter of women’s rights. From the age of twenty-five up until her death at age eighty-six, Stanton was involved publicly in speaking out in favor of social reforms, especially those that concerned women. Unlike other female activists of her time, she would speak directly in front of state and federal legislative bodies in order to accomplish whatever she set her mind to. As this paper, will suggest, by examining her influences in youth, her work, and her legacy, Stanton was one of the forefront activists during her lifetime, constantly pushing and arguing for what she deemed as necessary and right. Stanton was born into the privileged family of Margaret Livingston Cady and Lawyer Daniel Cady, who were both wealthy landowners and prominent citizens of their community in Johnston, New York. She was the seventh child, born on November 12, 1815. Her mother’s father was Colonel James Livingston who raised a regiment of Americans and fought at Quebec and Saratoga. This is important to note, because her mother would be an important influence in Elizabeth’s young life. She supported abolition and women’s rights unashamedly throughout her life, and according to Elizabeth, she always preferred “diplomacy to open warfare.” However, even though her mother had a reputation of being strong-willed and opinionated, she also made...

Words: 560 - Pages: 3

Free Essay

Research in Leadership

...famous—examples of unethical research in the biomedical sciences, such as the experiments conducted by Nazi doctors and scientists on concentration camp prisoners during World War II and the Tuskegee Study of Untreated Syphilis in the Negro Male, conducted by the U.S. Public Health Service. These abuses led to the creation of codes of research ethics in Europe and the U.S. In the wake of the Second World War, the Subsequent Nuremberg Trials on war crimes produced the Nuremberg Code, which outlined ten points for conducting ethical research with human subjects. Nearly two decades later, the World Medical Association developed a code of research ethics, known as the Declaration of Helsinki, published in 1964 and subsequently revised. This document built on both the Nuremberg Code and physicians' code of ethics known as the Declaration of Geneva by adapting the existing guidelines to address the growing field of clinical research. In the U.S., news that researchers deceived and withheld treatment from subjects in the Tuskegee Study, led to the creation of the National Commission for the Protection of Human Subjects of Biomedical and Behavioral Research. The National Commission was charged with the establishing a code of research ethics for U.S. research with human subjects. In 1979, the Commission issued the Belmont Report, the foundational document of the current system of U.S. human subjects protections. The Belmont Report outlines three key ethical principles for conducting research...

Words: 485 - Pages: 2

Free Essay

Great Awakening

...and 1740s, leaving a permanent impact on American religion. It resulted from powerful preaching that gave listeners a sense of personal revelation of their need of salvation by Jesus Christ. Some historians have speculated that the shift from rural and agricultural to urban and commercial styles of life may have engendered guilt in those leaving "the old ways" behind. In a few towns the rapid spread of revival followed closely upon the heels of serious illness, especially the "throat distemper" (diphtheria) which carried away large numbers of New Englanders in the 1730s. In other awakened localities, economic problems had been a troubling source of tensions. Some merchants worried about the effects of conflict following Britain's declaration of war on Spain in 1739. Many others joined the merchants in concern about the absence of an adequate currency. It deemphasized the importance of church doctrine and instead put a greater importance on the individual and their spiritual experience. The Great Awakening arose at a time when man in Europe and the American colonies were questioning the role of the individual in religion and society. It began at the same time as the Enlightenment which emphasized logic and reason and stressed the power of the individual to understand the universe based on scientific laws. I want to talk more about the importance of the Great awakening. First of all it pushed individual religious experience over established church doctrine, thereby decreasing...

Words: 349 - Pages: 2

Free Essay

Compulsory Licensing

...Loyola Law School (Los Angeles) Legal Studies Paper No. 2005-18 August 2005 Facilitating Compulsory Licensing under TRIPS in Response to the AIDS Crisis in Developing Countries Professor Hans Henrik Lidgard Professor Jeffery Atik This paper can be downloaded without charge from the Social Science Research Network (SSRN) electronic library at: http://ssrn.com/abstract=794228 FACILITATING COMPULSORY LICENSING UNDER TRIPS IN RESPONSE TO THE AIDS CRISIS IN DEVELOPING COUNTRIES Hans Henrik Lidgard and Jeffery Atik1 Abstract The AIDS crisis in the developing world has become a priority for international collaboration. The challenge is to find a balance between the acknowledged need to protect large investments expended in developing new medicines and the goal of providing essential medicines to poor countries. Patent protection must prevent undue infringement yet at the same time allow solutions to humanitarian needs. Is compulsory licensing a way out? TRIPS originally restricted compulsory manufacturing licenses to the country experiencing a public health emergency – which was of little utility to countries lacking manufacturing capacity. The Doha agreement effectively permits twinned compulsory licensing – a distribution and use license in countries experiencing a public health emergency and a manufacturing-for-export license in countries possessing appropriate manufacturing capacity. These changes make possible, at least in principle, a greater source of supply of generic pharmaceuticals...

Words: 8057 - Pages: 33

Premium Essay

What Role Did Miss Anthony Play In The Temperance Movement

.... Miss Anthony was involved in the Temperance Movement by being part of the Daughters of Temperance, in which she and other women campaigned for stronger liquor laws and made people more aware of the effects of drunkenness. She also raised money for the cause (“Temperance Worker”). In January 1852, Miss Anthony attended a Son’s of Temperance meeting. Before she attended the meeting, she collected signatures to petition against the sale and production of liquor in America. She had many ideas on temperance and tried to share them at the meeting, but before she had a chance to speak she was told to be quiet like the other women there (Weisberg “Reform”). After being discriminated against at the Son’s of Temperance meeting, she organized the Women’s State Temperance Society which was run entirely by women (“Temperance Worker”). Susan B. Anthony reformed American society in many ways and one of those ways was through the Temperance Movement. Miss Anthony’s efforts to stop the production and sale of liquor greatly influenced the creation of the Eighteenth Amendment which outlawed liquor in America. She put a lot of passion into this reform movement and the outcome of her hard work was successful. In addition to being involved in the Temperance Movement, Miss Anthony and her family played an active role in the Anti-Slavery Movement. Abolitionists like Fredrick Douglass and William Lloyd Garrison, along with many other Anti-Slavery Quakers, went to the Anthony’s farm for Anti-Slavery...

Words: 1207 - Pages: 5

Premium Essay

How Did Elizabeth Cady Stanton Read The Declaration Of Sentiments

...Declaration of Sentiments-1848 At the Seneca Falls convention on July 19th and 20th of 1848, Elizabeth Cady Stanton read the Declaration of Sentiments. It included demands for equality with men in education and employment and demands for women’s rights to vote. Every statement made in the Declaration of Sentiments was later resolved by the government. Primary Source Document: Declaration of Sentiments by Elizabeth Cady Stanton. Yick Wo v Hopkins-1886 San Francisco passed a county law that required Laundromats in wooden buildings to have a permit in order to function and established a board which decided who could have the permit. There were no Chinese applicants that ever got a permit, even though Chinese operated Laundromats made up around 90% of the city’s laundry business at the time. The Plaintiff, Yick Wo and many others, were issued a fine and later sued under the 14th amendment, citing a violation of equal protection. The appeal ruling was overturned because it was a violation of the constitution. Even though the ordinance did not have any discrimination detectable within its text, its enforcement violated the equal protection clause because the way it was executed was racially unequal.  The new rule made by the court was that the Supreme Court can shoot down state or local laws which are neutral in their text, but discriminatory in their execution....

Words: 538 - Pages: 3

Premium Essay

How Did Elizabeth Stanton Brutalize Women's Suffrage?

...Due to Stanton’s will to learn, she recognized the unfair treatment women received, for instance, a After meeting female avocets Lucretia Motts, during, her honeymoon at a, convention in London she was, inspired to commit herself to women’s rights. Emphasizing, Elizabeth accomplished creating the first gathering devoted to women’s rights in the United States held on, July 19—20,1848 in, Seneca Falls in New York.  Topics began with social issues, eventually, led to deeper focus on women’s equality. Upset that woman couldn’t vote but free blacks could, Elizabeth began to focus on, creating a constitutional amendment that would outlook suffrage around America entirely. Stanton partnered with Matilda Joslyn Gage and started the National Woman Suffrage...

Words: 293 - Pages: 2

Premium Essay

Lolmate

...Group: 06591a Group: 06591a Learner’s Name: George Allen Learner’s Name: George Allen ------------------------------------------------- Assignment Details: 1 Assignment Title: Leadership Styles ------------------------------------------------- ------------------------------------------------- ------------------------------------------------- Assessment Dates: Set: W/C 22nd September 2014 Due: W/C 20th October 2014 ------------------------------------------------- Assignment Details: 1 Assignment Title: Leadership Styles ------------------------------------------------- ------------------------------------------------- ------------------------------------------------- Assessment Dates: Set: W/C 22nd September 2014 Due: W/C 20th October 2014 ------------------------------------------------- Unit Details: Qualification: BTEC Level 3 Extended Diploma in Uniformed Public Services QCF Number: 2 Title: Leadership and Teamwork in the Public Services Tutor/Assessor: Internal Verifier: ------------------------------------------------- Unit Details: Qualification: BTEC Level 3 Extended Diploma in Uniformed Public Services QCF Number: 2 Title: Leadership and Teamwork in the Public Services Tutor/Assessor: Internal Verifier: Submission Status: First Submission ☒ Resubmission* ☐ Submission Status: First Submission ☒ Resubmission* ☐ Pass | Merit | Distinction...

Words: 1300 - Pages: 6

Premium Essay

Elizabeth Cady's Speech At The Seneca Falls Convention

...Elizabeth Cady Stanton delivered this speech at the Seneca Falls Convention, in 1848, New York. Elizabeth was the eight of 11 children, born in Johnstown, New York. Father of Elizabeth was Daniel Cady, and Mother of Elizabeth was Margaret Livingston Cady. Her Father was a prominent federalist attorney who served one term in the United Sates Congress and later become both a circuit court judge, and in 1847, a New York Supreme Court Justice. Slavery did not end in New York until July 4th, 1827, so like many men, her dad was a slave owner and the slave owner is the one who took care of her and her sister Margaret. Stanton throughout the years lost a total of 6 siblings in their early age, and one brother, Eleazar, died at age 20. As...

Words: 263 - Pages: 2