Wrox Programmer Forums
|
Java Basics General beginning Java language questions that don't fit in one of the more specific forums. Please specify what version.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Java Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 12th, 2007, 03:05 AM
Registered User
 
Join Date: Feb 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Flash Card

CAN SOMEONE HELP ME WITH THIS FLASHCARD PROGRAM..... HONESTLY I AM NOT GOOD WITH JAVA... PLEASE HELP ME....JUST THE getFlashCrad(int N) part



public class FlashCard {
private int numberOfCards = 0;
private String mPlayerName = "";
private String mStatus = "";
private int mScore = 0;
private int mFlashCards[];
private int mFlashCardAnswers[];

FlashCard(int noOfCards)
//initialize FlashCards Values here...
//N card = 2 x N interger values
 {}

private void pushValue(int fCardValue)
//store value to the Flash Card Stack
{}

private int popValue()
//get value to the Flash Card Stack
{
    return 143; // a value from the Flash Card Stack
}

private void initializeCards(int nCards)
//get value to the Flash Card Stack
{}

public String getFlashCard(int N)
 // This method will return N Flash Cards
 // This method will record the number of cards given
 // The values are space separated
   { // this are random numbers for 5 Flash Cards
       // sample return "20 5 7 86 9 6 86 8 93" ;
    }

 int getNextNum()
 //A Random Number Generator
   {
     int n;
     n = 3; //the value of n should be random
     return n;
    }

  public String getPlayerName()
   // returns the Player Name
  {
            return "player name"; //sample return
   }

  public String getStatus()
  // returns status message
  {
      return "Offline";
  }

  public int getScore()
    //returns score of the player
   {
       int score;
       score = 10; // sample data
       return score;
   }

  public int getNumberOfCards()
   //return the number of Cards given to the player
   {
         return numberOfCards;
    }

  public void setMode(String mode)
  //This method sets the operator for the flash Card
  //
  //Mode: Add, Mult, Div , Sub
  {}

  public void storeAnswer(int answer)
   //this method stores the answer by the client
   { }

  public void setPlayerName (String playerName)
    // store the name somewhere
   {}

  public void setPlayerStatus(String playerstatus)
       // this will set player status, store it somewhere
       // status may include: reading, typing answer etc...
       {}
}







Similar Threads
Thread Thread Starter Forum Replies Last Post
Greeting Card in C# ? KellyRainmaster BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 3 October 30th, 2007 05:06 PM
Sound Card Access. quixotic92 Pro Visual Basic 2005 0 May 3rd, 2007 02:32 PM
Wild Card Help * Corey Access 1 March 1st, 2007 11:42 AM
How to use C# to control I/O card? christykong2005 C# 4 February 5th, 2007 03:14 PM
developing an e-card "engine" nancy Flash (all versions) 1 December 6th, 2004 10:38 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.