Lesson 17 This is a simple one. Java will let you define an enumerated type- or limit all the possible values a variable can have. For example: The variable dinnerMenu is now restricted to the 5 options given by the type Entrees. It is considered type-safe, which means attempted use of a value that doesn’t …
Author Archives: Bethany Hull
Computer Science 1: Class Relationships
Lesson 16 The classes in a piece of software relate to each other in specific ways. 3 of these ways are dependency, aggregation, and inheritance. Dependency The dependency relationship is a “uses” relationship; where one class uses the other. This often happens when once class uses the methods of another.In general it’s best to have …
Computer Science 1: File Parsing and Exceptions
In this lesson we are going to take advantage of the fact that the scanner object is an iterator to process input from a source. We have a file in .inp format that contains a list of URLs for the program to dissect. The example program uses two scanners located within a nested while loop …
Continue reading “Computer Science 1: File Parsing and Exceptions”
Welcome to CS Adventure Time
Welcome to the first post of CS adventure time! I’m Bethany, a sophomore in Computer Science at Boise State University in Idaho, and I started this blog to record and help me process all the new things I’m learning in my CS classes.