Getting Started on P1
Each Step has a video. Follow the Step hyperlink to the video.
- Watch the video, read these instructions, maybe several times
- I gave you graff/CycleWorkSpace.class in a zip file.
- Unzip the .zip file and place it somewhere, call this directory X
- Change the static String target = & to be X/graff/CycleWorkSpace.class
- Run the Helper program. Your first task is to understand how and why it works. Hint: run it with the debugger on if you cant decipher the program. You should be able do to such a thing in this class.
- Watch the video, read these instructions, maybe several times
- It is an almost complete program (look for the //TO DO, which is what you have to fill in).
- Run it and youll see that if Main has no arguments, youll get a marquee response of what it expects (a directory as input)
- Customize the run button by pointing to build/classes/introspect/" that's where the class files of Main, and other introspect files exist in this Netbeans project.
- Run Main again, and youll see an empty database is printed.
- YOU have to fill in the // TO DO statement of Main.main(&), but before you do so, go to the next slide
- Watch the video, read these instructions, maybe several times
- This file is where all the heavy lifting takes place.
- Classid, memid are tuple identifier counters for the bcclass and bcmember tables, incremented upon each table tuple insertion
- You need to write addTuples() which takes in a Java Class object. You add its contents as tuples to the bcClass and bcMember tables.
This method calls addMethods(), addConstructors(), and addFields() which you are to write too. They respectively add tuples for methods, constructors, and fields. - Write ExtractParams() which is called when you are trying to write a tuple for a particular method.
Step 4: Debug your program using the provided files
- I gave you a java file, which you should compile and then feed its directory to your introspect program
- on the P1's web page, I post the solutions
- Do the same for the packages in the zip file that I gave you.