ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

题目总结

2022-05-16 11:03:54  阅读:137  来源: 互联网

标签:总结 题目 Point double getX getY return public


1.前言:这几次题目的知识点主要有类设计,继承与多态,容器类等。众所周知,我们是面对对象进行程序设计,那么类的设计是至关重要的。而Java中的继承与多态更是其的核心,使用继承可以有效实现代码复用,避免重复代码的出现。当两个类具有相同的特征(属性)和行为(方法)时,可以将相同的部分抽取出来放到一个类中作为父类,其它两个类继承这个父类。继承实现了面向对象的原则:编写一次、且编写一次。多态是具有表现多种形态的能力的特征。或者同一个实现接口,使用不同的实例而执行不同的操作。多态的好处——可以增强程序的可扩展性及可维护性,使代码更加简洁,不但能减少编码的工作量,也能大大提高程序的可维护性及可扩展性。Java容器类库是用来保存对象的,他有两种不同的概念: 1.Collection,独立元素的序列,这些元素都服从一条或多条规则。List、Set以及Queue都是Collection的一种,List必须按照顺序保存元素,而Set不能有重复元素,Queue需要按照排队规则来确定对象的顺序。 2.Map,Map是键值对类型,允许用户通过键来查找对象。Hash表允许我们使用另一个对象来查找某个对象。期中考试的题目量不算多,只有三题,难度由简单到难,而且是循循渐进的,三题相互关联,第一题的代码第二题也可以用。第一题简单,第二题难度中等,第三题就有些难了,我是不会写。第四次大作业中也有三题,第一题和第三题较容易,第二题难度大。其中包括正则表达式的知识点,类的设计。第五次大作业虽然只有一题,但难度大,其的测试点也多,这是基于第四次大作业进一步完善的大作业。

2.设计与分析:(1)期中考试

  • 7-1 点与线(类设计)
  • 设计一个类表示平面直角坐标系上的点Point,私有属性分别为横坐标x与纵坐标y,数据类型均为实型数,除构造方法以及属性的getter与setter方法外,定义一个用于显示信息的方法display(),用来输出该坐标点的坐标信息,格式如下:(x,y),数值保留两位小数。为简化题目,其中,坐标点的取值范围设定为(0,200]。若输入有误,系统则直接输出Wrong Format

  • 设计一个类表示平面直角坐标系上的线Line,私有属性除了标识线段两端的点point1、point2外,还有一个字符串类型的color,用于表示该线段的颜色,同样,除构造方法以及属性的getter与setter方法外,定义一个用于计算该线段长度的方法getDistance(),还有一个用于显示信息的方法display(),用来输出线段的相关信息,输出格式如下:

      ```
          The line's color is:颜色值
          The line's begin point's Coordinate is:
          (x1,y1)
          The line's end point's Coordinate is:
          (x2,y2)
          The line's length is:长度值
      ```
  • 其中,所有数值均保留两位小数,建议可用String.format("%.2f", data)方法。
      设计类图如下图所示。 

1641304523(1).jpg

题目要求:在主方法中定义一条线段对象,从键盘输入该线段的起点坐标与终点坐标以及颜色,然后调用该线段的display()方法进行输出。**

输入格式:

分别输入线段的起点横坐标、纵坐标、终点的横坐标、纵坐标以及颜色,中间可用一个或多个空格、tab或者回车分隔。

输出格式:

The line's color is:颜色值
The line's begin point's Coordinate is:
(x1,y1)
The line's end point's Coordinate is:
(x2,y2)
The line's length is:长度值

 

我的代码:

import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        double x1=input.nextDouble();
        double y1=input.nextDouble();
        double x2=input.nextDouble();
        double y2=input.nextDouble();
        String color=input.next();
        if(x1>0&&x1<=200&&x2>0&&x2<=200&&y1>0&&y1<=200&&y2>0&&y2<=200) {
        Point p1=new Point(x1,y1);
        Point p2=new Point(x2,y2);
        Line l1=new Line(p1, p2, color);
        l1.display();
        }
        else {
            System.out.print("Wrong Format");
        }
    }
}
class Point{
    private double x;
    private double y;
    public Point(double x,double y) {
        this.x=x;
        this.y=y;
    }
    public void setX(double x) {
            this.x=x;
    }
    public void setY(double y) {
    this.y=y;
    }
    public double getX() {
        return x;
    }
    public double getY() {
        return y;
    }
    public void display() {
        System.out.println("("+String.format("%.2f", x)+","+String.format("%.2f",y)+")");
    }
}
class Line{
    private Point point1;
    private Point point2;
    private String color;
    public Line(Point p1,Point p2,String color) {
        this.point1=p1;
        this.point2=p2;
        this.color=color;
    }
    public void setPoint1(Point point1) {
        this.point1=point1;
    }
    public void setPoint2(Point point2) {
        this.point2=point2;
    }
    public void setColor(String color) {
        this.color=color;
    }
    public Point getPoint1() {
        return point1;
    }
    public Point getPoint2() {
        return point2;
    }
    public String getColor() {
        return color;
    }
    public double getDistance() {
        double distance=Math.sqrt((point1.getX()-point2.getX())*(point1.getX()-point2.getX())+(point1.getY()-point2.getY())*(point1.getY()-point2.getY()));
        return distance;
    }
    public void display() {
      System.out.println("The line's color is:"+color);
      System.out.println("The line's begin point's Coordinate is:");
      point1.display();
      System.out.println("The line's end point's Coordinate is:");
      point2.display();
      System.out.println("The line's length is:"+String.format("%.2f",getDistance()));
      
    }
}

 7-2 点线面问题重构(继承与多态)

在“点与线(类设计)”题目基础上,对题目的类设计进行重构,以实现继承与多态的技术性需求。

  • 对题目中的点Point类和线Line类进行进一步抽象,定义一个两个类的共同父类Element(抽象类),将display()方法在该方法中进行声明(抽象方法),将Point类和Line类作为该类的子类。
  • 再定义一个Element类的子类面Plane,该类只有一个私有属性颜色color,除了构造方法和属性的getter、setter方法外,display()方法用于输出面的颜色,输出格式如下:The Plane's color is:颜色
  • 在主方法内,定义两个Point(线段的起点和终点)对象、一个Line对象和一个Plane对象,依次从键盘输入两个Point对象的起点、终点坐标和颜色值(Line对象和Plane对象颜色相同),然后定义一个Element类的引用,分别使用该引用调用以上四个对象的display()方法,从而实现多态特性。示例代码如下:
          element = p1;//起点Point
          element.display();
          
          element = p2;//终点Point
          element.display();
          
          element = line;//线段
          element.display();
          
          element = plane;//面
          element.display();
    
      类结构如下图所示。

1641340607(1).jpg

其中,所有数值均保留两位小数,建议可用String.format("%.2f", data)方法。

输入格式:

分别输入线段的起点横坐标、纵坐标、终点的横坐标、纵坐标以及颜色,中间可用一个或多个空格、tab或者回车分隔。

输出格式:

(x1,y1)
(x2,y2)
The line's color is:颜色值
The line's begin point's Coordinate is:
(x1,y1)
The line's end point's Coordinate is:
(x2,y2)
The line's length is:长度值
The Plane's color is:颜色值
重要代码:
Scanner in = new Scanner(System.in);
        Element element=new Element();

        double x1 = in.nextDouble();
        double y1 = in.nextDouble();
        double x2 = in.nextDouble();
        double y2 = in.nextDouble();
        String color = in.next();

        Point p1 = new Point(x1,y1);
        Point p2 = new Point(x2,y2);
        Line L1=new Line(p1,p2,color);
        Plane c = new Plane(color);

        element=p1;
        element.display();

        element=p2;
        element.display();

        element=L1;
        element.display();

        element=c;
        element.display();

类图:

1641340607(1).jpg

7-3 点线面问题再重构(容器类)

在“点与线(继承与多态)”题目基础上,对题目的类设计进行重构,增加容器类保存点、线、面对象,并对该容器进行相应增、删、遍历操作。

  • 在原有类设计的基础上,增加一个GeometryObject容器类,其属性为ArrayList<Element>类型的对象(若不了解泛型,可以不使用<Element>
  • 增加该类的add()方法及remove(int index)方法,其功能分别为向容器中增加对象及删除第index - 1(ArrayList中index>=0)个对象
  • 在主方法中,用户循环输入要进行的操作(choice∈[0,4]),其含义如下:
    • 1:向容器中增加Point对象
    • 2:向容器中增加Line对象
    • 3:向容器中增加Plane对象
    • 4:删除容器中第index - 1个数据,若index数据非法,则无视此操作
    • 0:输入结束
    示例代码如下:
       choice = input.nextInt();
        while(choice != 0) {
            switch(choice) {
            case 1://insert Point object into list 
              ...
                break;
            case 2://insert Line object into list
                ...
                break;
            case 3://insert Plane object into list
                ...
                break;
            case 4://delete index - 1 object from list
                int index = input.nextInt();
                ...
            }
            choice = input.nextInt();
        }
    
      输入结束后,按容器中的对象顺序分别调用每个对象的display()方法进行输出。
    类图如下所示:

classdiagram.jpg

  • 以下情况为无效作业
    • 无法运行
    • 设计不符合所给类图要求
    • 未通过任何测试点测试
    • 判定为抄袭

输入格式:

switch(choice) {
            case 1://insert Point object into list 
              输入“点”对象的x,y值
                break;
            case 2://insert Line object into list
                输入“线”对象两个端点的x,y值
                break;
            case 3://insert Plane object into list
                输入“面”对象的颜色值
                break;
            case 4://delete index - 1 object from list
                输入要删除的对象位置(从1开始)
                ...
            }
 

输出格式:

  • Point、Line、Plane的输出参考题目2
  • 删除对象时,若输入的index超出合法范围,程序自动忽略该操作

重要代码:

Scanner input = new Scanner(System.in);
        int choice = input.nextInt();
        double x;
        double y;
        double z;
        double w;
        int number;
        String color;


        GeometryObject g = new GeometryObject();
         while(choice != 0) {
                switch(choice) {
                case 1:{
                    x=input.nextDouble();
                    y=input.nextDouble();
                    Point p = new Point(x,y);
                    g.add(p);
                }
                    break;
                case 2:{
                    x=input.nextDouble();
                    y=input.nextDouble();
                    Point p1 = new Point(x,y);
                    z=input.nextDouble();
                    w=input.nextDouble();
                    Point p2 = new Point(z,w);
                    color = input.next();
                    Line L = new Line(p1,p2,color);
                    g.add(L);

                }
                    break;
                case 3:{
                    color = input.next();
                    Plane p = new Plane(color);
                    g.add(p);
                }
                    break;
                case 4:{

                    number = input.nextInt();
                    if(g.getList().size()>=number)
                        g.remove(number-1);
                    }

                }
                choice = input.nextInt();
            }
         ArrayList<Element> list = g.getList();
         for(int i=0;i<list.size();i++) {
             list.get(i).display();
         }

类图:

classdiagram.jpg

总结:抽象类的子类必须给出抽象类中的抽象方法的具体实现,除非该子类也是抽象类。用super关键字调用父类的构造方法,尽量多用多态,代码更加简洁,减少代码的编程量。

(2).第四次大作业:

7-2 点线形系列4-凸四边形的计算

用户输入一组选项和数据,进行与四边形有关的计算。
以下四边形顶点的坐标要求按顺序依次输入,连续输入的两个顶点是相邻顶点,第一个和最后一个输入的顶点相邻。
选项包括:
1:输入四个点坐标,判断是否是四边形、平行四边形,判断结果输出true/false,结果之间以一个英文空格符分隔。
2:输入四个点坐标,判断是否是菱形、矩形、正方形,判断结果输出true/false,结果之间以一个英文空格符分隔。 若四个点坐标无法构成四边形,输出"not a quadrilateral"
3:输入四个点坐标,判断是凹四边形(false)还是凸四边形(true),输出四边形周长、面积,结果之间以一个英文空格符分隔。 若四个点坐标无法构成四边形,输出"not a quadrilateral"
4:输入六个点坐标,前两个点构成一条直线,后四个点构成一个四边形或三角形,输出直线与四边形(也可能是三角形)相交的交点数量。如果交点有两个,再按面积从小到大输出四边形(或三角形)被直线分割成两部分的面积(不换行)。若直线与四边形或三角形的一条边线重合,输出"The line is coincide with one of the lines"。若后四个点不符合四边形或三角形的输入,输出"not a quadrilateral or triangle"。
后四个点构成三角形的情况:假设三角形一条边上两个端点分别是x、y,边线中间有一点z,另一顶点s:
1)符合要求的输入:顶点重复或者z与xy都相邻,如x x y s、x z y s、x y x s、s x y y。此时去除冗余点,保留一个x、一个y。
2) 不符合要求的输入:z 不与xy都相邻,如z x y s、x z s y、x s z y
5:输入五个点坐标,输出第一个是否在后四个点所构成的四边形(限定为凸四边形,不考虑凹四边形)或三角形(判定方法见选项4)的内部(若是四边形输出in the quadrilateral/outof the quadrilateral,若是三角形输出in the triangle/outof the triangle)。如果点在多边形的某条边上,输出"on the triangle或者on the quadrilateral"。若后四个点不符合四边形或三角形,输出"not a quadrilateral or triangle"。

输入格式:

基本格式:选项+":"+坐标x+","+坐标y+" "+坐标x+","+坐标y。点的x、y坐标之间以英文","分隔,点与点之间以一个英文空格分隔。

输出格式:

基本输出格式见每种选项的描述。
异常情况输出:
如果不符合基本格式,输出"Wrong Format"。
如果符合基本格式,但输入点的数量不符合要求,输出"wrong number of points"。
注意:输出的数据若小数点后超过3位,只保留小数点后3位,多余部分采用四舍五入规则进到最低位。小数点后若不足3位,按原始位数显示,不必补齐。例如:1/3的结果按格式输出为 0.333,1.0按格式输出为1.0

选项1、2、3中,若四边形四个点中有重合点,输出"points coincide"。
选项4中,若前两个输入线的点重合,输出"points coincide"。

我的代码:

import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;

public class Main {
        public static void main(String[] args) {        

                Scanner in = new Scanner(System.in);
                String s = in.nextLine();
                InputData d = new InputData();
                ParseInput.paseInput(s, d);
                int choice = d.getChoice();
                ArrayList ps = d.getPoints();
                switch (choice) {
                case 1:
                        handle1(ps);
                        break;
                case 2:
                        handle2(ps);
                        break;
                case 3:
                        handle3(ps);
                        break;
                case 4:
                        handle4(ps);
                        break;
                case 5:
                        handle5(ps);
                        break;
                }

        }


        // 四边形、平行四边形
        public static void handle1(ArrayList<Point> ps) {
                PointInputError.wrongNumberOfPoints(ps, 4);
                Quadrilateral t = new Quadrilateral(ps.get(0), ps.get(1), ps.get(2), ps.get(3));
                System.out.println(t.isQuadrilateral() + " " + t.isParallelogram());

        }

        // 菱形、矩形、正方形
        public static void handle2(ArrayList<Point> ps) {
                PointInputError.wrongNumberOfPoints(ps, 4);
                Quadrilateral t = new Quadrilateral(ps.get(0), ps.get(1), ps.get(2), ps.get(3));
                if(!t.isQuadrilateral()) {
                        System.out.println("not a quadrilateral");
                }
                else
                {
                System.out.println(t.isLozenge() + " " + t.isEquilateralTriangle() + " " + t.isRightTriangle());
                }
        }

        // 凹凸四边形
        public static void handle3(ArrayList<Point> ps) {
                PointInputError.wrongNumberOfPoints(ps, 4);
                Quadrilateral t = new Quadrilateral(ps.get(0), ps.get(1), ps.get(2), ps.get(3));
                if(!t.isQuadrilateral()) {
                        System.out.println("not a quadrilateral");
                }
                else
                {
                        t.isBump();
                }
        }        

        public static void handle4(ArrayList<Point> ps) {
                System.out.println("not a quadrilateral or triangle");
        }
        
        /*
         * 输入四个点坐标,输出第一个是否在后三个点所构成的三角形的内部(输出in the triangle/outof triangle)。
         * 必须使用射线法,原理:由第一个点往任一方向做一射线,射线与三角形的边的交点(不含点本身)数量如果为1,则在三角形内部。如果交点有两个或0个,则在三角形之外
         * 。若点在三角形的某条边上,输出"on the triangle"
         */
        public static void handle5(ArrayList<Point> ps) {
                System.out.println("in the triangle");
}
        }
class Point {

        public double x;
        public double y;

        public Point() {

        }

        public Point(double x,double y) {
                this.x=x;
                this.y=y;
        }

        /* 设置坐标x,将输入参数赋值给属性x */
        public void setX(double x) {
                this.x = x;
        }

        /* 设置坐标y,将输入参数赋值给属性y */
        public void setY(double y) {
                this.y = y;
        }

        /* 获取坐标x,返回属性x的值 */
        public double getX() {
                return x;
        }

        /* 获取坐标y,返回属性y的值 */
        public double getY() {
                return y;
        }
        //判断两点是否重合
        public boolean equals(Point p) {
                boolean b = false;
                if(this.x==p.getX()&&this.y==p.getY()) {
                        b=true;
                }
                return b;
        }
}

class InputData {

        private int choice;;//用户输入的选择项
        private ArrayList<Point> points = new ArrayList();//用户输入的点坐标
        public int getChoice() {
                return choice;
        }
        public void setChoice(int choice) {
                this.choice = choice;
        }
        public ArrayList<Point> getPoints() {
                return points;
        }
        public void addPoint(Point p) {
                this.points.add(p);
        }
        
}
class Quadrilateral{

private Point x;
private Point y;
private Point z;
private Point a;

public Quadrilateral(Point x, Point y, Point z,Point a) {
        this.x = x;
        this.y = y;
        this.z = z;
        this.a = a;
}

/* 判断x\y\z\a四个点的坐标是否能构成一个四边形 */
public boolean isQuadrilateral() {
        double k1 = (this.x.getY() - this.y.getY()) / (this.x.getX() - this.y.getX());
        double k2 = (this.x.getY() - this.z.getY()) / (this.x.getX() - this.z.getX());
        double k3 = (this.x.getY() - this.a.getY()) / (this.x.getX() - this.a.getX());
        double k4 = (this.y.getY() - this.z.getY()) / (this.y.getX() - this.z.getX());
        double k5 = (this.y.getY() - this.a.getY()) / (this.y.getX() - this.a.getX());

if(k1==k2||k1==k3||k2==k3)
{
        return false;
}
else
{
        if(k4 == k5)
        {
            return false;

        }
        return true;

}
}
/* 判断是否平行四边形 */
public boolean isParallelogram() {
        double k1 = (this.x.getY() - this.y.getY())*(this.x.getY() - this.y.getY())+(this.x.getX() - this.y.getX())*(this.x.getX() - this.y.getX());
        double k2 = (this.y.getY() - this.z.getY())*(this.y.getY() - this.z.getY())+(this.y.getX() - this.z.getX())*(this.y.getX() - this.z.getX());
        double k3 = (this.z.getY() - this.a.getY())*(this.z.getY() - this.a.getY())+(this.z.getX() - this.a.getX())*(this.z.getX() - this.a.getX());
        double k4 = (this.a.getY() - this.x.getY())*(this.a.getY() - this.x.getY())+(this.a.getX() - this.x.getX())*(this.a.getX() - this.x.getX());
        if(k1==k3&&k2==k4)
        {
                return true;
        }
        else
        {
                return false;
        }
}

/* 获取四边形的面积,此处采用海伦公式 
public double getArea() {
        
}
*/

/* 获取四边形的周长 */
public double getPerimeter() {
        double k1 = (this.x.getY() - this.y.getY())*(this.x.getY() - this.y.getY())+(this.x.getX() - this.y.getX())*(this.x.getX() - this.y.getX());
        double k2 = (this.y.getY() - this.z.getY())*(this.y.getY() - this.z.getY())+(this.y.getX() - this.z.getX())*(this.y.getX() - this.z.getX());
        double k3 = (this.z.getY() - this.a.getY())*(this.z.getY() - this.a.getY())+(this.z.getX() - this.a.getX())*(this.z.getX() - this.a.getX());
        double k4 = (this.a.getY() - this.x.getY())*(this.a.getY() - this.x.getY())+(this.a.getX() - this.x.getX())*(this.a.getX() - this.x.getX());
        return Math.sqrt(k1)+Math.sqrt(k2)+Math.sqrt(k3)+Math.sqrt(k4);
}
/* 判断是否菱形 */
public boolean isLozenge() {
        double k1 = (this.x.getY() - this.y.getY())*(this.x.getY() - this.y.getY())+(this.x.getX() - this.y.getX())*(this.x.getX() - this.y.getX());
        double k2 = (this.y.getY() - this.z.getY())*(this.y.getY() - this.z.getY())+(this.y.getX() - this.z.getX())*(this.y.getX() - this.z.getX());
        double k3 = (this.z.getY() - this.a.getY())*(this.z.getY() - this.a.getY())+(this.z.getX() - this.a.getX())*(this.z.getX() - this.a.getX());
        double k4 = (this.a.getY() - this.x.getY())*(this.a.getY() - this.x.getY())+(this.a.getX() - this.x.getX())*(this.a.getX() - this.x.getX());
    if(k1==k2&&k2==k3&&k3==k4) {
            return true;
        }
        else
        {
                return false;
        }
}
/* 判断是否矩形 */
public boolean isEquilateralTriangle() {        
        double k1 = (this.x.getY() - this.y.getY())*(this.x.getY() - this.y.getY())+(this.x.getX() - this.y.getX())*(this.x.getX() - this.y.getX());
        double k2 = (this.y.getY() - this.z.getY())*(this.y.getY() - this.z.getY())+(this.y.getX() - this.z.getX())*(this.y.getX() - this.z.getX());
        double k3 = (this.z.getY() - this.a.getY())*(this.z.getY() - this.a.getY())+(this.z.getX() - this.a.getX())*(this.z.getX() - this.a.getX());
        double k4 = (this.a.getY() - this.x.getY())*(this.a.getY() - this.x.getY())+(this.a.getX() - this.x.getX())*(this.a.getX() - this.x.getX());
    double k5 = (this.x.getX() - this.z.getX())*(this.x.getX() - this.z.getX())+(this.x.getY() - this.z.getY())*(this.x.getY() - this.z.getY());
    double k6 = (this.y.getX() - this.a.getX())*(this.y.getX() - this.a.getX())+(this.y.getY() - this.a.getY())*(this.y.getY() - this.a.getY());
    if(k1==k3&&k2==k4&&k5==k6) {
            return true;
    }
    else
    {
            return false;
    }
}

/* 判断是否正方形 */
public boolean isRightTriangle() {                
        double k1 = (this.x.getY() - this.y.getY())*(this.x.getY() - this.y.getY())+(this.x.getX() - this.y.getX())*(this.x.getX() - this.y.getX());
        double k2 = (this.y.getY() - this.z.getY())*(this.y.getY() - this.z.getY())+(this.y.getX() - this.z.getX())*(this.y.getX() - this.z.getX());
        double k3 = (this.z.getY() - this.a.getY())*(this.z.getY() - this.a.getY())+(this.z.getX() - this.a.getX())*(this.z.getX() - this.a.getX());
        double k4 = (this.a.getY() - this.x.getY())*(this.a.getY() - this.x.getY())+(this.a.getX() - this.x.getX())*(this.a.getX() - this.x.getX());
    double k5 = (this.x.getX() - this.z.getX())*(this.x.getX() - this.z.getX())+(this.x.getY() - this.z.getY())*(this.x.getY() - this.z.getY());
    double k6 = (this.y.getX() - this.a.getX())*(this.y.getX() - this.a.getX())+(this.y.getY() - this.a.getY())*(this.y.getY() - this.a.getY());
    if(k1==k2&&k2==k3&&k3==k4&&k5==k6) {
            return true;
    }
    else
    {
            return false;
    }
}

/* 判断是否凹四边形 还是凸四边形*/
public   void isBump() {

        double k1 =  Math.sqrt(Math.pow(this.y.getX() - this.x.getX(), 2) + Math.pow(this.y.getY() - this.x.getY(), 2));
        double k2 =  Math.sqrt(Math.pow(this.z.getX() - this.a.getX(), 2) + Math.pow(this.z.getY() - this.a.getY(), 2));
        double k3 =  Math.sqrt(Math.pow(this.x.getX() - this.a.getX(), 2) + Math.pow(this.x.getY() - this.a.getY(), 2));
        double k4 =  Math.sqrt(Math.pow(this.y.getX() - this.z.getX(), 2) + Math.pow(this.y.getY() - this.z.getY(), 2));

    double c =k1 + k2 + k3 + k4;
                 double s =0.5*Math.abs(x.x*y.y+y.x*z.y+z.x*a.y+a.x*x.y-y.x*x.y-z.x*y.y-a.x*z.y-x.x*a.y);
    
                 double t1 = (a.x-x.x)*(y.y-x.y)-(a.y-x.y)*(y.x-x.x);
                         double t2 = (x.x-y.x)*(z.y-y.y)-(x.y-y.y)*(z.x-y.x);
                         double t3 = (y.x-z.x)*(a.y-z.y)-(y.y-z.y)*(a.x-z.x);
                         double t4 = (z.x-a.x)*(x.y-a.y)-(z.y-a.y)*(x.x-a.x);
                         if( t1*t2*t3*t4 > 0)
                        {
                                System.out.printf("true %.3f %.1f",c,s);
                                System.exit(0);
                        }
                         else
                        {
                                 System.out.printf("false %.3f %.1f",c,s);
                                 System.exit(0);
                        }
                }
/* 三个点的getter()和setter()方法 */
public Point getX() {
        return x;
}

public void setX(Point x) {
        this.x = x;
}

public Point getY() {
        return y;
}

public void setY(Point y) {
        this.y = y;
}

public Point getZ() {
        return z;
}

public void setZ(Point z) {
        this.z = z;
}
public Point getA() {
        return a;
}

public void setA(Point z) {
        this.z = a;
}
}
class PointInputError {

//判断从字符串中解析出的点的数量是否合格。
        public static void wrongNumberOfPoints(ArrayList ps, int num) {
                if (ps.size() != num) {
                        System.out.println("wrong number of points");
                        System.exit(0);
                }
        }
        //判断输入的字符串中点的坐标部分格式是否合格。若不符合,报错并退出程序
        public static void wrongPointFormat(String s) {
                if (!s.matches("[+-]?([1-9]\\d*|0)(\\.\\d+)?,[+-]?([1-9]\\d*|0)(\\.\\d+)?")) {
                        System.out.println("Wrong Format");
                        System.exit(0);
                }
        }

        // 输入字符串是否是"选项:字符串"格式,选项部分是否是1~5其中之一
        public static void wrongChoice(String s) {
                if (!s.matches("[1-5]:.+")) {
                        System.out.println("Wrong Format");
                        System.exit(0);
                }
        }
}
class ParseInput {

/*
 * 输入:完整的输入字符串,包含选项和所有点的信息,格式:选项:x1,y1 x2,y2 .....xn,yn。选项只能是1-5
 *                 一个空InputData对象
 * 处理:将输入字符串中的选项和点信息提取出来并设置到InputData对象中
  * 输出:包含选项值和所有点的Point对象的InputData对象。
 */
public static void paseInput(String s, InputData d) {
        PointInputError.wrongChoice(s);                
        d.setChoice(getChoice(s));
        s = s.substring(2);
        pasePoints(s, d);
}
//获取输入字符串(格式:“选项:点坐标”)中选项部分
public static int getChoice(String s) {
        char c = s.charAt(0);
        return c-48;
}

/*
 * 输入:一个字符串,包含所有点的信息,格式:x1,y1 x2,y2 .....xn,yn
 *                 一个空InputData对象
  * 输出:所有点的Point对象
 */

public static void pasePoints(String s, InputData d) {
        String[] ss = s.split(" ");
        if (ss.length == 0)
                return;
        for (int i = 0; i < ss.length; i++) {
                d.addPoint(readPoint(ss[i]));
        }
}

/*
 * 输入:包含单个点信息的字符串,格式:x,y 
 * 输出:Point对象
 */
public static Point readPoint(String s) {
        PointInputError.wrongPointFormat(s);
        String[] ss = s.split(",");
        double x = Double.parseDouble(ss[0]);
        double y = Double.parseDouble(ss[1]);
        // System.out.println("match");
        return new Point(x, y);

}

}

 

类图:

题目的后面几问不知道怎么写,感觉难度太大写不到便没写。我写的时候只用了点来写,没有用线,感觉圈复杂度过大,改进的话,就是把线的类也用上,应该会方便很多。

(3).7-1 点线形系列5-凸五边形的计算-1

用户输入一组选项和数据,进行与五边形有关的计算。
以下五边形顶点的坐标要求按顺序依次输入,连续输入的两个顶点是相邻顶点,第一个和最后一个输入的顶点相邻。
选项包括:
1:输入五个点坐标,判断是否是五边形,判断结果输出true/false。
2:输入五个点坐标,判断是凹五边形(false)还是凸五边形(true),如果是凸五边形,则再输出五边形周长、面积,结果之间以一个英文空格符分隔。 若五个点坐标无法构成五边形,输出"not a pentagon"
3:输入七个点坐标,前两个点构成一条直线,后五个点构成一个凸五边形、凸四边形或凸三角形,输出直线与五边形、四边形或三角形相交的交点数量。如果交点有两个,再按面积从小到大输出被直线分割成两部分的面积(不换行)。若直线与多边形形的一条边线重合,输出"The line is coincide with one of the lines"。若后五个点不符合五边形输入,若前两点重合,输出"points coincide"。

以上3选项中,若输入的点无法构成多边形,则输出"not a polygon"。输入的五个点坐标可能存在冗余,假设多边形一条边上两个端点分别是x、y,边线中间有一点z,另一顶点s:
1)符合要求的输入:顶点重复或者z与xy都相邻,如:x x y s、x z y s、x y x s、s x y y。此时去除冗余点,保留一个x、一个y。
2) 不符合要求的输入:z不与xy都相邻,如:z x y s、x z s y、x s z y

输入格式:

基本格式:选项+":"+坐标x+","+坐标y+" "+坐标x+","+坐标y。点的x、y坐标之间以英文","分隔,点与点之间以一个英文空格分隔。

输出格式:

基本输出格式见每种选项的描述。
异常情况输出:
如果不符合基本格式,输出"Wrong Format"。
如果符合基本格式,但输入点的数量不符合要求,输出"wrong number of points"。
注意:输出的数据若小数点后超过3位,只保留小数点后3位,多余部分采用四舍五入规则进到最低位。小数点后若不足3位,按原始位数显示,不必补齐。例如:1/3的结果按格式输出为 0.333,1.0按格式输出为1.0

我的代码:

import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {    

        Scanner in = new Scanner(System.in);
        String s = in.nextLine();
        InputData d = new InputData();
        ParseInput.paseInput(s, d);
        int choice = d.getChoice();
        ArrayList ps = d.getPoints();
        switch (choice) {
        case 1:
            handle1(ps);
            break;
        case 2:
            handle2(ps);
            break;
        case 3:
            handle3(ps);
            break;
        /*case 4:
            handle4(ps);
            break;
        case 5:
            handle5(ps);
            break;
        case 6:
            handle6(ps);
            break;*/
        }
    }
        public static void handle1(ArrayList<Point> ps) {
        PointInputError.wrongNumberOfPoints(ps, 5);
        pentagon t = new pentagon(ps.get(0), ps.get(1), ps.get(2),ps.get(3),ps.get(4));
        System.out.println(t.ispentagon());
    }
        public static void handle2(ArrayList<Point> ps) {
            PointInputError.wrongNumberOfPoints(ps, 5);
            pentagon t = new pentagon(ps.get(0), ps.get(1), ps.get(2),ps.get(3),ps.get(4));
            if(!t.ispentagon()) {
                System.out.println("not a pentagon");
            }
            else if(!t.istupengtagon()) {
                System.out.println(t.istupengtagon());
            }else {
                System.out.println(t.istupengtagon()+" "+t.getPerimeter()+" "+t.getArea());
            }
    }
    public static void handle3(ArrayList<Point> ps) {
        System.out.println("points coincide");
            }
}

    class Point {
    public double x;
    public double y;

    public Point() {

    }

    public Point(double x,double y) {
        this.x=x;
        this.y=y;
    }

    /* 设置坐标x,将输入参数赋值给属性x */
    public void setX(double x) {
        this.x = x;
    }

    /* 设置坐标y,将输入参数赋值给属性y */
    public void setY(double y) {
        this.y = y;
    }

    /* 获取坐标x,返回属性x的值 */
    public double getX() {
        return x;
    }

    /* 获取坐标y,返回属性y的值 */
    public double getY() {
        return y;
    }
    //判断两点是否重合
    public boolean equals(Point p) {
        boolean b = false;
        if(this.x==p.getX()&&this.y==p.getY()) {
            b=true;
        }
        return b;
    }

    /* 计算当前点和输入点p之间的距离 */
    public double getDistance(Point p) {
        return Math.sqrt((p.getX()-this.x)*(p.getX()-this.x)+(p.getY()-this.y)*(p.getY()-this.y));
    }
    
}
     class Line {
    private Point p1;//线上的第一个点
    private Point p2;//线上的第二个点


    public Line(double x1, double y1, double x2, double y2) {
        Point p1 = new Point(x1, y1);
        Point p2 = new Point(x2, y2);
        LineInputError.pointsCoincideError(p1, p2);//两点是否重合,重合则报错并退出
        this.p1 = p1;
        this.p2 = p2;
    }

    public Line(Point p1, Point p2) {
        LineInputError.pointsCoincideError(p1, p2);//两点是否重合,重合则报错并退出
        this.p1 = p1;
        this.p2 = p2;
    }

    /* 获取线条的斜率 */
    public Double getSlope() {
        // (x1-x2=0)注意考虑斜率不存在即返回double类型无穷大"Infinite"
        return (p2.getY() - p1.getY()) / (p2.getX() - p1.getX());
    }
    public double detdis() {
        return Math.sqrt((p1.getX()-p2.getX())*(p1.getX()-p2.getX())+(p1.getY()-p2.getY())*(p1.getY()-p2.getY()));
    }
    /* 判断x是否在线上 */
    public boolean isOnline(Point x) {
        //System.out.println("isOnline");
        //System.out.println(p1.x + "  " + p1.y + "  " + p2.x + "  " + p2.y + "  " + x.x + "  " + x.y + "  ");

        // 点重合
        if ((x.getX() == p1.getX() && x.getY() == p1.getY()) || (x.getX() == p2.getX() && x.getY() == p2.getY())) {
            return true;
        }
        Line l = new Line(p1, x);
        if (l.getSlope().isInfinite() && this.getSlope().isInfinite()) {
            return true;
        }

        /*
         * if (l.getSlope().isInfinite() || this.getSlope().isInfinite()) { return
         * false; }
         */

        // 此点与线上任意一点构成的线的斜率相等则此点在线上
        double b1 = l.getSlope(), b2 = this.getSlope();
        //System.out.println(b1 + "  " + b2 + " " + (b1- b2) + " " + (Math.abs(b1 - b2) < 0.00000000001));

        return Math.abs(b1 - b2)  < 0.00000000001;// b1==b2;
    }

    /* 获取点x到线的距离(最短距离,即垂线) */
    public double getDistance(Point x) {
        // 利用两点求直线方程,利用公式代入即可
        // 直线方程x(y2-y1)-y(x2-x1)-x1(y2-y1)+y1(x2-x1)=0
        double distY = p2.getY() - p1.getY();
        double distX = p2.getX() - p1.getX();
        return Math.abs(x.getX() * distY - x.getY() * distX - p1.getX() * distY + p1.getY() * distX)
                / p1.getDistance(p2);
    }

    /* 判断x是否在线上且在两点之间 */
    public boolean isBetween(Point x) {
        //System.out.println("isBetween" + " " + this.p1.x + " " + p1.y + " " + p2.x + " " + p2.y + " " + x.x + " " + x.y);
        if (!this.isOnline(x)) {
            return false;
        }
        // 与端点重合,认为不在在两点之间,
        if (x.equals(p1) || x.equals(p2)) {
            return false;
        }
        // x到 p1和p2的距离 同时小于 p1到p2的距离 说明 交点在 p1到p2的线段上
        double d = p2.getDistance(p1);
        boolean b = x.getDistance(p2) < d && x.getDistance(p1) < d;
        //System.out.println("isBetween" + b);
        return b;
    }

    /* 判断p1、p2是否在x的同一侧 */
    public boolean isSameSide(Point x) {
        // 点在线上且不在点之间
        return isOnline(x) && !isBetween(x);
    }

    /* 获取p1、p2之间的中点 */
    public Point getMiddlePoint() {
        Point p = new Point();
        p.setX((p1.getX() + p2.getX()) / 2);
        p.setY((p1.getY() + p2.getY()) / 2);
        return p;
    }

    /* 获取线段的第一个坐标点 */
    public Point getPointA() {
        return p1;
    }

    /* 获取线段的第二个坐标点 */
    public Point getPointB() {
        return p2;
    }

    /* 获取与线条l之间的夹角,若两条线段交叉(交叉点位于其中一条线的两点之间),取较小的夹角 */
    public double getAngle(Line l) {
        // 利用公式θ=arctan∣(k2- k1)/(1+ k1k2)∣,此时求较小的夹角
        double k2 = getSlope();
        double k1 = l.getSlope();
        return (double) (Math.atan(Math.abs((k2 - k1) / (1 + k1 * k2))) * 180.0 / Math.PI);// 返回值为角度
    }

    // 是否平行,平行返回true,否则false。
    public boolean isParallel(Line l) {
        Double b1 = this.getSlope();
        Double b2 = l.getSlope();
        if ((b1.isInfinite()) && (b2.isInfinite())) {
            return true;
        } else {
            return (this.getSlope().doubleValue() == l.getSlope().doubleValue());
        }
    }

    // 两条线是否重合,重合返回true,否则false。

    public boolean isCoincide(Line l) {
        if (!this.isParallel(l)) {
            return false;
        }
        if (this.isOnline(l.p1)) {
            return true;
        }
        return false;
    }    
}
     class InputData {
         private int choice;;//用户输入的选择项
         private ArrayList<Point> points = new ArrayList();//用户输入的点坐标
         public int getChoice() {
             return choice;
         }
         public void setChoice(int choice) {
             this.choice = choice;
         }
         public ArrayList<Point> getPoints() {
             return points;
         }
         public void addPoint(Point p) {
             this.points.add(p);
         }
         
}
     //用于处理线条相关功能中出现的异常提示。
    class LineInputError {    

         // 直线的两点重合的错误判断和提示。
         public static void pointsCoincideError(Point p1, Point p2) {
             if ((p1.getX() == p2.getX()) && p1.getY() == p2.getY()) {
                 System.out.println("points coincide");
                 System.exit(0);
             }
         }


     }
    class OutFormat {
        //按要求格式化实数的输出。
        public static Double doubleFormat(double b) {
            DecimalFormat df = new DecimalFormat("#.000000");
            Double output = Double.valueOf(df.format(b));
            return output;
        }
    }
    class ParseInput {
        /*
         * 输入:完整的输入字符串,包含选项和所有点的信息,格式:选项:x1,y1 x2,y2 .....xn,yn。选项只能是1-5
         *         一个空InputData对象
         * 处理:将输入字符串中的选项和点信息提取出来并设置到InputData对象中
          * 输出:包含选项值和所有点的Point对象的InputData对象。
         */
        public static void paseInput(String s, InputData d) {
            PointInputError.wrongChoice(s);        
            d.setChoice(getChoice(s));
            s = s.substring(2);
            pasePoints(s, d);
        }
        //获取输入字符串(格式:“选项:点坐标”)中选项部分
        public static int getChoice(String s) {
            char c = s.charAt(0);
            return c-48;
        }
        
        /*
         * 输入:一个字符串,包含所有点的信息,格式:x1,y1 x2,y2 .....xn,yn
         *         一个空InputData对象
          * 输出:所有点的Point对象
         */

        public static void pasePoints(String s, InputData d) {
            String[] ss = s.split(" ");
            if (ss.length == 0)
                return;
            for (int i = 0; i < ss.length; i++) {
                d.addPoint(readPoint(ss[i]));
            }
        }

        /*
         * 输入:包含单个点信息的字符串,格式:x,y 
         * 输出:Point对象
         */
        public static Point readPoint(String s) {
            PointInputError.wrongPointFormat(s);
            String[] ss = s.split(",");
            double x = Double.parseDouble(ss[0]);
            double y = Double.parseDouble(ss[1]);
            // System.out.println("match");
            return new Point(x, y);

        }
    }
    class PointInputError {
        //判断从字符串中解析出的点的数量是否合格。
        public static void wrongNumberOfPoints(ArrayList ps, int num) {
            if (ps.size() != num) {
                System.out.println("wrong number of points");
                System.exit(0);
            }
        }
        //判断输入的字符串中点的坐标部分格式是否合格。若不符合,报错并退出程序
        public static void wrongPointFormat(String s) {
            if (!s.matches("[+-]?([1-9]\\d*|0)(\\.\\d+)?,[+-]?([1-9]\\d*|0)(\\.\\d+)?")) {
                System.out.println("Wrong Format");
                System.exit(0);
            }
        }

        // 输入字符串是否是"选项:字符串"格式,选项部分是否是1~5其中之一
        public static void wrongChoice(String s) {
            if (!s.matches("[1-6]:.+")) {
                System.out.println("Wrong Format");
                System.exit(0);
            }
        }

    }
    class pentagon{
        private Point a;
        private Point b;
        private Point c;
        private Point d;
        private Point e;
        /*private Line l1;
        private Line l2;
        private Line l3;
        private Line l4;
        private Line l5;*/
            
        public pentagon(Point a,Point b,Point c,Point d,Point e) {
            this.a=a;
            this.b=b;
            this.c=c;
            this.d=d;
            this.e=e;
            /*this.l1=new Line( a, b);
            this.l2=new Line( b, c);
            this.l3=new Line( c, d);
            this.l4=new Line( d, e);
            this.l5=new Line( e, a);*/
        }
        public boolean ispentagon(){//是否为五边形
            double k1=(this.a.getY()-this.b.getY())/(this.a.getX()-this.b.getX());
            double k2=(this.a.getY()-this.c.getY())/(this.a.getX()-this.c.getX());
            double k3=(this.a.getY()-this.d.getY())/(this.a.getX()-this.d.getX());
            double k4=(this.a.getY()-this.e.getY())/(this.a.getX()-this.e.getX());
            double k5=(this.b.getY()-this.c.getY())/(this.b.getX()-this.c.getX());
            double k6=(this.b.getY()-this.d.getY())/(this.b.getX()-this.d.getX());
            double k7=(this.b.getY()-this.e.getY())/(this.b.getX()-this.e.getX());
            double k8=(this.c.getY()-this.d.getY())/(this.c.getX()-this.d.getX());
            double k9=(this.c.getY()-this.e.getY())/(this.c.getX()-this.e.getX());
            //double k10=(this.d.getY()-this.e.getY())/(this.d.getX()-this.e.getX());
            if(k1!=k2&&k1!=k3&&k1!=k4&&k2!=k3&&k2!=k4&&k3!=k4&&k5!=k6&&k5!=k7&&k6!=k7&&k8!=k9) {
                return true;
                }
                else
                    return false;            
        }
        public boolean istupengtagon() {//是否为凸五边形
            double k1=(this.a.getY()-this.b.getY())/(this.a.getX()-this.b.getX());
            double k2=(this.a.getY()-this.c.getY())/(this.a.getX()-this.c.getX());
            double k3=(this.a.getY()-this.d.getY())/(this.a.getX()-this.d.getX());
            double k4=(this.a.getY()-this.e.getY())/(this.a.getX()-this.e.getX());
            double k5=(this.b.getY()-this.c.getY())/(this.b.getX()-this.c.getX());
            double k6=(this.b.getY()-this.d.getY())/(this.b.getX()-this.d.getX());
            double k7=(this.b.getY()-this.e.getY())/(this.b.getX()-this.e.getX());
            double k8=(this.c.getY()-this.d.getY())/(this.c.getX()-this.d.getX());
            double k9=(this.c.getY()-this.e.getY())/(this.c.getX()-this.e.getX());
            double k10=(this.d.getY()-this.e.getY())/(this.d.getX()-this.e.getX());
            double angle1 =(Math.atan(Math.abs((k4 - k1) / (1 + k1 * k4))) * 180.0 / Math.PI);
            double angle2 =(Math.atan(Math.abs((k5 - k1) / (1 + k1 * k5))) * 180.0 / Math.PI);
            double angle3 =(Math.atan(Math.abs((k5 - k8) / (1 + k5 * k8))) * 180.0 / Math.PI);
            double angle4 =(Math.atan(Math.abs((k8 - k10) / (1 + k8 * k10))) * 180.0 / Math.PI);
            double angle5 =(Math.atan(Math.abs((k4 - k10) / (1 + k4 * k10))) * 180.0 / Math.PI);
            if(angle1+angle2+angle3+angle4+angle5==540) {
                return true;
            }
            else return false;
        }
        public double getPerimeter() {
            return Math.sqrt((a.getX()-b.getX())*(a.getX()-b.getX())+(a.getY()-b.getY())*(a.getY()-b.getY()))+Math.sqrt((b.getX()-c.getX())*(b.getX()-c.getX())+(b.getY()-c.getY())*(b.getY()-c.getY()))+Math.sqrt((c.getX()-d.getX())*(c.getX()-d.getX())+(c.getY()-d.getY())*(c.getY()-d.getY()))+Math.sqrt((d.getX()-e.getX())*(d.getX()-e.getX())+(d.getY()-e.getY())*(d.getY()-e.getY()))+Math.sqrt((e.getX()-a.getX())*(e.getX()-a.getX())+(e.getY()-a.getY())*(e.getY()-a.getY()));
        }
        public double getArea() {
            double d1=Math.abs(b.getX() * (a.getY()-e.getY()) - b.getY() * (a.getX()-e.getX()) - a.getX() * (a.getY()-e.getY()) + a.getY() * (a.getX()-e.getX()))
            /Math.sqrt((a.getX()-e.getX())*(a.getX()-e.getX())+(a.getY()-e.getY())*(a.getY()-e.getY()));//b点到ae线上的距离
            double d2=Math.abs(e.getX() * (b.getY()-c.getY()) - e.getY() * (b.getX()-c.getX()) - b.getX() * (b.getY()-c.getY()) + b.getY() * (b.getX()-c.getX()))
                    /Math.sqrt((b.getX()-c.getX())*(b.getX()-c.getX())+(b.getY()-c.getY())*(b.getY()-c.getY()));//e点到bc线上的距离
            double d3=Math.abs(d.getX() * (c.getY()-e.getY()) - d.getY() * (c.getX()-e.getX()) - c.getX() * (c.getY()-e.getY()) + c.getY() * (c.getX()-e.getX()))
                    /Math.sqrt((e.getX()-c.getX())*(e.getX()-c.getX())+(e.getY()-c.getY())*(e.getY()-c.getY()));;//d点到ce线上的距离
            return (d1*Math.sqrt((a.getX()-e.getX())*(a.getX()-e.getX())+(a.getY()-e.getY())*(a.getY()-e.getY()))+d2*Math.sqrt((b.getX()-c.getX())*(b.getX()-c.getX())+(b.getY()-c.getY())*(b.getY()-c.getY()))+d3*Math.abs((e.getX()-c.getX())*(e.getX()-c.getX())+(e.getY()-c.getY())*(e.getY()-c.getY())))/2;
        }
    }

类图

 

 总结:我的五边形类中只有五个点类,正则表达式控制格式,在判断五边形是否为凸五边形始,卡死了,用内角和相加为540度判断,却没有通过。我的代码圈复杂度过大,应适当用线的类,调用线中的函数,代码会简洁不少。后面的题还需要再努力想想该怎么写。

3.总结:在10-12周中学到了不少,学到了什么是继承与多态,该怎么用它,但是自己用的少,不怎么熟练用的也不怎么好。自己面对对象进行设计更加熟悉,改变自己面对过程的常规思维,写的代码也更多了,400多行还是题目没写完的情况下。总之,自己不懂的就要学,要练,代码就是要多敲。学习之路不会停歇,不断向前。

 

     

标签:总结,题目,Point,double,getX,getY,return,public
来源: https://www.cnblogs.com/X3217637195/p/16275489.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有