Results 1 to 5 of 5
  1. #1
    padutch is offline Member
    Join Date
    Nov 2007
    Posts
    1
    Rep Power
    0

    Default JAVA software solutions:For AP Comp. Science (Lewis,Loftus,Cocking)

    Hello I am in my first year of java and currently I am in chapter 2 at my high school. I am stuck on some of the question programs and though if anyoen here can help me.

    NOTE:I am using Netbeans

    Here are some question programs:

    1. Design and implement an application that reads a string from the user, then determines and prints how many of each lowercase vowel (a,e,i,o,u) appear in the string. Have a seperate counter for each vowel. Also count and print the number of constants,spaces, and punctuation marks.

    2. Design and implement an application that simulates a simple slot machine in which three numbers between 0 and 9 are randomly selected and printed side by side. Print a statement saying all three of the numbers are the same, or any two of the numbers are the same, when this happens. Keep playing until the user chooses to stop.

    3. Desing and implement an applet that draws the side view of stair steps from the lower left to the upper right,

    Thanls Alot :D

  2. #2
    padutch2 is offline Member
    Join Date
    Nov 2007
    Location
    Hershey, PA
    Posts
    13
    Rep Power
    0

    Default

    Can anyone help please

  3. #3
    padutch2 is offline Member
    Join Date
    Nov 2007
    Location
    Hershey, PA
    Posts
    13
    Rep Power
    0

    Default

    please help

  4. #4
    JavaBean's Avatar
    JavaBean is offline Moderator
    Join Date
    May 2007
    Posts
    1,270
    Rep Power
    9

    Default

    You should try a little bit. What is the code you have written so far? Did you try searching building blocks of you code like "reading string from user"? If we see your code, we can try helping. We can not write your homework for you. It is not good for you.

  5. #5
    hardwired's Avatar
    hardwired is offline Senior Member
    Join Date
    Jul 2007
    Posts
    1,576
    Rep Power
    9

    Default

    Java Code:
        public static void main(String[] args) {
            make a Scanner for/with System.in
            boolean your_boolean
            while(your_boolean) {
                ask user to enter text
                get user input with scanner.nextLine()
                process the line of input for your requirements
                ask user if they want more
                get user input with nextLine
                your_boolean = evaluate input

Similar Threads

  1. Replies: 0
    Last Post: 02-04-2008, 12:36 PM
  2. Replies: 1
    Last Post: 12-11-2007, 05:54 AM
  3. java code for checking if a software is installed or not
    By heggemony in forum Advanced Java
    Replies: 1
    Last Post: 07-31-2007, 02:19 PM
  4. Struts - Solutions for creating Wizards
    By Larry in forum Web Frameworks
    Replies: 1
    Last Post: 07-11-2007, 06:59 PM
  5. SMS Solutions on GSM and SMPP
    By smany in forum Introductions
    Replies: 2
    Last Post: 07-10-2007, 03:22 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
  •