Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Teacheranks {
- public static void main(String[]args){
- String name,Departmentname,typeofDegree,AssistantProfessor1,AssistantProfessor2,currentrank,complete;
- int yearsofTeachingfields,yearsinRank, MyearsofTeachingfields=5,notquailfy=0,quailfy=0;
- double credithours;
- AssistantProfessor1="Instructor";
- AssistantProfessor2="Master's";
- Scanner key = new Scanner(System.in);
- do{ System.out.println("enter your name");
- name=key.next();
- System.out.println("enter the name of the department");
- Departmentname=key.next();
- System.out.println("enter how long of teaching");
- yearsofTeachingfields=key.nextInt();
- System.out.println("enter the type of degree for"+Departmentname);
- typeofDegree=key.next();
- System.out.println("enter the amount of credit hours in"+ Departmentname);
- credithours=key.nextDouble();
- System.out.println("enter current rank");
- currentrank=key.next();
- System.out.println("enter years in Current Rank");
- yearsinRank=key.nextInt();
- if (yearsofTeachingfields<=MyearsofTeachingfields){
- System.out.println("teacher not qualify for position cause of years of teaching");
- notquailfy+=1;
- }
- if(currentrank!=AssistantProfessor1){
- System.out.println("teacher doesn't have a Instructor degree");
- }if (currentrank!=AssistantProfessor2){
- System.out.println("teacher doesn't have a Master's degree");
- }else {quailfy+=1;}
- System.out.println("teacher name:"+name+"\n"+"department:"+Departmentname+"\n"+"Teaching for"+yearsofTeachingfields+"\n"+"teacher degree"+typeofDegree+"\n"+
- "teacher credit hours"+credithours+"\n"+"current position"+currentrank+"\n"+"year in position"+yearsinRank);
- System.out.println("if your done say done if your not done say anything else");
- complete=key.next();
- }while (complete!="done");
- System.out.println(notquailfy+"not quailfy");
- System.out.println(quailfy+" are quailfy for Assistant Professor");
- }
- }
Add Comment
Please, Sign In to add comment