User Profile

Collapse

Profile Sidebar

Collapse
sallyk57
sallyk57
Last Activity: Dec 10 '06, 10:55 PM
Joined: Oct 6 '06
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • sallyk57
    replied to Die program
    in Java
    would this work

    import cs1.Keyboard;
    public class Die2
    {
    public static void main (String [] args)
    {
    System.out.prin tln("Enter the number of faces you want a die to have ");
    int guess= Keyboard.readIn t();

    myDie thisDie=new myDie();
    System.out.prin tln("Rolling Die...");
    thisDie.roll();...
    See more | Go to post

    Leave a comment:


  • sallyk57
    replied to Die program
    in Java
    the program works but what does it mean to have the user pick the number of sides on the die
    See more | Go to post

    Leave a comment:


  • sallyk57
    replied to Help with runs program
    in Java
    it works thank you
    See more | Go to post

    Leave a comment:


  • sallyk57
    started a topic Die program
    in Java

    Die program

    The questions asks write an application to roll a die and display the results. It also says let the user pick the number of sides on the die. I wrote a program Die2 which rolls a die and display the results, but i don't how to do the second part. thanks

    import java.util.Rando m;
    public class myDie
    {
    private final int MIN_FACES = 4;

    private static Random generator = new Random();...
    See more | Go to post

  • sallyk57
    replied to Help with runs program
    in Java
    ----jGRASP exec: java Runs

    Heads
    Heads
    Heads
    Heads
    Heads
    Heads
    Heads
    Heads
    Heads
    Heads
    Heads
    Heads
    Heads
    Heads
    Heads
    Heads
    Heads
    Heads
    Heads
    Heads
    Heads
    Heads
    Heads
    Heads
    Heads
    Heads
    Heads
    Heads
    Heads
    Heads
    Heads
    Heads...
    See more | Go to post

    Leave a comment:


  • sallyk57
    started a topic Help with runs program
    in Java

    Help with runs program

    I figured out how to make a coin class. But i can't figure out how to write a program to find the length of the longest run of heads in 100 flips of the coin.
    This is what i did so far the runs program. Thanks

    // this is the coin class
    import java.util.Rando m;
    public class Coin
    {
    private int face;
    private final int HEADS=0;
    private final int TAILS=1;
    ...
    See more | Go to post

  • sallyk57
    replied to Help with Coin Program
    in Java
    thanks for the help
    See more | Go to post

    Leave a comment:


  • sallyk57
    replied to Help with Coin Program
    in Java
    i can't get the totalNumOfGames to work and also it won't print the summary right.

    //coin toss 5 records how many
    import cs1.Keyboard;
    public class CoinToss5
    {
    public static void main(String[] args)
    {
    char play= 'p';
    {
    while (play == 'p' || play == 'P')
    {
    System.out.prin tln(" I'm...
    See more | Go to post

    Leave a comment:


  • sallyk57
    replied to Help with Coin Program
    in Java
    thank you for the help
    See more | Go to post

    Leave a comment:


  • sallyk57
    started a topic Help with Coin Program
    in Java

    Help with Coin Program

    I have to make a program that would ask a user for their guess (heads or tails) and tells them if its correct or not then it has to ask the user if they want to play again. I figured out how to do this but the part that i am stuck on is how to print a summary at the end of this program tracking how many wins and how many losses.

    import cs1.Keyboard;
    public class CoinToss6
    {
    public static void main(String[]...
    See more | Go to post

  • sallyk57
    started a topic Help with Program
    in Java

    Help with Program

    I have the following 2 programs Account and Banking. I have to change the Account class so the funds can be moved from 1 account to another (like withdrawing money from one account and putting it in another). I also have to change the main method of Banking to show this new service. How would I do this?

    // Account.java

    import java.text.Numbe rFormat;

    public class Account
    {
    ...
    See more | Go to post

  • sallyk57
    started a topic Help with program
    in Java

    Help with program

    How would I make a java program using for loops to print the following pattern...

    *
    ***
    *****
    *******
    *********
    *******
    *****
    ***
    *

    i started it but dont know what to do...

    public class Stars
    {
    public static void main (String []args)
    {
    final int MAX_ROWS=10;
    for (int row=1; row<=MAX_ROWS; row++)
    {...
    See more | Go to post

  • sallyk57
    started a topic Help with Salary Program
    in Java

    Help with Salary Program

    Help with following Programs:

    Write two programs one where the performance rating here shoud be entered as a int where Excellent =1, Good= 2, Poor=3. an employee who is rated excellent will receive a 6% raise, one rated good will receive a 4% raise, and one rated poor will receive a 1.5% raise. Add the if... else... statements to program Salary to make it run as described above.

    // *************** *************** *************** *************** ***...
    See more | Go to post
No activity results to display
Show More
Working...