Loaded plugins: fastestmirror, security
Determining fastest mirrors
# CentOS-Base.repo
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
Eg. Invalid release/repo/arch combination/
removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/6/base/mirrorlist.txt
Error: Cannot find a valid baseurl for repo: base
エラーになりました。 ちなみに、Qiitaにはもう一つコマンドがありますが、それもエラーが出てしまい通りません。 とりあえずエラーの「Error: Cannot find a valid baseurl for repo: base」この辺のワードで検索をします。
public class DrawingTool {
public void drawAllShapes(ArrayList<String> list) {
Circle circle = new Circle();
Triangle triangle = new Triangle();
for(int i = 0; i<list.size(); i++) {
switch (list.get(i)) {
case "Circle":
circle.drawCircle();
break;
case "Triangle":
triangle.drawTriangle();
break;
}
}
}
}
public class Circle {
public void drawCircle() {
System.out.println("Circle");
}
}
public class Triangle {
public void drawTriangle() {
System.out.println("Triangle");
}
}
public class DrawingTool {
public void drawAllShapes(ArrayList<Shape> list) {
for(Shape shape : list) {
shape.draw();
}
}
}
public abstract class Shape {
public abstract void draw();
}
public class Circle extends Shape {
@Override
public void draw() {
System.out.println("Circle");
}
}
public class Triangle extends Shape {
@Override
public void draw() {
System.out.println("Triangle");
}
}
public interface Shape {
public void setHeight(int height);
public void setWidth(int width);
public int getArea();
}
public class Rectangle implements Shape {
private int itsHeight;
private int itsWidth;
public void setHeight(int height) {
itsHeight = height;
}
public void setWidth(int width) {
itsWidth = width;
}
public int getArea() {
return itsHeight * itsWidth;
}
}
public class Square implements Shape {
private int itsHeight;
private int itsWidth;
public void setHeight(int height) {
itsHeight = height;
itsWidth = height;
}
public void setWidth(int width) {
itsHeight = width;
itsWidth = width;
}
public int getArea() {
return itsHeight * itsWidth;
}
}
public interface Motion {
public void fly();
public void run();
public void swim();
}
public class Human implements Motion {
public void fly() {
System.out.println("飛ぶ");
}
public void run() {
System.out.println("走る");
}
public void swim() {
System.out.println("泳ぐ");
}
}