Page 1 of 3 123 LastLast
Results 1 to 10 of 25

Thread: any programmers here ?

  1. #1
    Join Date
    Jun 2014
    Posts
    780

    Default any programmers here ?

    what in the name of god is the code for this question lol

    Create a class EchoTest which contains a method echo that takes a string input
    parameter and returns the string “You said “ concatenated with the input parameter.

  2. #2
    Join Date
    Apr 2008
    Posts
    21,994
    Reviews
    113

    Default

    Quote Originally Posted by naturis View Post
    what in the name of god is the code for this question lol

    Create a class EchoTest which contains a method echo that takes a string input
    parameter and returns the string “You said “ concatenated with the input parameter.
    Procedure echotest

    Parameter txtin, textout

    txtin = inputbox('Echo Test', 'please enter your text here',)

    textout = "You said " + alltrim(textin)

  3. The Following User Says Thank You to JAMESCORK For This Useful Post:

    Johnbadboy (17-11-14)

  4. #3
    Join Date
    Aug 2010
    Posts
    4,604
    Reviews
    54

    Default

    What programming language are you using ?


  5. The Following User Says Thank You to 69patrick69 For This Useful Post:

    Jiberjabber (17-11-14)

  6. #4
    Join Date
    Feb 2012
    Posts
    4,724
    Blog Entries
    1
    Reviews
    29

    Default

    Quote Originally Posted by naturis View Post
    what in the name of god is the code for this question lol

    Create a class EchoTest which contains a method echo that takes a string input
    parameter and returns the string “You said “ concatenated with the input parameter.
    im not a programer but basicly echotest is what you put in it spits out so you fill in the code echo "you said" and some other bits and when you run that program it will spit out a command saying "you said"

  7. #5
    Join Date
    Oct 2013
    Posts
    4,051
    Reviews
    9

    Default

    You'd really need a language to go on. In Java it would look something like this.


    public class EchoTest
    {

    public echo(String name)
    {
    System.out.println("You said " + name );
    }

    public static void main(String []args)
    {
    for(int i = 0; i < args.length; i++)
    {

    EchoTest eschotest = new EchoTest( args[i] );

    }

    }

    }


    Or you could cheat and use the new Scanner library.
    Last edited by Jiberjabber; 17-11-14 at 20:10. Reason: Hmmm ... maybe without the 'for' loop.

  8. #6
    Join Date
    Oct 2013
    Posts
    4,051
    Reviews
    9

    Default

    Quote Originally Posted by Jiberjabber View Post
    You'd really need a language to go on. In Java it would look something like this.


    public class EchoTest
    {

    public echo(String name)
    {
    System.out.println("You said " + name );
    }

    public static void main(String []args)
    {
    for(int i = 0; i < args.length; i++)
    {

    EchoTest eschotest = new EchoTest( args[i] );

    }

    }

    }


    Or you could cheat and use the new Scanner library.

    public class EchoTest
    {


    public echo(String name)
    {
    System.out.println("You said " + name );
    }


    public static void main(String []args)
    {
    for(int i = 0; i < args.length; i++)
    {


    EchoTest eschotest = new EchoTest();
    echotest.echo( args[i] );


    }


    }


    }


    Sorry, long day.

  9. #7
    Join Date
    Jun 2014
    Posts
    780

    Default

    thanks lads and jibberjabber appreciate it I know your sick of seeing this stuff all day christ i'm going mental with it seeing syntax errors all day i'm doing a hdip computer course and struggling on these questions i'm doing static methods with some loops in java programming

    heres another horrendous question

    Create a class NumberFormatter that includes a method with the
    following header to format an integer with the specified width.


    public static String format(int number, int width)

    The method returns a string for the number with one or more prefix 0s. The number
    should be greater or equal to 0. The size of the string is the width. For example,
    format(34, 4) returns 0034 and format(34, 5) returns 00034. If the number is longer than
    the width, the method returns the string representation for the number. For example,
    format(34, 1) returns 34.
    Write a test program that prompts the user to enter a number and its width and displays
    a string returned by invoking format(number, width)


    if I could get the echo and this I might scrape a pass I did a boolean and and then a 2 counting up methods but I got them I been looking all day in the intro to prgramming book and online like a spa trying to figure it out lol, whats the new scanner library jibberjabber ??

  10. #8
    Join Date
    Jan 2014
    Posts
    3,360

    Default

    ive got a feeling this was just a question to flush out all the hackers
    "The mass of men live lives of quiet desperation" - Henry David Thoreau.

  11. #9
    Join Date
    Jun 2014
    Posts
    780

    Default

    Quote Originally Posted by Meursault View Post
    ive got a feeling this was just a question to flush out all the hackers
    I wish lol I hate the subject I like the web design and databases, going well I might get into them but this I just want to pass it and never see it again

  12. The Following User Says Thank You to naturis For This Useful Post:

    Meursault (17-11-14)

  13. #10
    Join Date
    Feb 2011
    Posts
    4,825
    Reviews
    18

    Default

    Am I the only one here who still uses one of these


  14. The Following 2 Users Say Thank You to xagerate For This Useful Post:

    Calidude (17-11-14), mellors (17-11-14)

Page 1 of 3 123 LastLast

Posting Permissions

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