package lists; /** * This class represents different animal characteristics that are recorded by the user * * */ public class Animal { private String name; private String color; private String type; //vertebrate or invertebrate private boolean canSwim; //Constructor public Animal(){ } /** * Constructor with values * @param name name of the animal * @param color color of the animal * @param type represents whether its vertebrate or invertebrate * @param canSwim whether the animal can swim */ public Animal(String name,String color,String type,boolean canSwim){ this.name=name; this.color=color; this.type=type; this.canSwim=canSwim; } String getColor() { return color; } void setColor(String color) { this.color = color; } String getName() { return name; } void setName(String name) { this.name = name; } String getType() { return type; } void setType(String type) { this.type = type; } boolean isCanSwim() { return canSwim; } void setCanSwim(boolean canSwim) { this.canSwim = canSwim; } /** * String representation of this animal * @return */ @Override public String toString(){ return "[name="+name+",type="+type+",color="+color+",Can Swim="+(canSwim?"Yes":"No"); } } Week 4 Discussions Discussion # 1 Supporting Activity: Virtual Machines Describe the three types of virtualization and at least two benefits of virtualization. Discussion # 2 Supporting Activity: Virtualization What experiences have you had with virtualization in the past? What are the benefits of using virtualization? How is it achieved? What effects would implementing virtualization have on an organization? Discussion # 3 Supporting Activity: Fault Tolerance What are the multiple aspects of a system that fault tolerance should address? What are some of the methods used to achieve fault tolerance? How would you make a choice between them? package lists; /** * * @author */ import java.util.* ; public class ListMain { public static void main(String[]args){ int choice=0; Scanner scanner=new Scanner(System.in); List<Animal> list=new ArrayList<Animal>(); int pos; while(choice!=5){ printMenu(); System.out.print("Choose a number"); choice=scanner.nextInt(); switch(choice){ case 1: addOrEditAnimal(list, -1,scanner); break; case 2: int i=0; for(Animal a:list){ i++; System.out.println(i+" "+a.toString()); } break; case 3: int j=0; for(Animal a:list){ j++; System.out.println(j+" "+a.toString()); } System.out.println("Select position to edit"); pos=scanner.nextInt(); if(pos>0 && pos<=list.size()){ addOrEditAnimal(list, pos,scanner); }else{ System.out.println("Animal at the given position not found"); } break; case 4: int j3=0; for(Animal a:list){ j3++; System.out.println(j3+" "+a.toString()); } System.out.println("Select position to delete"); pos=scanner.nextInt(); if(pos>0 && pos<=list. ...