APCS Recursive Factorial Function

How it works

Code:

```public static int factorial(int n){
//stop
if (n == 1){
return(1);
}
//recursion
return(num * factorial(n-1));
}```

Basically, by calling factorial (n), you will call factorial (n-1) until n == 1, in which it will return 1. This leads to a chain of n*n-1*n-2 etc etc etc until we hit the stop.

APCS – Cipher Project

What Cipher Am I Doing

I’m making the columnar cipher. In short what this does it it will take a string, convert the string into a x*y size grid, shuffle it somehow, and then convert the new grid back into a string, and then return that. To shuffle my grid I reversed it, however there are a multitude of other methods on how to accomplish this.

Imports

ArrayList:

ArrayList is an alternative array structure to the standard java array. I like it more and it works well with my programs

List:

I used this as a supplement to create my columns. Can be seen when I created the list of lists of characters.

PrintWriter:

Its a better printer. You can print arrays and see all their indexes and it just makes debugging easier.

Collections:

I used collections to reverse my arraylist. You can also use it to sort and shuffle arraylists which I used in elevens lab.

Misc swing imports:

Used to make my GUI.

Use of loops

For this project I used for loops entirely, although while loops would have also been a feasible, although convoluted, method. Outside of the GUI I didn’t use a single while loop, as it would have complicated things more than they would’ve needed to be. I used for loops mainly to construct and deconstruct the grid-

```// puts the string into columns and fills the remainder with 'x'
int o = 0;
for (int i = 0; i < y; i++) {
for (int z = 0; z < x; z++, o++) {
if (o < s.length()) {
} else {

-more examples like this can be seen in my encrypt and decrypt classes, and for loops formed the backbone of keeping this cipher dynamic and functional.

Conclusion

In conclusion this cipher was, for the most part, successful. It works as it should and my crude GUI serves its purpose. However I do think I could have made it a little more complicated than I did. Overall it was fun to code, and I’m excited to move onto harder challenges.

online

Python:

This bit wasn’t too challenging for me. I watched a short video on if else statements and was set to finish.

To code this part I had a variable be the input of a prompt to see whether they wanted a circle or a triangle. After that I had an if else statement that checked if it was a circle. The else statement for that if has another if statement inside of it to see if its a triangle. If the initial input was either a circle or a triangle it was then asked for dimensions that would then output the final area of the shape.

Javascript

Finished the rock paper scissors game activity, also started with the regular javascript course.

Web Design #1

#1 Nationstates.net):

The Nationstates website is great for a few reasons. First of all the layout is easy to navigate and nothing is difficult to find or confusing. The highlighted areas easily show important bits of information for yourself and the website as a whole. Also the information that needs to be shown is easily found and your eyes are drawn to the large highlighted text. In addition the banners and pictures don’t conflict with each other and the profile nation  I’m looking at (mine) is shown prominently and is not easily overlooked.

The youtube website while viewing videos is great for multiple reasons. the highlighted areas are key to what the website shows and they are displayed prominently and larger compared to the rest of the page. This means that you are less likely to glaze over something important and instead view it as it is supposed to. In addition the color scheme of the website is easy on your eyes and it is not distracting. It is also easy to navigate the important parts of the website such as the search bar, subscribed list, and your personal profile.

#3 Razerzone.com

This website is great for multiple reasons. The website is made up of three main components, the navbar, a slideshow that highlights new products and website news, and another bar highlighting products and recommendations. This allows for easy navigation and allows a viewer to be drawn immediately to the content that is important. In addition the background colors don’t distract and don’t draw you away from the main parts of the website.

Romeo and Juliet

R&J Frame Analysis One

Act One

Scene One:

During this scene servants from the montagues and the capulets start a fight in the market and drag in Benvolio and Tybalt. They start fighting and because of this begin a market-wide brawl including both sides of their family. But shortly after the prince and his men come and put a stop to the fighting and threaten death if another fight started. Then while recovering from the fight we encounter Romeo. He is sad and upon seeing the wounded is infuriated and walks away.

Scene Two:

In scene two Paris asks the head of the Capulets if he can marry Juliet, his daughter. He replies that she is still young but if he can steal her heart than he can marry her.

Scene Three:

In this scene Juliet’s mother wishes to speak to her. Juliet’s mom then talks to her about considering marrying Paris. She says that by the time she was Juliet’s age she was already a mother and that she should get a move on. Juliet then answers that she wants to marry but is still young and that she will consider Paris.

Scene 4:

In this scene Romeo and his friends are going to a capulet party which is not the greatest idea since they are with the montague family. He has a dream that something will go horribly wrong and that it will leave him dead. But while talking about this dream his friend Mercutio goes on about a ‘dream’ he had and teases people with it until he gets way to far into it and Romeo has to snap him out of it.

Scene 5:

In this scene Romeo has entered the party and has started going around with his mask. He sees Juliet and is instantly in love. But Tybalt has recognised Romeo and has told his father. His father and mother than put him in his place and tell him to drop it. Afterwards Romeo approaches Juliet and finds her and they talk and as they are leaving Romeo discovers that she is a capulet. And as Romeo leaves Juliet finds out from Tybalt that Romeo is a Montague.

Act 2

Scene 1:

In this scene Romeo is going home but for some reason didn’t want to talk to his mates (not an Aussie just goes with movie) so as he climbs up a tree and his friends come home and start screaming “ROMEO.”

Scene 2:

In this scene Romeo goes back to see Juliet one more time and hey watches her as she talks to herself about how she wishes he wasn’t the enemy of her father. Romeo then goes up and approaches her and they kiss (a lot) and then Romeo offers to exchange vows with her. She agrees and they set a time and a place for the wedding.  Then Romeo leaves but Juliet calls again (then they kiss again…) and after (finally) Romeo leaves.

Scene 3:

In this scene Romeo leaves Juliet and returns home to ask the Friar to marry them. But before jumping to conclusions the Friar criticise him for leaving Rosaline and straight afterwards marrying Juliet. But nonetheless he decides that this could help the tension between the two houses and decides to marry them.

Scene 4

In this scene Mercucio stirs up trouble by teasing the nurse who is trying to tell Romeo about the wedding. Unfortunately she asks for him out loud and then he gets heckled for being called out. Afterwards they enter the church and informs him about the wedding. She also makes him promise to treat her well and after he does they both leave the church happily.

Scene 5

In this scene Juliet is impatiently waiting for the nurse to return. When she does though she teases her by telling her everything but what she needs to know. But eventually she tells her where and when they are going to be married and Juliet is happy.

Scene 6:

In this scene Romeo talks to Friar and Friar tells Romeo to love constantly, but not to throw yourself at her as it will wear off soon. Soon Juliet arrives and then the wedding begins.

Act 3:

Scene 1:

In this scene Tybalt is trying to find Romeo when he comes across mercurcio and he begins to stir up trouble. Then Romeo arrives and tries to tell Tybalt not to fight but instead Mercurcio fights him and when stabbed by Tybalt, dies. Afterwards Romeo is extremely mad and seeks out Tybalt to kill him. He finds him eventually and they have a duel to the death ending with a downed Romeo stabbing Tybalt from the floor.

Scene 2:

In this scene Benvolio explains what happened and Lady Capulet says that he wants Romeo dead. But instead as Tybalt killed Mercurcio he banishes him instead. That night he is crying and is very depressed and even tries to kill himself. But he has one last night with Juliet before he must leave.

Scene 3:

In this scene Juliet is crying and Lady Capulet tells her to stop crying because Tybalt is gone and Romeo has been punished. But she doesn’t know that Juliet is actually married to Romeo. So Juliet pretends to agree but when she says Juliet will marry Paris than Juliet puts her foot down. This throws her father into a rage and threatens to throw her out of the house if she doesn’t marry. Then Juliet asks nurse to comfort her and she says to marry paris as he is better looking and because Romeo is gone. Juliet pretends to agree and says she will marry.

Act 4:

Scene 1:

In this scene Juliet goes to Friar to seek advice on how to escape this problem. However Paris is also there and he tries to get Juliet to show any affection at all. But then he leaves and Juliet and Friar speak about the matter. Juliet then states that she would rather commit suicide than marry Paris but Friar has another idea. He says that he can give her a drug that will make her appear dead for 42 hours. This would make the wedding unable to occur as Juliet would be “Dead.” Then Friar says goodbye and states he will send Romeo a letter to get him in on the plot.

Scene 2:

In this scene Juliet tells her father that she will marry Paris and that she is sorry. But afterwards she goes back into her room and drinks the drug that will make her go to sleep for 42 hours.

Scene 3:

In this scene the nurse wakes up to find Juliet “dead” and the whole house goes wild with grief. They then proceed to have the funeral ceremony and they all give their gifts to Juliet. But Romeo’s servant Balthasar sees it and passes the monk who was carrying the letter from friar. Balthasar then reaches Romeo and the scene ends.

Act 5

Scene 1:

In this scene Balthasar tells Romeo of the bad news and Romeo proceeds to return home with the intent of suicide to join Juliet.

The Final Scene:

In this scene Romeo returns to Juliet’s “grave” and he then proceeds to drink the poison to Juliet and kill himself. Friar then comes inside of the graveyard to meet with Romeo and see Juliet awake. Outside he meets the Balthasar but Balthasar says he cannot enter so Friar enters alone. When inside he sees Romeo and Juliet finally awakes. But as they are trying to leave Juliet spots Romeo and stops. Friar hearing the patrol leaves and runs away. Juliet then talks about reuniting with Romeo and kills himself.

Shakespeare Notes

Globe Theatre Notes

During this activity I learned that my parents want some of the same things that I would want in a bride. We both want kindness and smarts, but an interesting one that we put down was funny as there is nothing better than a good joke. I think that these similarities show how as a family we have developed the same types of archetypes. But nonetheless there were still differences. As a strange entry I put in: “plays video games (optional)” just because they are one of the pastimes that I enjoy as well as sports. So athleticism and video games (not needed) were on my list. Obviously though my parents didn’t put down video games just because they don’t see it as an important activity. But overall I think that the similarities show how connected we are as a family and how we developed some of the same traits because of that connection.

Champion Project Reflection

One of the more enjoyable projects this year has been the champion project where we choose a person who has impacted our world and make a series of projects about them. I really enjoyed a couple of things about this project that just made me want to work my hardest and put my time and effort into completing this project and one of these reasons was the creating factor. The idea of making our own timeline and being able to come up with our own design and layout was a major factor as one thing I really enjoy doing is making things from scratch. So many projects like our free choice I really enjoyed choosing what I would make (a montage of Jackie Robinson). This was the main driving force that made me want to complete these projects and gave me the power to do this with 100% of my effort.

The champion unit was a difficult unit for one main reason, planning. I am terrible at planning dates for different projects and this was a project that required just that. So By the time I had finished the poems I had forgotten that the same day I had to turn in the journal entry. Another example was the press conference I had just gotten my free choice done and suddenly I forget that I have to have a press conference w/ a costume tomorrow. So I throw together a last minute costume (which could have been 10x better) and prepped for the questions in the morning and at break. This is one of the big problems that I found most difficult.

If I could do this project again I would probably have planned ahead more and scheduled my time so that I would have had time for going out and getting costume elements and finishing projects so that they were all on time. This could have saved me from a few AE’s and given me the time to improve and revise my work to maybe even turn some ME’s into EE’s. But other than this I really enjoyed this unit and would rate it 10/10 would do again.

But for next year I have a suggestion I have a few suggestions. One suggestion that I find to be pretty important is making the free choice mean something. Most people could print off a photo and stick it into a CD case and call it a project. Another suggestion is making the facebook project a free choice option as it was just fill in the blanks and wasn’t too challenging. Overall these are what I would change if I could plan this unit.

PPP WordPress blog

During his time at and around the Brooklyn Dodgers Jackie Robinson has been the target of abuse and discrimination from various sources. But being around he has shown to me that he is here to play baseball and through death threats and getting spiked Jackie has not only played through the season, but has also was awarded the rookie of the year award for 1947 demonstrating that he was resilient and strong. In addition to this he has shown compassion to you players like Mickey Mantle and shown the Dodgers and the rest of the MLB that he wants to play baseball.

Jackie Robinson Quotation:

Jackie Robinson Press Conference Highlights:

Press conf. footage w/ editing (word thingies) when after press conference happens.

Robotics Project Two: Vending Machine

The Mechanism of our Vending Machine

First you the user has to step up to the machine and in front of the machine. This will activate the Ultrasound sensor and start up the conveyor belt.

After the machine senses you it will wait for you to insert a blue HK20 dollar bill into the machine. But sadly EV3 does not let you select specific colours and the blue on the HK20 bill was not one of them. So instead if you use a blue lego piece or a solid blue anything it should trigger the light sensor and move on to the next step.

After if a valid note is scanned it will allow you to push any touch sensor three times. This means you can have three different choices for your 20 dollar bill and means you can choose what ever combination of the three options that you want (a, a, c, or b, c, b, or even, a, b, c).

After you have chosen your three selections those will than be carried over to our motors that will dispense our choices.

• The Circular motion from the motor is converted in to linear motion which is used by the axle

Final Product

Flaws

One of the flaws inside of this machine is that the conveyor belt is slightly obstructed and because of this the conveyor belt will periodically fall off or stop working entirely. This can be fixed by moving the obstruction (the ultrasound sensor) up above or around this key component.

Another flaw of this machine is that it doesn’t have a sturdy frame that it can rely on for a strong support. This is a problem because say if the conveyor belt falls of it would cause a chain reaction and eventually destroy our whole machine. To do this you would need more beams and axles as this would stop the pieces from becoming loose and unreliable.

A final flaw is that the EV3 light sensor will not scan whatever colour you want it to scan. It will only scan for a list of 7 different colours which disables us from using a bill in our project. To make up for this we have used lego pieces and paper “notes” to activate the machine. This is out of our hands to fix but if it is ever resolved it will allow this project to show its true potential.