This is the second portion of the two-part project and the last assignment for the whole semester. In this portion, we are now allowed to generate .bs2 code and in turn, run it on the Scribbler robot whereas in the first portion we simply had an introduction and produced results based largely on theory. Once I had completed this small project, I had the strong feeling to take an eventual compiler course at UMass. I didn't so much enjoy working with the Scribbler robot, but I felt I got a strong grasp on lexing and parsing fundamentals and the overall development of a compiler. However, this isn't the first time I've worked with lexers and parsers; I originally took Professor Bill Moloney's Computing IV course a year previous, but had to drop it due to financial constraints of an extreme nature. In that short time I worked with the flex and bison tools within C/C++ and learned a great deal. Frankly, to me, the fundamentals of compiler construction are more easily understood from a C/C++ perspective than from Java's perspective. I feel it has to do with the shielding Java provides versus the low level nature C/C++ allows.

   | Comments (0) | TrackBacks (0)
This is the first portion in a two-part project involving the construction of a small compiler for the scribbler robot. The professor had already written up most of the front and back ends and required us to simply adjust the given code to incorporate new functions, namely an unconditional loop, for loop and a break statement. This largely involved playing around and adding to the lexer and parser source code. Upon a successful build, the program should be able to evaluate these statements and perform the necessary actions.

   | Comments (0) | TrackBacks (0)
To me, this assignment was a little bit of fun. We were tasked with reading an input file and evaluating what was found in the file, much the same way a compiler does for source code(albeit extremely basic). This evaluation was elementary in that we created a global variable, if you will, named Environment, that stored the name:value pairs found in the file. Once we had the program understand what was in the data input file, we simply output our choice of varying arithmetic expressions and solve. This marked the beginning of a later two-part project which involved developing a small compiler based around the Scribbler robot.

   | Comments (0) | TrackBacks (0)
This assignment simply required a write-up on the basic elements of a small but somewhat fun robot. This homework includes a small scribbler program(of *.bs2 format), which tells the robot to illuminate its lights and play a small tune. All required tasks to be performed required by the specification were implemented successfully. 

   | Comments (0) | TrackBacks (0)
This assignment once again builds on the previous, this time with the addition of the Filter and FilterTest classes. The former compares the input number to the numbers in the list and responds with those elements in the list less than the input given. The latter was our first look at JUnit testing, of which I found to be very useful and is something that I will definitely be using in future projects. All required tasks to be performed on the list required by the specification were implemented successfully. 

   | Comments (0) | TrackBacks (0)
This assignment builds on the previous, with the transforming of the methods into classes. More importantly, through the use of these classes, for the first time in this course we see the use of the visitor design pattern. The same randomness and interface output as in the previous assignment were implemented here. All required tasks to be performed on the list required by the specification were implemented successfully. 

   | Comments (0) | TrackBacks (0)
This assignment introduced us to the concept of the object oriented linked list, originally developed in this variation at Rice University. Here, I once again customized the code a bit for randomness and for it's output interface. The requirement for this assignment simply stated to populate the list and perform the computations and output the result. All methods on the list required by the specification were implemented successfully. 

   | Comments (0) | TrackBacks (0)
This assignment required manipulating a turtle implementation, found in the library of the book for this course. We were tasked with having the turtle move to output its path in an output window. Of the requirements, we were to output a rectangle, hexagon, a house, my first name and a circular drop of pictures. The first four parts are pretty straightforward, but the last part I customized a bit. I put together a set of pictures of Tux, the Linux mascot, and had the five different pictures drop randomly into the invisible circle(of varying sizes), of which you can see in four different pictures posted in the wiki.

   | Comments (0) | TrackBacks (0)
The first assignment for this course consisted of four parts, of which all were very basic in nature. This was something I was unhappy about because if you think about it, this is the last in a sequence of four intro courses. The last is what I would expect, to be more advanced in nature than the previous three. Granted we did get more advanced late in the course, but for the beginning portion I expected to develop this advanced content straight out of the gate. Developing basic arithmetic solving and shape producing programs, of which their level of difficulty is equivalent to 91.101 or 91.102, seems backward moving. In retrospect, I understand this was done as a brush-up on past skills... but come on, in this sense, what were the prerequisite courses for then? I took this last course, not only as a requirement, but looking forward to it due to expecting to learn some fascinating things. Unfortunately, due to the curriculum design of the course, we(or I) didn't learn the cooler stuff until later in the semester- until we were done with the basics.

   | Comments (0) | TrackBacks (0)

This program is almost completely alike in features with the exception that the previous program had the option to return the maximum number of elements the system could hold whereas this program contains the option to retrieve a particular element by its numerical value in the list. It was nice to actually produce a decent first program in the Java language. I have programmed in this language before but not to this extent.

Enjoy!


   | Comments (0) | TrackBacks (0)
This program and the next(the final program for this course) are essentially the same in that they contain the same user interface features and produce the same results. While offering identical options the final program is written in Java instead of C++. The goal was to create a more efficient university list of professors via the Standard Template Library and the total amount of code is a little above 800 lines, as a result it is relatively short. I had wished to have had utilized the STL in the previous program where C-style lists were used but it wasn't allowed. This program and the next, although they are the same in nature but differ only in languages are my favorite from this course as they are feature rich. Also, per order of the instructor, I have tried to make these two programs as error free as possible as there is a lot of error checking that was implemented. So feel free to compile them, run them and even try to break them. If you find a bug please let me know. Features include adding elements to the list, current number in the list, maximum the list can hold via your system, print all elements, order elements in reverse, update information on an element, sort the list, delete duplicates, delete an element, and clear the entire list.

Enjoy!

   | Comments (0) | TrackBacks (0)

This version is implemented using C-style linked lists to hold and manipulate data that is input by the user for the different class features. With the implementing of lists, the potential for a lot of data to be given(if desired) is possible. In this version base classes are not to be given data. Three more features were added to print menu's, increase wages, and delete a university person from the list. This second version tops out at approximately 3100 lines of code and was not one of my favorites, but not because of its size, simply because of its features and the forcing of C-style lists when we could have used the STL instead. With that said, it was still nice to further investigate the properties of inheritance and polymorphism.

Enjoy!


   | Comments (0) | TrackBacks (0)

This program demonstrates the principles of inheritance by working with a university person(UnivPerson) hierarchy. There's a lot of code here, 2000+ lines of code. Yet, this application simply outputs a statement when a constructor and/or destructor is called. In a hierarchy consisting of nineteen classes(and their corresponding header files for a total of 28 files), you will see a reasonable amount of constructors called depending on which class you wish to instantiate. This program accepts input from the user on approximately half of the classes, and the other half the user will simply see constructors called. The classes with input will produce constructor calls and output with the data accepted from the user.

Enjoy!


   | Comments (0) | TrackBacks (0)
This version contains more methods to manipulate polynomials. Three arithmetic operations are employed; addition, subtraction and multiplication. Finding the derivative is also employed. And, one that I like, for any value of x the computation of the polynomial is produced. So if your value of x is 2 and the numbers entered are 3 4 5, which represents the polynomial 3x^2 + 4x + 5, then the answer is 3(4) + 4(2) + 5 = 25. Finally, returning the degree of a polynomial and comparing two polynomials for equality is implemented. Please read main.cpp's extensive comments for more details on the methods and their operations. Enjoy!

   | Comments (0) | TrackBacks (0)
This is a simple program(also the first version) that accepts as input int's or double's and produces output in the form of a polynomial expression. The input is inserted into an array and the index value of an input is represented as the power of that term. For example, the input: 3 5 6 19 4.2 produces the output: 3x^4 + 4x^3 + 6x^2 + 19x + 4.2. Likewise, for the input: 4 -7.1 0 0 8.59 2 produces the output: 4x^5 - 7.1x^4 + 8.59x + 2. In the second version more methods are added to manipulate the array; addition, subtraction and multiplication to name a few.

   | Comments (0) | TrackBacks (0)
Here is the second version of the university database program. The main difference in this version is the use of C++ classes rather than the first version's C-style structs. The menu display in this version is also different in that it is presented all at once whereas the first version displayed submenus upon valid user input.

   | Comments (0) | TrackBacks (0)

This is the first version of the university database program and was this course's first programming assignment. My implementation utilizes structs as we were instructed to do so before we learned about classes. Later I will post version 2.0 which uses classes instead of C-style structs.


   | Comments (0) | TrackBacks (0)
This program is similar to Notation Translation in that they both require postfix expressions. Expression Eval differs in that it utilizes tree data structures. This program also allows the user to enter an expression and give its variables values in which the program will manipulate and calculate.

   | Comments (0) | TrackBacks (0)

   | Comments (0) | TrackBacks (0)
Nice program that showcases jobs as they are entered into a queue and run. The output is their time spent in the queue and/or time waiting for other jobs to finish their operations as each job is given a 15 second window to complete then each is pushed on the stack to wait.

   | Comments (0) | TrackBacks (0)

   | Comments (0) | TrackBacks (0)
Mathematical Notation Translation, adapted from "Data Structures - An Advanced Approach Using" by Esakov & Weiss

   | Comments (0) | TrackBacks (0)
One of my favorites. Sample data files(1, 2, 3). This program matches a pattern found in the sample data file and will change surrounding color representations according to the number that is to be changed.

   | Comments (0) | TrackBacks (0)
This is another implementation from the book required in the course and is the partial subject of chapter 4, polynomial addition.

   | Comments (0) | TrackBacks (0)
This is an implementation from the book required in the course and is the partial subject of chapter 4 and is not fully functional, if I recall correctly.

   | Comments (0) | TrackBacks (0)

Overview

  • This section contains a repository of code created at the university level, completed for individual clients(with their permission), or simply varieties of programs which may have no place at all but to serve as a reference. Please note that this section has its own search engine for finding the entries which contain code or links to code.