Results 1 to 8 of 8
  1. #1
    yungcotter is offline Member
    Join Date
    Dec 2010
    Posts
    2
    Rep Power
    0

    Default Help!! Can someone write me this java program?

    Ok I'm desperate i need help. could some one write this program for me. i took intro to java as an elective because i like computers and thought this would be good. but now I am totally lost. Could some one please help me it would be greatly appreciated thank you.

    1. Create a BlueJ project named C140-YourLastName
    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
    Prajin's Avatar
    Prajin is offline Senior Member
    Join Date
    Jun 2010
    Location
    Ktm, Nepal
    Posts
    120
    Rep Power
    0

    Default

    Don't ask such questions (Please write this code for me).
    If you have any problems or error show it to us, with code and error message.
    And lastly, your asking us to do work homework. Sorry, we can't do it for you.

    Regards

  3. #3
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,419
    Rep Power
    20

    Default

    Recommended reading: How To Ask Questions The Smart Way

    db

  4. #4
    gcalvin is offline Senior Member
    Join Date
    Mar 2010
    Posts
    953
    Rep Power
    5

    Default

    Sure, I'll be happy to do your homework for you! I was looking for a fun way to pass some time. Let me just get started here. Oh, wait a minute, I have to use BlueJ? Forget it.

    -Gary-

  5. #5
    yungcotter is offline Member
    Join Date
    Dec 2010
    Posts
    2
    Rep Power
    0

    Default

    Quote Originally Posted by gcalvin View Post
    Sure, I'll be happy to do your homework for you! I was looking for a fun way to pass some time. Let me just get started here. Oh, wait a minute, I have to use BlueJ? Forget it.

    -Gary-
    You don't have to use bluej I'm not picky

  6. #6
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    Uhm, that was sarcasm, you know?

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

    Default

    There seems to be a lot of homework begging questions around.
    Is it end of term by any chance?

  8. #8
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

Similar Threads

  1. Replies: 24
    Last Post: 06-21-2010, 04:49 PM
  2. How to write two server program in java
    By priyamurugar in forum Networking
    Replies: 1
    Last Post: 04-27-2010, 11:20 AM
  3. Replies: 13
    Last Post: 04-16-2010, 02:51 AM
  4. need help to write Program in JAVA
    By maneibr in forum New To Java
    Replies: 1
    Last Post: 03-13-2008, 01:28 PM
  5. Replies: 1
    Last Post: 02-15-2008, 04:07 PM

Posting Permissions

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