⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 spot.java

📁 公交信息查询
💻 JAVA
字号:
// Spot.java
//该类用于描述地图上的一个点,包括名称,位置两个属性
import java.awt.*;
public class Spot
  {
    String name;
    Point  location;
  public Spot ( String name, Point location )
      {
        this.name=name;
        this.location=location;
      }
   public Spot ( )
      {
        
      }


  public Spot ( Spot spot )
      {
        this.name=spot.name;
        this.location=spot.location;
      
      }
   public Spot ( String name )  
       {
           this.name=name;
       }
  
  public  Spot getspot()
      {
          return this;
      }
  public void setspot( Spot spot)
      {
         this.name=spot.name;
         this.location=spot.location;
      }
  public  String getname()
      {
          return name;
      }
  public void setname( String name )
      {
         this.name=name;
      }

  public void setlocation( Point location )
      {
         this.location=location;
      }

   public  Point getlocation()
      {
         return location;
      }
   public void show()
      {
           System.out.print( name );

      }

   public String output()
      {
           String outData;
           outData=name;
           return outData;

      }
  }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -