1. Write a class that represents triangle named Triangle, the class must have the following members: private double height;//Height private double base;//Base length public Triangle(double h, double b);//Constructor public void setHeight(double x);//Sets height public double getHeight();//Gets height public void setBase(double x);//Sets base length public double getBase();//Gets base length public double getArea();//Returns the area of the triangle.
2. Write a class Employeethat represents an employee of some organization, the class should contain the following members: private int id;//Employee id private String name;//Employee name private int type;//1 = employee, 2 = manager private double baseSalary;//Base salary public Employee(int _id, String _name);//Constructor public void setID(int x);//id mutator public void setName(int x);//name mutator public int getID();//id accessor public String getName();//name accessor public double getSalary(); //if manager, add 10% to base salary public void setBaseSalary(double bs);//sets base salary.