make the flowchart for this code plz abstract class StudentCalculation /ABSTRACTION/ { abstract int totalStrength(); abstract int fees(); } class College { private String collegeName; private int rank; private String address; College(String name,int r,String add) { collegeName = name; rank = r; address = add; } public void setName(String n) { collegeName = n; } public String getName() { return(collegeName); } public void setRank(int r) { rank = r; } public int getRank() { return(rank); } public void setAddress(String a) { address = a; } public String getAddress() { return address; } } class Deptcse extends StudentCalculation /INHERITENCE/ { private int numberOfTeachers, numberOfMale, numberOfFeamle; Deptcse(int t,int m, int f) { numberOfTeachers=t; numberOfMale = m; numberOfFeamle = f; } public String getName() { return("Computer Science and Engineering"); } public void setTeacher(int t) { numberOfTeachers=t; } public int getTeacher() { return(numberOfTeachers); } public void setMalestd(int m) { numberOfMale = m; } public int getMalestd() { return(numberOfMale); } public void setFemalestd(int f) { numberOfFeamle = f; } public int getFemalestd() { return(numberOfFeamle); } public int totalStrength() /POLYMORPHISM/ { return (90); } public int fees() { return(44500); } } class DeptEce extends StudentCalculation { private int numberOfTeachers, numberOfMale, numberOfFeamle; DeptEce(int t,int m, int f) { numberOfTeachers=t; numberOfMale = m; numberOfFeamle = f; } public String getName() { return("Electronics and communication engineering"); } public void setTeacher(int t) { numberOfTeachers=t; } public int getTeacher() { return(numberOfTeachers); } public void setMalestd(int m) { numberOfMale = m; } public int getMalestd() { return(numberOfMale); } public void setFemalestd(int f) { numberOfFeamle = f; } public int getFemalestd() { return(numberOfFeamle); } public int totalStrength() /POLYMORPHISM/ { return (120); } public int fees() { return(43500); } } public class Main { public static void main(String args[]) { College clg = new College ("Techno International Newtown",1334,"Rajarhat"); Deptcse cs = new Deptcse(30,2500,500); DeptEce ec = new DeptEce(35,2300,600); System.out.println("College Details: "); System.out.println("Name: "+clg.getName()); System.out.println(); System.out.println("Rank: "+clg.getRank()); System.out.println(); System.out.println("Adress: "+clg.getAddress()); System.out.println(); System.out.println("Departmental details: "); System.out.println("Department Name: "+cs.getName()); System.out.println("Number of faculties: "+cs.getTeacher()); System.out.println("Number of Male students: "+cs.getMalestd()); System.out.println("Number of Female students: "+cs.getFemalestd()); System.out.println("Total Strength per year: "+cs.totalStrength()); System.out.println("Fees per semester "+cs.fees()); System.out.println(); System.out.println(); System.out.println("Department Name: "+ec.getName()); System.out.println("Number of faculties: "+ec.getTeacher()); System.out.println("Number of Male students: "+ec.getMalestd()); System.out.println("Number of Female students: "+ec.getFemalestd()); System.out.println("Total Strength per year: "+ec.totalStrength()); System.out.println("Fees per semester "+ec.fees()); } }
make the flowchart for this code plz
abstract class StudentCalculation /ABSTRACTION/
{
abstract int totalStrength();
abstract int fees();
}
class College
{
private String collegeName;
private int rank;
private String address;
College(String name,int r,String add)
{
collegeName = name;
rank = r;
address = add;
}
public void setName(String n)
{
collegeName = n;
}
public String getName()
{
return(collegeName);
}
public void setRank(int r)
{
rank = r;
}
public int getRank()
{
return(rank);
}
public void setAddress(String a)
{
address = a;
}
public String getAddress()
{
return address;
}
}
class Deptcse extends StudentCalculation /INHERITENCE/
{
private int numberOfTeachers, numberOfMale, numberOfFeamle;
Deptcse(int t,int m, int f)
{
numberOfTeachers=t;
numberOfMale = m;
numberOfFeamle = f;
}
public String getName()
{
return("Computer Science and Engineering");
}
public void setTeacher(int t)
{
numberOfTeachers=t;
}
public int getTeacher()
{
return(numberOfTeachers);
}
public void setMalestd(int m)
{
numberOfMale = m;
}
public int getMalestd()
{
return(numberOfMale);
}
public void setFemalestd(int f)
{
numberOfFeamle = f;
}
public int getFemalestd()
{
return(numberOfFeamle);
}
public int totalStrength() /POLYMORPHISM/
{
return (90);
}
public int fees()
{
return(44500);
}
}
class DeptEce extends StudentCalculation
{
private int numberOfTeachers, numberOfMale, numberOfFeamle;
DeptEce(int t,int m, int f)
{
numberOfTeachers=t;
numberOfMale = m;
numberOfFeamle = f;
}
public String getName()
{
return("Electronics and communication engineering");
}
public void setTeacher(int t)
{
numberOfTeachers=t;
}
public int getTeacher()
{
return(numberOfTeachers);
}
public void setMalestd(int m)
{
numberOfMale = m;
}
public int getMalestd()
{
return(numberOfMale);
}
public void setFemalestd(int f)
{
numberOfFeamle = f;
}
public int getFemalestd()
{
return(numberOfFeamle);
}
public int totalStrength() /POLYMORPHISM/
{
return (120);
}
public int fees()
{
return(43500);
}
}
public class Main
{
public static void main(String args[])
{
College clg = new College ("Techno International Newtown",1334,"Rajarhat");
Deptcse cs = new Deptcse(30,2500,500);
DeptEce ec = new DeptEce(35,2300,600);
System.out.println("College Details: ");
System.out.println("Name: "+clg.getName());
System.out.println();
System.out.println("Rank: "+clg.getRank());
System.out.println();
System.out.println("Adress: "+clg.getAddress());
System.out.println();
System.out.println("Departmental details: ");
System.out.println("Department Name: "+cs.getName());
System.out.println("Number of faculties: "+cs.getTeacher());
System.out.println("Number of Male students: "+cs.getMalestd());
System.out.println("Number of Female students: "+cs.getFemalestd());
System.out.println("Total Strength per year: "+cs.totalStrength());
System.out.println("Fees per semester "+cs.fees());
System.out.println();
System.out.println();
System.out.println("Department Name: "+ec.getName());
System.out.println("Number of faculties: "+ec.getTeacher());
System.out.println("Number of Male students: "+ec.getMalestd());
System.out.println("Number of Female students: "+ec.getFemalestd());
System.out.println("Total Strength per year: "+ec.totalStrength());
System.out.println("Fees per semester "+ec.fees());
}
}
Step by step
Solved in 2 steps with 1 images