In: Computer Science
Objective:
Write a program in java to give a student directions for whether they should report to school or learn online based on their response to several questions.
Your program should model the HNA hybrid requirements of reporting to school for:
Mondays, Thursdays: Last name A-K
Tuesdays, Fridays: Last name L-Z
Odd week Wednesday: A-K
Even week Wednesday L-Z
Ask the user the day of week, followed by their last name. In the case that the day of the week is Wednesday, ask the user to enter true if it's an odd week and false if it's an even week. Then display a message to indicate if the student should report to school or learn online.
Assume the user of the program will only enter days of the week from Monday to Friday (no need to check weekends). Consider using methods like equalsIgnoreCase and toLowerCase along with other String methods to test the data you are given when the program is run.
School districts are grappling with how to resume school safely in the fall. I’ve followed international news about how schools in Europe and Aisa are reopening slowly. Schools are implementing a range of hybrid schedules to reduce the number of students in a classroom at one time. Schools are experimenting with a variety of alternative schedules.
I am concerned about the number of schools in the United States that have not articulated a clear plan for reopening. I realize schools are facing immense pressure from all sides. I do not envy school leadership and the tough decisions they have to make. That said, whatever shape the school schedule takes teachers will be expected to “make it work.” Without a clear picture of what fall will look like, many teachers are feeling anxious, scared, and paralyzed. If they are going to use the summer to plan and prepare for fall, they need a clear picture of what to expect.
What I want to avoid is a situation where teachers are presented with an alternative schedule in August and given a handful of professional development days to figure out how to adjust a semester’s worth of curriculum for a hybrid schedule. Teachers will likely be expected to engage students at least part time online, which may also require that teachers spend time this summer engaged in professional learning focused on online pedagogy and technology training.
import java.util.Scanner;
class FindGrade
{
//get roll number and marks of student and calculate percentage and grade
public static void main(String args[])
{
int sub[],i,total=0;
float per=0.0f;
Scanner sc;
String rNo;
sub=new int[5];
sc=new Scanner(System.in);
System.out.println("Enter Roll Number");
rNo=sc.next();
for(i=0;i<5;i++)
{
System.out.println("Enter Marks Of Subject "+(i+1));
sub[i]=sc.nextInt();
total=total+sub[i];
}
per=total*100/500;
System.out.println("\n***** Details Of Student *****\n");
System.out.println("\nRoll Number "+rNo);
System.out.println("Total Marks Gained Is "+total);
System.out.println("Percentage Gained Is "+per);
if(per>90)
System.out.println("Your Grade Is A+");
else if(per>80 && per<90)
System.out.println("Your Grade Is A");
else if(per>70 && per<80)
System.out.println("Your Grade Is B+");
else if(per>60 && per<70)
System.out.println("Your Grade Is B");
else if(per>50 && per<60)
System.out.println("Your Grade Is C+");
else if(per>40 && per<50)
System.out.println("Your Grade Is C");
else
System.out.println("Your Grade Is F");
}
}