Results 1 to 3 of 3

Thread: Help!

  1. #1
    ph03n1xRiz1ng is offline Member
    Join Date
    Dec 2010
    Posts
    1
    Rep Power
    0

    Default Help!

    1. Create a BlueJ project named C140-YourLastName-FinalProject

    2. Create 2 classes: SimpleText and TextProcs and prepare them for use. (Compile each)

    3. The TextProcs class will contain your methods. create empty methods named

    enterlines(), outputlines, savelines and loadlines. (Compile)
    Hint: Place single (temporary) output statements into each that identifies what they are. (Compile)
    This will aid in debugging the SimpleText Class without placeing detail in the methods.
    These statement can be commented out or removed as detail is added later.

    4. SimpleText will contain the program entry method. Place this method in SimpleText (Compile)

    5. In the Simpletext entry method place the following:
    a. declare and initialize all variables
    // a loop variable of boolean data type initialized to true (Compile)
    // a string variable to contain a single letter choice input from a menu initialized to a null string (Compile)
    // a numberic variable to contain the conversion of the string variable to a number initialized to 0 (Compile)
    // A string variable to contain a concatenated string (initialized to prompt the user to select an option and to
    // display each menu option on separate lines in an InputDialog) where options are:
    // Enter Lines, Output Lines, Save Lines, Load Lines, and Quit (Compile)






    b. declare and instantiate an string array to a size of 10 (to contain 10 strings)

    c. declare and instantiate any external class to be used (Compile)

    d. construct a loop that will run as long as the boolean loop variable is true (Compile at each step)
    Inside the loop:
    // provide any conversion necessary to ensure that conditional test variables have the correct data type
    // and that selection and looping functions properly based upon these values
    // construct conditional structure(s) to run methods in the TextProcs class based upon the menu selection
    // (i.e., enterlines(), outputlines, savelines and loadlines) or quits the program.
    // provide appropriate code for each item. (If done properly can be done with a single line for each)
    // if an inappropriate selection is made, display the correct options to the user and reloop
    e. After the loop, Output a statement that acknowledges that the program is ended. (Compile)








    6. Place detail in the methods contained in the TextProcs class (Compile at each step)
    a. the enterlines method()
    // requires no arguments
    // declares a string array to contain 10 elements
    // loops through successive prompts for string values for each line
    // returns the resulting populated string array variable






    b. the outputlines method()
    // requires a string array argument
    // loops through the array passed to it and displays each line to the terminal
    // returns no value




    c. the savelines() method
    // requires a string array argument
    // saves each line of the strring array passed to it to a text file named savedtext.txt
    // returns no value



    d. the loadfile() method
    // requires no arguments
    // declares a string array to contain 10 elements
    // reads values from a file named savedtext.txt and places each line into a line of the declared array
    // returns a string array variable (declared internally to contain 10 elements)

  2. #2
    j2me64's Avatar
    j2me64 is offline Senior Member
    Join Date
    Sep 2009
    Location
    Zurich, Switzerland
    Posts
    962
    Rep Power
    6

    Default

    do you need help in using BlueJ? please note that this is a forum for discussions about java questions. but there are no questions in your post.

  3. #3
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,015
    Rep Power
    20

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •