Monday, 26 May 2014

Coding: Assignment #3

The third assignment has to do with reverse engineering and code enhancement.  You have to take an existing program, understand it and add enhancements to it.  Third Assignment Due May 26rd.

I have given you a banking program that takes only 2 customers and allows each user to have passwords that are 4 characters long.    Extend it to do the following.


1.  Change the code so that the bank can have 10 customers.
2.  The password is 6 characters long and has at least one of the following (capital letters, small letters, numbers and special characters which are ~!@#$%\^&*()\-_=+\|\[{\]};:'",<.>/?
3.  Add a short comments to each logical code block.  e.g if statement  
4.  Comment each of the try-catch blocks.
5.  Change the programme to be Bank + your initials.  eg. mine would be BankEB.java
5.  Write the list of requirements of the program.  
   a) This bank has X numbers, 
   b) Each customer has Y accounts, 
   c) The bank gives each customer z dollars when they open an account etc..
   d) Passwords have to be h length and must contain a, b, c,

=============
Evaluation:
Good introductory comment at the top of the program.
Good comments for each block.

One problem:

1) A weak 5 character password is rejected but a weak 6 character password is accepted.  See yellow the highlighted text below.

9 out of 10.

=============

Would you like to do some banking? (y)es or (n)o?
y
 Who are you? 
eb
 Could not find you in our database. We are currently opening some new accounts for you. 
 Guess what! We opened 2 new accounts for you with $100 in each!
 Now you need to create a PIN. It must be of a length of 6 characters.  Please enter a PIN now

qwert
 You need 6 characters.
Invalid response.  Deleting accounts.  Goodbye
Would you like to do some banking? (y)es or (n)o?
y
 Who are you? 
ew
 Could not find you in our database. We are currently opening some new accounts for you. 
 Guess what! We opened 2 new accounts for you with $100 in each!
 Now you need to create a PIN. It must be of a length of 6 characters.  Please enter a PIN now

qwerty
You should include capitals.
Welcome to BankDJ.ew

Would you like to (1) deposit, (2) withdraw, (3) transfer, (4) check balances, (5) finish
5
Would you like to do some banking? (y)es or (n)o?
y
 Who are you? 
ea
 Could not find you in our database. We are currently opening some new accounts for you. 
 Guess what! We opened 2 new accounts for you with $100 in each!
 Now you need to create a PIN. It must be of a length of 6 characters.  Please enter a PIN now

Q!1wer
Accepted. A very strong PIN
Welcome to BankDJ.ea

Would you like to (1) deposit, (2) withdraw, (3) transfer, (4) check balances, (5) finish

Coding: Khan Academy - SpinOffs

To help with learning coding our teacher gives us homework on Khan Academy. This way we are learning Java in Eclipse as well as JavaScript. We are learning both in a visual and entertaining way, always getting more difficult by the assignment (for me at least). The following link is to what Khan academy calls "Spin-off". They are my saved work or tutorial videos which I refer to. They show the progress which I have made, to my teacher who monitors.
https://www.khanacademy.org/profile/Greenpop/programs

Wednesday, 21 May 2014

English: 1rst poem

We have recently just begun our unit on poetry, in both French and English. This first assignment was given after reading multiple different poems and the last being focused on the phrase, "I shall not live in vain". Thus our teacher assigned us to write a short poem using the phrase or something very similar to it. The only set criteria, apart form the usage of that particular phrase, was that the poem needed to finish with the phrase. Below is what I have written.


While today ends,
It brings us tomorrow.

Today is tomorrow.
It is a fresh face.
One which has not yet been tainted,
With many memories and mistakes.
One which we must live, create,
And experience its’ exhilarating and extraordinary things.
One which we must believe and fight for,
So that they may have a future or even a present.

Thus one must not live nor die in vain.
That they might not live nor die in vain.
That I might not live nor die in vain,
Today, tomorrow, not ever.
I shall not live nor die in vain. 

Thursday, 15 May 2014

Chemistry: Chapter 9 (textbook) Essays: In the Process of being Evaluated and Corrected

Chapter 9 is one consisting of all theory thus our teacher gave us two options of how to approach this chapter. The first is doing a small exam on chapter 9 or write short essays on specific topics taken from the chapter. In choosing either of these made that this chapter would be removed from our final exam and be worth 5% of our final mark. We chose to write the essays.
Chem Multisubject Essays 2014 by Greenprop

Thursday, 8 May 2014

Chemistry: Test 6

This is the latest test which covers the chapter 10 and 11. For the chapter 9 was tested differently.Chapter 9 we had to write multiple short essays of the topics taken the chapter. This test, of chapter 10-11, consisted of an equal share of concepts and numericals. Examples include the definition/differences of Strong and Weak acids, the distinguishing properties of Gasses as well as their kinetic molecular theory, and a lot more.