Slide 1Slide 2Slide 3Slide 4Slide 5Slide 6Slide 7Slide 8Eclipse and the Project1-14-2011Opening DiscussionAny questions about the syllabus or the class?I have a link to the assignment chain on the links page.Recording terminal sessions.ObjectsScala supports another declaration similar to a class called an object declaration.This creates a singleton object in the scope that you declare it.Making an object with the same name as a class creates a companion object. The companion object has access to the private members of the class, but can be accessed without instantiating the class.Bigger ProgramsThe REPL and scripts are good for small programs.OO really benefits large programs.Typically you put each class/object in its own file with the same name as the class/object.In an object you put a main that allows you to run the object with scala.def main(args:Array[String]) { ... }Command LineYou can compile the files with scalac. This should be followed by all the .scala files you have in the project.After that you can run scala followed by the full name of the object that has the main in it.Eclipse/GalileoWhen you start developing larger projects it is helpful to have an IDE that helps you out.We will use Eclipse. We are using the older, Galileo, version because the Scala plug-in likes it better. Run it by typing galileo in the command prompt.Let's take a minute to go to the Scala view, create a project, and put some code in it including an application.The Drawing ProjectTo help illustrate many of the ideas from this semester, I will use the example of a vector drawing project. This is different from any of the programs you will be doing for your projects so it gives you some breadth in the OO topics.We'll spend the rest of class working on code for this. Hopefully we can get a fair bit of the GUI up. That should remind you of many of the things that go into this.Minute EssayThere is no class on Monday.The first IcP is on Wednesday.What are your first impressions of Eclipse and the way it compares/contrasts with using vi and
View Full Document