Article View: borland.public.jbuilder.java.language
Article #18161need help with this jbuilder question?
From: javahelp
Date: Sat, 01 Aug 1998 00:00
Date: Sat, 01 Aug 1998 00:00
32 lines
1566 bytes
1566 bytes
Hi, I want to write a program by using Jbuilder but I'm new to Jbuilder
and have no idea but the basic structure is setup below
-------------
this is a games, there are three players one always return cooperate,
one always return defect and the other one will depend so I call it
lastbestchoice........I need the interface to communicate among
different object and a main (string to decide how to play the games and
record the score and print that on the execution log
---------------
public interface PlayerInt {
public char play(int opponent);
public void opponentsChoice(int opponent, TMyObj myObj);
}
public class Player1 implement PlayerInt
{return cooperate
}
public class Player2 implement PlayerInt
{return defect
}
public class Player3 implement PlayerInt
{if player1 is cooperate player3 will return defect and vice versa
}
public static void main(String args[])
{reponsible to keep the games playing about 100 times record the score
and print the score on the execution log
so here need some loop
}
Technical Details
Message-ID:
<35C2FDFB.8B5E011F@iname.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,b830a44b6ca5e0d1,start X-Google-Attributes: gidf74b3,public From: javahelp@iname.com Subject: need help with this jbuilder question? Date: 1998/08/01 Message-ID: <35C2FDFB.8B5E011F@iname.com> X-Deja-AN: 376946400 Content-Transfer-Encoding: 7bit X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: Another Netscape Collabra Server User Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.language