Tuesday, May 31, 2011

Change of Plans

After last night's work, I realized that the translator program wasn't for me and I was more interested in creating a math utility program. However, I didn't like the equation balancer suggestion. In class, Karl and I decided that we both wanted to work on something different so we started working individually on two different topics. I also notified Mr.Arkin of this change and my topics for both the minor and major projects for teacher approval. My projects were approved and I decided to start working on the "Quadratic Equation solver" for my major project and "future of ICT" for my minor project.

Monday, May 30, 2011

Culminating Activities begin

Today, we were told about the culminating activity which consists of a minor and major project. The minor project is individual and is due in a week. The major project is to be done in partners. They both have laminated pages and the major project has several options like an app, or a video, broadcast, etc. Mr. Arkin decided to give the Advanced crew other options. Either a Java to turing translator or a math utility program. I chose to work with Karl and we decided to work on the translator program. It was overwhelming but we started. We decided to contact each other as this code will have a lot of lines and we need to split the work.

Friday, May 27, 2011

Panther Pantry Day 2

Today, I worked on my Order class of sorting the entire array of products by department, name and price. I also created a receipt with the individual subtotals by department and the total with tax included. It was easy to complete as I was helping others with similar code. Now, over the weekend, I need to complete the javadoc and make sure that I followed the guidelines so I can hand it in to Mr. Arkin when I get back. Monday, we will start culminating activities and I am excited to find out what it is.

Thursday, May 26, 2011

Panther Pantry Day 1

Mr. Arkin wants the advanced crew to complete the panther pantry class as well. It will take me a shorter time but I just started today and I have a few days left. Today, in class I completed the Product class and completed the tokenizing class to split the shopping list. I accepted in all the values for name, brand, description, department, price and tax code. I have also created my array of Products to store in all the data. Tomorrow, I need to do the sorting and calculations.

Wednesday, May 25, 2011

Reverse Polish Notation

A sample question of reverse Polish Notation is 347+* which really means 7 + 4 * 3.  A great advantage is that brackets are not required. The result of this question is 33. To retrieve, we can use Nodes creating new nodes that store the values of stack.pop() or push a node off with stack.push(someNode). I hope to finish this code soon.

Tuesday, May 24, 2011

Stack implementation

Stacks are used in reverse polish notation. This is a strategy for calculation equations with operators written after the constants. It is almost like an olden day calculator. I began working on the RPN class today and it seems complicated to be as you would need to pop the stack to get the operators and constants separately. An example is when you need to parse syntax. I will continue working on it tonight.

Friday, May 20, 2011

Stacks

Today, we learned about stacks. This seems familiar to me as I remember doing it in programming club. Stacks know their size and top. There are several methods such as push, pop, next and top. It reminds me of stacks of plates that need to be cleaned. Stacks are similar to nodes. They are a bit confusing but with more practice, I think I will get better at it. We were asked to write our own Stack class with the appropriate constructor, accesors and mutators.

Thursday, May 19, 2011

Completion of Singly Linked List

Today, I completed my singly sorted linked list and I also modified my insertion sort class. It took a lot of editing of the code to finally end with the correct results. My singly linked list compiles but it received run-time errors like Null Pointer Exception. I am going to try working on it tonight.

Wednesday, May 18, 2011

Wrapping Up

This work period was helpful in completing my insertion sort class, however, I am still having a few errors with my singly sorted linked list. I also remembered to add these errors to my error log. Everyone else was working on their panther pantry class. I was curious to work on it as well because I had been helping a few people so I had an idea on what needs to be done. I decided to complete my singly sorted linked list first before I try the Panther Pantry class. This Panther Pantry class seems to be taking ages to complete as it has almost been two weeks by now.

Tuesday, May 17, 2011

Party Update

Mr. Arkin was absent today as well so we had a guest teacher. I continued to work on my singly linked list program. Though it compiles, I am facing a few run-time errors which I have added to my error log. I also remembered of the party that my class might have this Friday depending on the planning. Therefore, I sent a mail out to all members of our class on wikispaces and I updated the party page from the previous party so students can sign up for the item they are bringing. I like the idea of this party as it is a great way to begin the long weekend. I hope to finish this Linked List Class as soon as possible.

Monday, May 16, 2011

Singly linked lists

Today, we had a guest teacher due to Mr. Arkin’s absence. The class was working on Insertion Sort of a card-dealing problem. Since I was not aware of this sorting algorithm, I tried the question as well and got a sense of the algorithm. After, the advanced crew was given a main method as a continuation of the  Node class to implement an array of integers into nodes but should link each other in the sorted order. Using methods of the node class made the task a little bit easier. I feel relieved after finishing all the French projects due today which gives me more time to continue working on my code. The singly linked list runs in one direction so I assume that we are soon going to begin doubly linked lists. I can’t wait!

Friday, May 13, 2011

Nodes and Linked Lists

After completing the sorting assignments, we were given a lesson on nodes and linked lists today. The Powerpoint was quite long but writing it by hand helps in remembering the information. Nodes link to more nodes. The lesson seems confusing at first but it involves using Objects and sorting once again. This was for the advanced crew however the rest of the class continued to work on their bubble sort of their items array. Each node knows its datum and the “next” link which connects to the next node. We were given an assignment for the node class to complete the code using the documentation of implementing constructors, accessors and mutators. I didn't know how to start but once I did, it was easy.

Thursday, May 12, 2011

La Deprime

Today, the Grade 11 French IB's were engaged in another trip to watch a modern French play known as “La Deprime”. It involves several characters with individual problems at a bus stop intertwined together in the plot. There was romance, comedy and action. Unfortunately, due to my allergies and sickness, I wasn’ able to enjoy the play as much as I wished to. After the play, we went to a nearby park to eat lunch which aggravated my allergies even more. As we were leaving to get on the bus to go back to school, it began to rain, but it wasn't a downpour. We ran out of time to continue with our activity but I really enjoyed the play.

Wednesday, May 11, 2011

Last work period on Problem Decomposition

Today was the last day for our problem decomposition of the panther pantry. I finished my sorting (bubble, quick) classes. I was wondering whether the advanced crew was expected to complete the Panther Pantry class but Mr. Arkin has not provided us with any instructions. However, I still try it anyway and during the period, I was able to assist Rampragash with his tokenizer error and Regina with her inputFile error. I am glad I helped them because I learned something as well. I can’t wait till tomorrow because it is our second French trip for the semester. I hope we start something new after the trip.

Tuesday, May 10, 2011

Progress against Task

Today, I continued working on my Error Log and Daily Blog. Our class was given another opportunity to have a party the Friday before the long weekend. Surprisingly, my French teacher also agreed to a party. We continued to conference with Mr.Arkin about our progress on our programs. The rest of the class continued to tackle through the Panther Pantry sorting problem as I continued with my sorting classes.

Monday, May 9, 2011

Problem Decomposition

Coding a complicated problem in Java will take time and a lot of lines. Breaking the problem down into simple chunks and combining them together at the end makes the work load seem lighter. We continued to work on our programs of quick sort. I believe that we are nearing the end of the Panther Pantry problem. I was able to help both Rampragash and Regina with their programs since they were dealing with a compile error message. I was also able to learn something new from helping them. I will be able to finish the contest problem that I was working on for such a long time using Problem Decomposition.

Friday, May 6, 2011

Sorting array of Items

We continued with our work of sorting arrays. I felt that this period might be helpful for me to update my error log. I also tried applying quick sort to a few real-life problems. After completing the questions for the advanced group, I thought it might be interesting for me to try the Panther Pantry class of sorting the list of items. It seems like putting it into an array of items and then checking the individual department, tax status and name takes a lot of time. I broke the steps down to create simple programs, however I cannot check it as I did not create the Product class earlier. I felt that just creating an array and sorting it by its individual department and name and price would be a plausible task for now.

Thursday, May 5, 2011

Progress on the array sorting

I completed the sorting array of items and I was also given information about the DEEP program from Mr.Arkin  but it seems like the dates won't fit my schedule. However, it would be a great experience for me and I would love to do it maybe later in the future. We continued conferencing individually with Mr.Arkin and I clarified a few doubts about Quick Sort. I hope to learn recursion soon so I might be able to try a few senior problems in the CCC and DWITE.

Wednesday, May 4, 2011

compareTo Method

I have previously used the compareTo method in the Selection sort program for an array of Simple Objects. I could have made my life easier had I noticed that I created the method before for the Array of Objects assignment. The compareTo method returns a negative value if a should come before b; 0 if a and b are the same and a positive value otherwise. This method can also be accessed from the super class. I have understood Quick sort and created a basic skeleton program for sorting an array of integers with Quick sort.

Tuesday, May 3, 2011

Array from File Sort

Today, our assignment was to create an array of integers and strings separately on a file and read from the file and sort it to print it out on the console. It was a work period and I was able to complete the program with a run-time error which was due to the lack of an import statement. I expect that we will soon learn the last type of sorting known as Quick Sort. I also tried a few contest questions from DWITE and CCC with the sort algorithms to familiarize myself with the lesson.

Monday, May 2, 2011

Bubble Sort

A new method of sorting was learned today. This algorithm is known as Bubble Sort. This algorithm compares pairs of adjacent elements. The number of elements in the array subtract 1 determines the number of passes needed to run through to sort the entire array. When comparing a pair, sometimes a swap is required and sometimes it is not. To make the program more effective, a boolean can be created to check if no swaps are being made to show that the data is already sorted. This sort is  useful for the Panther Pantry group to sort their list of items. I have created an array of integers and strings to sort them with bubble sort. This sort is a little different from selection sort.