Java program Miraki Evening Institute has been offering various CSEC subjects to
ID: 3604541 • Letter: J
Question
Java program
Miraki Evening Institute has been offering various CSEC subjects to the entire Caribbean population for numerous years. There success rate is the best in the region and as such has seen an exponential growth in stakeholder interest. The managers and owners are seeking to modernize the operations of the institution. One such modernization initiative is to keep track of Employees, Students and visitors. The address for all employees and students must be recorded by the system. For an address to be valid it must have the following attributes, street, city and parish. See Table 1 below for the minimum details stored on each category of person. Table 1 Employees First Name Last Name Gender Address Students First Name Last Name Gender Date Of Birth Address Subjects Visitors First Name Last Name Date of Visit Time of Visit Page 1 of 3Explanation / Answer
Ans:
public static void Main(String[] args)
{
public abstract class Person{
public abstract Employees();
public Students();
public Visitors();
}
interface IDetails{
printDetails();
printDetails(Person per);
string name{get;set;}
int telephoneNumber{get;set;}
string eMail{get;set;}
}
interface calculateSalary()
{
calculateGrossSalary();
}
public class School:IDetails
{
string Name;int telNo;string email;
public School(string name,int telno;string Email)
{
this.Name=name;
this.telNo=telno;
this.email=Email;
public printDetails()
{
system.out.println("Details:");
}
public printDetails(Person per)
{
Person obj=new person();
per=obj.Employee;
system.out.println("Name:"+per.Name+"contact:"+per.telNo);
}
}
public class Employees:Person
{
public employees();
Employees obj=new Employees();
system.out.println("Employees are:" +obj.Employees);
}
public class employees:calculateSalary
{
public int calculateGrossSalary(){
int salary=200000;
employees obj=new employees();
system.out.println(The employee salary is : obj.salary);
}
ststic void Main()
{
void testPrintdetails(){
Person obj=new Person();
system.out.println("Name:" +obj.Visitor.Name+"Contact:"+obj.telNo.+"Email:"+obj.email);
}
}
}
}
}
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.