Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
github-classroom[bot] authored Dec 1, 2022
0 parents commit ee59560
Show file tree
Hide file tree
Showing 10 changed files with 217 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# BOSS XTRAS
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Text Backup Files #
*.s[a-w][a-z]
*~
\#*\#
.\#*

# OS X Files #
.DS_Store
._*
_*
.Spotlight*
.Trashes

# Windows Files #
Thumbs.db
ehthumbs.db
48 changes: 48 additions & 0 deletions 01-leap-year/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Leap Year
#### Respond to the following:

1. Rewrite the following nested `if()` statements in a single line:
```
if (year % 4 == 0) {
if (year % 100 != 0) {
// DO STUFF
} // end inner if statement
} // end outer if statement
```
* **YOUR WRITING HERE**


2. Label each as either correct or incorrect syntax. If incorrect, rewrite below:
* if (x == y) {

* **YOUR WRITING HERE**

* if [x == 10] {

* **YOUR WRITING HERE**

* if x = 10 then {

* **YOUR WRITING HERE**

* if (x equals 42) {

* **YOUR WRITING HERE**

* if (x => y) {

* **YOUR WRITING HERE**


3. Fix the error in the code below:

```
Scanner console = new Scanner(System.in);
System.out.print("What is your favorite color? ");
String name = console.next();
if (name == "blue") {
    System.out.println("Mine, too!");
}
```

* **YOUR WRITING HERE**
24 changes: 24 additions & 0 deletions 02-fizzbuzz/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# FizzBuzz
#### Respond to the following:

1. Fill out the following truth table:

| P | Q | P && Q | P \|\| Q |
|:--:|:--:|:------:|:--------:|
| T | T | | |
| T | F | | |
| F | T | | |
| F | F | | |


2. Prove a version of DeMorgan's Law:

| P | Q | P \|\| Q | ! (P \|\| Q) | !P | !Q | !P && !Q |
|:--:|:--:|:--------:|:------------:|:--:|:--:|:--------:|
| T | T | | | | | |
| T | F | | | | | |
| F | T | | | | | |
| F | F | | | | | |

3. What does DeMorgan's state and how did you prove it for the case above?
* **YOUR WRITING HERE**
5 changes: 5 additions & 0 deletions 03-count-quarters/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Count Quarters
#### Respond to the following:

1. How do you isolate the ones digit of a number?
* **YOUR WRITING HERE**
16 changes: 16 additions & 0 deletions 04-letter-grade/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Letter Grade
#### Respond to the following:

1. Write a plan for the following extension:
* Attach a "+" on their grade if the grade ends in a 7, 8 or 9 (eg: 78 -> C+, 89 -> B+)
* Attach a "-" on their grade if the grade ends in a 0, 1 or 2 (eg: 92 -> A-, 61 -> D-)

* **YOUR WRITING HERE**


2. Discuss how you would make sure 100 is not misrepresented as an A-.
* **YOUR WRITING HERE**


3. Discuss how you would make sure grades that are an F are not mislabeled as F- or F+ (eg: 49 -> F+ and 52 -> F-)
* **YOUR WRITING HERE**
9 changes: 9 additions & 0 deletions 05-div-by-3/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Div By 3
#### Respond to the following:

1. A number is considered *prime* if its only factors are 1 and itself. For example, 7 is prime (1 and 7 are the only factors) and 9 is not (1, 3 and 9 are factors).
Outline an algorithm to determine whether or not a number is prime.
Think of the following method header:
`public static boolean isPrime(int num)`

* **YOUR WRITING HERE**
21 changes: 21 additions & 0 deletions 06-shapes/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Shapes
#### Respond to the following:

1. Write a plan for the following output:
```
000111222333444555666777888999
000111222333444555666777888999
000111222333444555666777888999
```
* **YOUR WRITING HERE**


2. Write a plan for the following output:
```
999998888877777666665555544444333332222211111
999998888877777666665555544444333332222211111
999998888877777666665555544444333332222211111
999998888877777666665555544444333332222211111
999998888877777666665555544444333332222211111
```
* **YOUR WRITING HERE**
24 changes: 24 additions & 0 deletions 07-string-puzzles/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# String Puzzles
#### Respond to the following:

1. *In your own words*, discuss what each String method does:
* `.substring(a)`
* **YOUR WRITING HERE**

* `.substring(a, b)`
* **YOUR WRITING HERE**

* `.indexOf(str)`
* **YOUR WRITING HERE**

* `.equals(str)`
* **YOUR WRITING HERE**


2. *In your own words*, discuss what the following `for` loop accomplishes for `String s`:
```
for(int i = 0; i < s.length(); i++) {
// DO STUFF
}
```
* **YOUR WRITING HERE**
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# FDR High School - AP CS A
## fall22-mp2-work


### Last Name:
### First Name:
### GitHub Username:

---
#### General Workflow:
* Fill out the top of this form, commit and push it back to GitHub.
* For each assignment,
* `$ mkdir <assignment-number>-<topic>` (to be specified for each assignment)
* Add files, commit and push them up to GitHub.
* Commit frequently as you work.
* Once finished with the assignment, edit the `README.md` to explain what you learned along the way.

#### General Grading Rubric:
![rubric](rubric.png)
Binary file added rubric.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit ee59560

Please sign in to comment.