I created a Java Program for my final exam but i dont know - KingPin's Forum
KPsDenKPsDen ArmoryImage HostingLegendz text RPGIp DisplayIRCFlash Arcade
Forum
      |        
Register
         Evning to all (Posted By:LordAlien - Replies:2 - Views:24)      « »     Funny ass Scene (Posted By:Bionuclear - Replies:1 - Views:3)      « »     Heya! (Posted By:Bionuclear - Replies:2 - Views:11)      « »     if dick too long like my husband 25cm ,how to get inside me (Posted By:tarynana - Replies:0 - Views:2)      « »     Old Hillsbrad Foothills quest fixes (Posted By:badkid - Replies:11 - Views:159)      « »     Vote Reward ! (Posted By:bobmango - Replies:20 - Views:316)      « »     I have an event idea: Escort or Carry the flag (Posted By:Headshot - Replies:3 - Views:36)      « »     .trade in Reputation Item list (Posted By:jesseman - Replies:18 - Views:234)      « »     Reported Visitor Message by redemption (Posted By:redemption - Replies:0 - Views:1)      « »     You Know You're Addicted To WoW When (Posted By:Evul Bot! - Replies:97 - Views:788)      « »     
KingPin's Forum
 
K.P.s.N. Register vbBux / KPs Mall Bugs Blogs FAQ Search Today's Posts Mark Forums Read Donate
Go Back   KingPin's Forum > KP's Network Forum > RSS News
Reload this Page I created a Java Program for my final exam but i dont know
 


RSS News This is a discussion on I created a Java Program for my final exam but i dont know in the RSS News;
Description: how to reset it? Code is in the details section.? import java.awt.*; import hsa.Console; public class Finalproject { static Console ...

Reply
 
LinkBack Thread Tools
I created a Java Program for my final exam but i dont know
(#1 (permalink))
Old
I lie, i cheat , i steal! is Offline
Private
Points: 187, Level: 2 Points: 187, Level: 2 Points: 187, Level: 2
Activity: 0% Activity: 0% Activity: 0%
I lie, i cheat , i steal! is an unknown quantity at this point
 
I lie, i cheat , i steal!
Rupees: 80.00
Bank: 500.00
Total Rupees: 580.00
 
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Dec 2007
I created a Java Program for my final exam but i dont know - December 14th, 2007

how to reset it? Code is in the details section.? import java.awt.*;
import hsa.Console;

public class Finalproject
{
static Console a;
static Console b;
static Console c;
// The output console

public static void main (String[] args)
{
a = new Console ();

{
int pass;
a.println("PLease type in ur password");
pass = a.readInt ();
if (pass == 414)

{
a.print ("password is correct");
}
else if (pass != 414)
{
a.print ("ERROR:WORNG PASSWORD");
}
b = new Console();
b.print ("How To Play Soccer Triva");
b.println("\n\n The controls of this game is really simple. if u have a question lets say that for example :\n\n\t\t which team won the first world cup?\n\n a) brazil\t\t b) Germany.\n\n all u have to do is rype in the letter ");
b.println("Please type down any key to continue");
String playgame= b.readLine();

}
c = new Console();


c.setTextColor(Color.blue);
c.println ("Play Game & Game");
c.setTextColor(Color.black);
c.println ("Where was the first world cup game played in?");
c.println("\n 1)Germany, 2)Brazil, 3)Italy, 4)Urguary");
{
int answer;
c.println("Please type in your answer");
answer=c.readInt();
if (answer==1)
{
c.setTextColor(Color.green);
c.print(" Correct answer");
}
else if (answer !=1)
{
c.setTextColor(Color.red);
c.println("Wrong answer the correct answer is number 4");
}
}

 
Reply With Quote
Revenue Shared Ads
(#2 (permalink))
Old
quantumkev is Offline
Private
Points: 197, Level: 2 Points: 197, Level: 2 Points: 197, Level: 2
Activity: 0% Activity: 0% Activity: 0%
quantumkev is an unknown quantity at this point
 
quantumkev
Rupees: 5.50
Bank: 500.00
Total Rupees: 505.50
 
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Dec 2007
December 14th, 2007

I didn't study all of the code, but why do you declare the 3 "Console"s as static? That means their values cannot be changed, and it sound like that is what you are referring to. Try declaring them as 'public'.

 
Reply With Quote
Revenue Shared Ads
Reply

Bookmarks

Tags
created, exam, final, java, program

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Rupees Per Thread View: 1.00
Rupees Per Thread: 15.00
Rupees Per Post: 5.00
Forum Jump



Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
Copyright 2004-2009 KPsN


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81