M  

 

The Private Site of Fariborz Moradi


 
 

So now we've sneaked a peak at one of Laura's binders. She has reviewed the Western Town section and thinks that this western should take place in, not surprisingly, a Western Town. So she's ready to write the first part of her plot. Laura turns to the main paper that is sitting in the middle of her desk and starts to write the story.

The Gunfight at the Old West Saloon
This story takes place in a Western town called Sweaty Post.
Sweaty Post has one sheriff, two saloons, and five troublemakers.

Just a couple lines, but Laura has, in fact, said quite a bit. When she sends the story to her editor, he will look up "Western Town" in the binders she sends along and fill in the date, location, and number of stables. In addition, Laura has added information about the sheriff, saloons and troublemakers. But that's okay, because her editor was expecting it. Because her binder stated that every western town would have a certain number of these, but didn't say how many, her editor was quite happy to see them specified in her plot. Even though her main plot page only has two lines, because of the reference to her binder, her story already contains quite a bit of information.

Main Gunfight

  • Western Town sweatyPost is a new Western Town.
  • the number of saloons in sweatyPost is two.
  • the number of sheriffs is one.
  • the number of troublemakers is five.

Laura takes two very important steps early on in her plot. First, she instantiates an object of type WesternTown. Having created her first object, Laura then goes on to fill out the information that was initially lacking in the WesternTown class: (number of saloons, sheriffs, troublemakers)

public class Gunfight
{
     public static void main (String arguments[])
     {
          WesternTown sweatyPost = new WesternTown;
          sweatyPost.saloons = 2;
          sweatyPost.sheriffs = 1;
          sweatyPost.troublemakers = 5;
     }
}

 


 



 

 
 
 
©2006 Fariborz Moradi       Contact