Question

In: Computer Science

Objective: Write a program in java to give a student directions for whether they should report...

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.

Solutions

Expert Solution

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");

}

}


Related Solutions

Write a Java program that sorts an array of “Student” in an aescending order of their...
Write a Java program that sorts an array of “Student” in an aescending order of their “last names”. The program should be able to apply (Insertion sort): Student [] studs = new Student[8]; s[0] = new Student("Saoud", "Mohamed", 3.61); s[1] = new Student("Abdelkader", "Farouk", 2.83); s[2] = new Student("Beshr" , "Alsharqawy", 1.99); s[3] = new Student("Nader", "Salah", 3.02); s[4] = new Student("Basem", "Hawary", 2.65); s[5] = new Student("Abdullah", "Babaker", 2.88); s[6] = new Student("Abdelaal", "Khairy", 3.13); s[7] = new Student("Mohamedain",...
Write a program IN JAVA that asks the user for a number. The program should check...
Write a program IN JAVA that asks the user for a number. The program should check the number to ensure that it is valid (if not, the user should enter a valid number to continue.) The program should print out all of the prime numbers from 2 up to the number, with up to 10 numbers per line. (Recall: A prime number is a number that is only divisible by itself and 1.) The code should ask the user if...
Write a Java program that reads a list of integers into an array. The program should...
Write a Java program that reads a list of integers into an array. The program should read this array from the file “input.txt”. You may assume that there are fewer than 50 entries in the array. Your program determines how many entries there are. The output is a two-column list. The first column is the list of the distinct array elements; the second column is the number of occurrences of each element. The list should be sorted on entries in...
Program should be written in Java a) Write a program that asks the user to enter...
Program should be written in Java a) Write a program that asks the user to enter the approximate current population of India. You should have the computer output a prompt and then YOU (as the user should enter the population.)  For testing purposes you may use the value of 1,382,000,000 from August 2020. Assume that the growth rate is 1.1% per year. Predict and print the predicted population for 2021 and 2022. The printout should include the year and the estimated...
using Dr java Objective: Write a program that takes a phrase and then counts the number...
using Dr java Objective: Write a program that takes a phrase and then counts the number of vowels (case does not matter) in the phrase. It then should display all of the vowels in sorted ascending order according to their count. Only consider {AEIOU} as the vowels. Hint: It may be a good idea to keep track and sort two arrays: Has the vowels in alphabetic order Has the number of said vowels Whenever one would swap then it swaps...
Write a Java program using jGRASP directions are as follows: Uses a while loop to print...
Write a Java program using jGRASP directions are as follows: Uses a while loop to print the numbers from 3 - 19. Uses a do-while loop to print the numbers from 42 - 56. Uses a for loop to print the numbers from 87 - 95. Asks the user for 2 numbers. Uses a loop to print all numbers between the given numbers, inclusive. Note: Consider that your user's second number can be lower! (see example below) Note: Also consider...
Write a program that displays a weekly payroll report. A loop in the program should ask...
Write a program that displays a weekly payroll report. A loop in the program should ask the user for the employee number, gross pay, state tax, federal tax, and FICA withholdings. The loop will terminate when 0 is entered for the employee number. After the data is entered, the program should display totals for gross pay, state tax, federal tax, FICA withholdings, and net pay. Input Validation: Do not accept negative numbers for any of the items entered. Do not...
Java Program Suppose a student was taking 5 different courses last semester. Write a program that...
Java Program Suppose a student was taking 5 different courses last semester. Write a program that (a) asks the student to input his/her name, student ID, marks for these 5 courses, (b) calculate the average, (c) determine the letter grade of each course. (d) record the number of courses whose final letter grade is A+, A, A-, .... , F+, F, F-. (e) Output the following information in a nice format: student name, student ID, listing of marks, the average,...
Java Program Suppose a student was taking 5 different courses last semester. Write a program that...
Java Program Suppose a student was taking 5 different courses last semester. Write a program that (a) asks the student to input his/her name, student ID, marks for these 5 courses, (b) calculate the average, (c) determine the letter grade of each course. (d) record the number of courses whose final letter grade is A+, A, A-, .... , F+, F, F-. (e) Output the following information in a nice format: student name, student ID, listing of marks, the average,...
Write a Java program that prompts the user to input a string and prints whether it...
Write a Java program that prompts the user to input a string and prints whether it is a palindrome. A palindrome is a string which reads the same backward as forward, such as Madam (disregarding punctuation and the distinction between uppercase and lowercase letters). The program must use the stack data structure. The program must include the following classes: The StackX class (or you can use the Java Stack class). The Palindrome class which must contain a method named palindrome()...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT