[Uml-devel] [Bug 67260] New: on Java import, children classes become operations of parent
Ian Monroe
kde at monroe.nu
Tue Nov 4 19:13:07 UTC 2003
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=67260
Summary: on Java import, children classes become operations of
parent
Product: umbrello
Version: unspecified
Platform: Gentoo Packages
OS/Version: Linux
Status: UNCONFIRMED
Severity: normal
Priority: NOR
Component: general
AssignedTo: umbrello-devel at kde.org
ReportedBy: kde at monroe.nu
Version: (using KDE KDE 3.1.93)
Installed from: Gentoo Packages
Compiler: 3.2.3
OS: Linux
When I import Java classes, the children classes do not show up at all, and are instead listed as operations of there parent. At least that what happened when I did it with my program. I tried it with empty classes:
Parent.java:
abstract public class Parent
{
}
Child1.java:
public class Child1 extends Parent
{
}
And it didn't have any mention of Child1 at all. Here is the relevant files of my program:
Player.java:
abstract public class Player
{
private int itsScore = 0;
protected Board itsBoard;
private Player theOpponentPlayer;
private String nameOfPlayer;
Player(Player opponentPlayer, String newName)
{
itsBoard = new Board(opponentPlayer);
theOpponentPlayer = opponentPlayer;
nameOfPlayer = newName;
}
public int getScore( )
{
return itsScore;
}
public void increaseScore( int addThis )
{
itsScore += addThis;
}
public void clockTick( )
{
itsBoard.clockTick();
}
public void Start( )
{
}
public void Pause( )
{
}
public void Stop( )
{
}
public void Penalty(int Severity)
{
itsBoard.penalty(Severity);
}
/**
* @return the name of the player, for instance Human Player
*/
public String getNameOfPlayer() {
return nameOfPlayer;
}
}
ComputerPlayer.java:
/**
* Computer AI
*/
public class ComputerPlayer extends Player
{
ComputerPlayer(Player theHumanPlayer, String newName)
{
super(theHumanPlayer, newName);
}
public void clockTick()
{
super.clockTick();
System.out.println("clockTick #" + JMandala.getNumClockTicks() + ' '
+ super.getNameOfPlayer() + " :");
super.itsBoard.drawBoardTUI();
}
}
HumanPlayer.java:
/**
* Handles input from player and controls falling blocks.
*/
public class HumanPlayer extends Player
{
//private JMandala theRootObject;
/** Public methods: */
//public HumanPlayer( JMandala rootObject, Player opponentPlayer )
private boolean doBoardClockTick = true;
public HumanPlayer( Player opponentPlayer, String newName )
{
super(opponentPlayer, newName);
// super.clockTick();
//theRootObject = rootObject;
}
public void clockTick()
{
super.clockTick();
System.out.println(super.getNameOfPlayer() + " : ");
getTUICommand();
}
public void getTUICommand()
{
//snip
}
}
}
More information about the umbrello-devel
mailing list