66 896
Assignments Done
99,1%
Successfully Done
In October 2018

Answer to Question #3096 in Java | JSP | JSF for mike foster

Question #3096
import java.util.*;
import javax.swing.*;
public class UseNorthAtlantic
{
public static void main(String arg[] )
{
Instructor[] instruct = new Instructor[3];
Course[] aCourse = new Course[5];
Student stu1;
StaffCourse sc = new StaffCourse();
JFrame frame = new JFrame();
Object bigList[] = new Object[4];
Object ans;
String ans2 ;
bigList[0] = ("Add a Student");
bigList[1] = ("Add a Instructor");
bigList[2] = ("Add a Course");
bigList[3] = ("Assign Courses");
ans = JOptionPane.showInputDialog(frame, "Choose one", "Input", JOptionPane.QUESTION_MESSAGE,null, bigList, "Titan");
if (ans.equals("Add a Student"))
{
ans2 = JOptionPane.showInputDialog(null, "Is student undergraduate, master, or doctoral?");
if (ans2.equals("undergraduate"))
{

//stu1 = new Undergrad();
Undergrad stu2= new Undergrad();
String ans3;
boolean booleans;
stu2.setSID(JOptionPane.showInputDialog(null, "Enter Student ID"));
stu2.setFirstName(JOptionPane.showInputDialog(null, "Enter first name"));
stu2.setLastName(JOptionPane.showInputDialog(null, "Enter last name"));
stu2.setMajor(JOptionPane.showInputDialog(null, "Enter major"));
ans3 = "true";
if(ans3.equals("true"))
{
booleans = true;
}
else
{
booleans = false;
}
stu2.setDeansList(booleans);
stu2.DisplayStudent();
}
else if (ans2.equals("master"))
{
//stu1 = new Master();
Master stu3 = new Master();
stu3.setSID(JOptionPane.showInputDialog(null, "Enter Student ID"));
stu3.setFirstName(JOptionPane.showInputDialog(null, "Enter first name"));
stu3.setLastName(JOptionPane.showInputDialog(null, "Enter last name"));
stu3.setMajor(JOptionPane.showInputDialog(null, "Enter major"));
stu3.setCommittee(JOptionPane.showInputDialog(null, "Enter committee"));
stu3.setThesis(JOptionPane.showInputDialog(null, "Enter thesis"));
stu3.DisplayStudent();
}
else
{
//stu1 = new Doctoral();
Doctoral stu4 = new Doctoral();
boolean booleans2;
boolean booleans3;
String ans4;
String ans5;
stu4.setSID(JOptionPane.showInputDialog(null, "Enter Student ID"));
stu4.setFirstName(JOptionPane.showInputDialog(null, "Enter first name"));
stu4.setLastName(JOptionPane.showInputDialog(null, "Enter last name"));
stu4.setMajor(JOptionPane.showInputDialog(null, "Enter major"));
ans4 = "true";
if(ans4.equals("true"))
{
booleans2 = true;
}
else
{
booleans2 = false;
}
stu4.setPrelimExam(booleans2);
ans5 = "true";
if(ans5.equals("true"))
{
booleans3 = true;
}
else
{
booleans3 = false;
}
stu4.setQualReview(booleans3);
stu4.DisplayStudent();
}
}
else if (ans.equals("Add a Instructor"))
{
addInstructor(instruct);
}
else if (ans.equals("Add a Course"))
{
addCourse(aCourse);
}
else
{
StaffCourse(instruct, aCourse);
}
sc.DisplayAssignment();
}
public static void addInstructor(Instructor[] instruct)
{
Instructor[] i = new Instructor[3];
StaffID = JOptionPane.showInputDialog(null, "Enter ID");
firstName = JOptionPane.showInputDialog(null, "Enter First Name");
lastName = JOptionPane.showInputDialog(null, "Enter Last Name");
YearlySalary = JOptionPane.showInputDialog(null, "Enter Yearly Salary");
final int max = 3;
for (int x = 0; x < max; i++)
{
i[0] = new Instructor(STID, FName, LName, ys);
i[1] = new Instructor(STID, FName, LName, ys);
i[2] = new Instructor(STID, FName, LName, ys);
}
}
public static void addCourse(Course[] aCourse)
{
Course [] c = new Course[3];
final int max = 5;
for (int c = 0; c < max; c++)
{
aCourse[i] = JOptionPane.showInputDialog(null, "Enter Instructor");
}
}
public static void StaffCourse(Instructor[] instruct, Course[] aCourse)
{

}
}
Expert's answer
What is your question?

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions