Period 1 Unit 4 HW Grading LINK

My Grades from Units

Unit Grade
1 0.9/1
2 0.95/1
3 0.5/1
4 1/1
5 0.9/1
  • Unit 3 I did the wrong period and couldn't get it graded.

Unit 1: Primitive Types

  • Data Types
  • Arithmetic Operators
  • Compound Assignment Operators
  • Increment/Decrement Operators
  • Casting
  • Division
  • Truncating
  • Rounding
  • Concatenation
  • Math class (random) # Unit 2: Using Objects
  • Constructors
  • Syntax
  • Methods
  • Accessor Modifiers
  • String Objects # Unit 3: Booleans and Conditionals
  • De Morgan’s Law
  • Compound boolean expression
  • Comparing numbers/strings
  • Comparing objects # Unit 4: Iteration
  • For Loop
  • While Loop
  • Recursion Loop
  • Nested Loop # Unit 5: Writing Classes
  • Accessor Method (Getter)
  • toString() Method
  • Mutator (Modifier) Method (Setter)
  • Writing Methods

Definitions

Unit 1

Data types: primitive types like integers, strings, or bytes. Non-primitive like strings, or more abstract ones.

Arithmetic operators: operators are like addition, subtraction, multiplication, and division. (+ - * /)

Compound assignment operators: this includes <= less than or equal to or *=. Pretty much links an arithmetic operators to a binary one.

Increment/Decrement operators: increase and set the variable by one. Decrease and set the variable by one.

Casting: This includes division, truncating, and rounding. This basically means to change the data type of a variable to another. This could make an integer a double or an integer a string.

Concatenation: operation of joining two string together.

Math class: This is a java class that allows access to different math expressions. This includes random and absolute value.

Unit 2

Constructors: a specific subroutine to create an object. For example you can specify a variable amount.

Syntax: the specific way you need to type things. It sounds complicated by the worst part is forgetting a semicolon at the end of a line.

Accessor Modifiers: this could include private, public or even protected. Private means that the function (or variable) can only be accessed in the same class. Opposite public means that it can be accessed in any class. Lastly, protected means that it can only be accessed from its own class and subclasses.

Unit 3

De Morgan's Law: an equal statement comparing !(a && b) == !a || !b. This also goes for less than or equal to where !< == >=.

Compound boolean expressions: These are when you need to run multiple tests in an if statement. This can be done by having an AND (&&) or an or (||)

Comparing objects: you can also compare objects which includes seeing if an object is a sub-unit of another.

Unit 4

For Loop: a loop statement allowing the simplification of code through a condition. In this case the loop runs for as long as something is true. Usually for a set period of time.

While Loop: this loop statement runs for as long as a condition is true. While true, do this. This is used when the period of time is not set.

Recursion Loop: this loop includes running the function from itself.

Unit 5

Accessor Method (Getter): allow a way to get the value of each instance variable from outside of the class

toString() Method: an in-built method in Java that returns the value given to it in string format

Mutator (Modifier) Method (Setter): commonly known as a set method or simply a setter

Writing Methods: a block of code which only runs when it is called. You can pass data, known as parameters, into a method. Methods are used to perform certain actions, and they are also known as functions.