Showing posts with label college. Show all posts
Showing posts with label college. Show all posts

Advanced Java

I have been away from the Java programming language for almost the whole summer. There was an app I wanted to write. But I needed it to work quick. So I fell back to using C++. Now I want to get back into the Java swing of things (no pun intended). This week I signed up for a community college course on Advanced Java.

I was a little shocked by the price of the class. It rang up to around $800. That does not even cover the cost of the book. I thought community college was supposed ot be inexpensive. It might be worth it though. We are supposed to cover topics such as collections, multithreading, generics, database programming, network programming, and Java Server Pages. Dang. That's quite a list.

To get my Java skills back, I decided to read the first chapter from the class textbook. It is on recusion. The Java syntax for recursion is simple enough. Understanding the technique of generating a recursive algorithm to solve a problem is hard. With the new Java class coming up at the end of the month, I think I will be more chatty on my blog about Java points of interest.

File Parsing

I have an idea for a new Java program which requires information about my colleges schedule of classes. Specifically I want to know what all the Computer Science classes are, and what the prerequisites for each are. This information is readily available in the latest schedule of classes. The chore is to get that information into my program. How do you do that? You write a program of course.

To start with, the schedule of classes is a huge PDF file. I used Adobe Acrobat to export this file to plain ASCII text. Then I wrote a small Java program to read in the file one line at a time. I coded in some rules to parse the lines to figure out which ones were computer science courses. So far I can detect all the CIS courses fine. For now I have the code just grabbing the text of the prerequisites for each class.

The next step is for me to build some structure which can easily represent the relationship between classes. Perhaps this is a big tree. I don't know. I do know that I must first read in all the information. Then I can make the connections in my tree. I already have a Java class called Course. And I have coded most of the logic into my Java class Parser. There are a lot more Java class before I have all the information that I want.

Sorry I have been a little cryptic about my eventual application which will require all this information. Perhaps when I am done I will upload the application here. For now I am keeping it on the down low. I am finding it hard to schedule time to work on my Java programming. As soon as my Java college class ended, there was nothing else driving me to code. And get this. The university does not offer a Java Programming 2 class. Go figure.

2D Arrays

My Java college class is moving painfully slow. I have decided to read ahead to get to the topics I need for real work. The current chapter is on arrays. I have a game which is run on a two dimensional map. This is a perfect application to two dimensional arrays.

So far my textbook has been concentrating on one dimensional arrays. There is not that much to them. It is only a little involved if you have an array of references to objects. You have to create the array. Then you have to create the objects themselves that are referenced by the array elements.

The next chapter is called Two Dimensional Arrays. That should give me exactly what I need for the game. Right now I am using the actual graphics screen to store things in my game. That is very slow. It is also difficult to do anything complex with the displays. I need 2D arrays to get my business done.