Write a JAVA program that determines the alert level for the COVID-19 based on the percentage of new cases out of PCR tests carried out as indicated in the following table: Percentage of New Cases <2% Between 2% and 5% (inclusive) Between 5% and 8% (exclusive) 8% or above Alert Level Green Yellow Orange Red % of new cases = (number of new cases / number of PCR tests) x 100 The program should ask the user to input the number of new cases and the number of PCR tests that were carried out. The program should display the percentage of new cases and the alert level. Sample Input / Output Enter the number of new cases: 280 Enter the number of PCR tests: 12000 Percentage of new cases is 2.333333333333335% Alert Level is Yellow
Q: 2) Write a java program to print following pattern using inner loop concept 3 5 7 9 11 13 15 17 10…
A: Programming instructions: Create an int variable for the number of lines. Create a scanner object…
Q: Write a c++ program to prompt the user to enter his name. The program should ask the user to guess…
A: The given problem is to be solved in C++ where the user will be asked to guess the password.
Q: Write a Java program to calculate user's average test scores. Your program can be used for any…
A: In the main method Run an infinite loop Print: "Enter a score or enter -1 to stop."…
Q: Write a Java program to give the user the ability to enter an integer of 4 digits. Assume the value…
A: 1. Import the necessary header files. 2. Declare the variables. 3. Take input from user. 4. Create…
Q: Write a python program to accept the body temperature, age and weight of 6 persons using loops. For…
A: Please find the answer below :
Q: Write a C code that asks the user to enter an integer number, then use this number to create a child…
A: #include<stdio.h> int main() { int n; printf("How many childs would you create:");…
Q: Write a python program that takes the CGPA and no of credits completed by a student and prints…
A: CGPA = float(input("Enter CGPA: "))CreditsCompleted = int(input("Enter No.of Credits Completed: "))…
Q: Write a Python program, that determines the solution of the equation by using the False Position…
A: Code is given below :
Q: Write a Python program to accept student ID, student name, marks in two quizzes (each quiz out of…
A: Program Approach: Create 2 empty lists q_marks and a_marks for storing the marks obtained by a…
Q: Write a program that reads the name, the gender (F/M) and age of the user and checks if he can go…
A: Create 3 variables (String)name, (int) age and (char) gender. Take input name from user and store in…
Q: Write a C++ program that tells the user that the number entered is less than or greater than 10?…
A: #include<iostream> using namespace std; int main(){ int n; cout<<"Enter the value…
Q: Write a program that reads from the user the initial KiloMeters of the car, the current KiloMeters,…
A: Answer
Q: Write a Java program that prompts for and reads in the sales for cach of 5 sales persons in a…
A: I have provided Java code which will find out the total and average sales of 5 persons. Also,…
Q: Write a C++ program that allows a user to enter their rating of the three movies in the Dark Knight…
A: The answer is in below steps:
Q: The parity bit of a sequence of bits is 0 if the number of 1's in the sequence is even and 1…
A: The parity bit is an error-checking bit that is used to append to the string. For even parity, the…
Q: Write a JAVA program that determines the alert level for the COVID-19 based on the percentage of new…
A: import java.util.Scanner; public class Main{ public static void main(String[] args) { double…
Q: Write a java program that asks the user to enter a day (from 1 to 31), a month (from 1 to 12), and a…
A: JAVA code and sample output whether the date is magic date or not is stated in step 2.
Q: Write a python program that keeps track of evidence from 25 forensic cases. The user should be able…
A: I have given a python code in step 2.
Q: Write a program OrderCheck.java that takes four int command-line arguments w, x, y, and z. Define a…
A: Program DesignThe program receives 4 integers at command prompt and ascertains if the numbers are in…
Q: Write a java program that converts degrees from Fahrenheit to Celsius, using the formula DegreesC =…
A: Please find the answer below :
Q: Write a Java code to accept marks of a student from 1-100 and display the grade according to the…
A: Conversion of string to integer type value: The util package of java provides Scanner class and it…
Q: Java Write a program that keeps track of an employee’s hours for a work week and then computes the…
A: The Answer is
Q: Write a program that consists of the code below. a = 1 b = "One" c = 5.2 d = "5.2" e = "3" aa =…
A: Objective: According to the question, we need to rectify some errors and state the reasons for…
Q: Write a program that prompts the user to enter an integer and prints the value of the following…
A: Here is the java program. See below steps
Q: Write a program that reads an integer indicating the day of the week from the user and on the next…
A: Please find the answer below :
Q: Write a Java program to calculate user's average test scores. Your program can be used for any…
A: PROGRAM: //Header file import java.util.*; //Defining the class class Main { //Defining the…
Q: Write a complete Java program that asks the user to input the radius (r) and the height (h) of a…
A: import java.util.Scanner; // importing Scanner which is in the java.util package public class test13…
Q: Write a Java program that prompts the user to enter the grades and their weight of three Exams. The…
A: Sample Response: //Java program to calculate the final grade by using three grades and its…
Q: Write a program that accepts an input grade in percentile form and output its grade equivalent based…
A: Since the programming language is not mentioned, we are providing the answer in C++ language.
Q: write a Java program using Scanner class that accepts data for a customer name, wood type, number…
A: import java.util.*;public class Main { public static void main(String args[]) { Scanner in…
Q: Assuming the code x=(8 * 2 % 3) + (7 * (3 -2 * 3) / 6); has been executed correctly, what is the…
A: Ans) If the above codes has been executed correctly, the calculation followed by BODMAS. The answer…
Q: s or Tails” game. For each attempt to guess, inform the player if they have guessed correctly and…
A: Code : import randomprint("welcome to the coin toss game")t=int(input("Enter the number of games to…
Q: Write a Java Program to print true if the user entered non-negative number is 1 or 2 less than a…
A: If a number is 1 or 2 less than a multiple of 10, then that number must ends with 8 or 9. Algorithm:…
Q: Write a Java program for Zeller’s Algorithm, which can be used to determine the day of the week for…
A: A required program is as follows, import java.util.Scanner; public class Main { public static…
Q: Write a JAVA program that asks the user to input the instructor Salary (double) and Academic Rank…
A: Code: import java.util.*; class Main { public static void main(String args[]) {…
Q: write a java program that determine the alert level for the COVID-19 based on the persentage of new…
A: Program Plan: Import scanner package class covid main method double newCases,tests,casePercentage…
Q: Write a Java program to give the user the ability to enter an integer of 4 digits. Assume the value…
A: /* package codechef; // don't place package name! */ import java.util.*;import java.lang.*;import…
Q: Write a Java program that will ask the user to input an integer value between 1 and 100 for a grade.…
A: code: import java.util.Scanner; //class definition public class Main { //main method public…
Q: Write a program that accepts an input grade in percentile form and output itsgrade equivalent; based…
A: C++ Program for above : #include <iostream> using namespace std; int main() { //get…
Q: This java program outputs a downwards facing arrow composed of a rectangle and a right triangle. The…
A: PROGRAM CODE: // import required libariesimport java.util.*;public class Main{ // start…
Q: Write a Java program that allows the user to enter the expenses’ in term of AED by using a while…
A: 1- In this assignment require, use a while loop to calculate the expense amount till the user does…
Q: A program to convert letters to their corresponding telephone digits. Write a Java program that will…
A: EXPLANATION: - The Scanner class is present in the util package. It is imported to read the user…
Q: Write a Java program that willl read letters Coded A to Z(Uppercase ajd lowercase depending on the…
A: Below is the required JAVA program: - Program Approach: Importing the package. Defining the…
Q: Write a Java program using switch case which assigns tax of 5%, 10% and 15% depending on the cost of…
A: As per the requirement program is completed. Algorithm: Step 1: Write the main() method Step 2:…
Q: Write a Java program that generates a random number between 50 and 150 that repre temperature in…
A: - We need to code the bean boiling problem in java.
Q: Write a Java program that prompts the user to enter the grades and their weight of three Exams. The…
A: Import the java utility In main class declare a variable n as integers Declare float variables…
Q: write a Java Netbeans codes and provide output screenshots of the Netbeans Designs. check…
A:
Q: Write a Java program that accepts a number from 1 to 7 from the user and prints the day based on the…
A: Write a Java program that accepts a number from 1 to 7 from the user and prints the day based on the…
Q: Write a program that enters the time of a phone call in seconds. If the duration of the call is a…
A: Solution: Include necessary header files In the main method declare the variable time and balance…
Q: The parity bit of a sequence of bits is 0 if the number of 1’s in the sequence is even and 1…
A: An array is a linear data structure that stores data in a sequential manner. Each element is linked…
Step by step
Solved in 4 steps with 2 images
- Write a program IN JAVA for an instructor whose course has the following policies: Two quizzes, each graded on the basis of 10 points, are given. One midterm exam and one final exam, each graded on the basis of 100 points, are given. The final exam counts for 50 percent of the grade, the midterm counts for 25 percent, and the two quizzes together count for a total of 25 percent. (Do not forget to normalize the quiz scores. They should be converted to percentages before they are averaged in.) Any grade of 90 percent or more is an A, any grade between 80 and 89 percent is a B, any grade between 70 and 79 percent is a C, any grade between 60 and 69 percent is a D, and grade below 60 percent is an F. The program should read in the student’s scores and display the student’s record, which consists of two quizzes scores, two exams scores, the student’s total score for the entire course, and the final letter grade. The total score is a number in the range to 100, which represents the…. Write a java program that will input 3 values from the command-line. The first will represent the number of first-class stamps requested, the second number will indicate the number of Additional Ounces needed for those first-class letters, and the third number will indicate the number of International stamps requested. Your program will calculate the total cost of stamps.Given,The cost for First Class stamps is $0.50The cost for an Additional Ounce is $0.21The cost for an International stamp is $1.15Using the Java language, write a program that takes two words as input from the keyboard, representing a password and the same password again. For example,websites ask users to type their password twice when they register to make sure there was no typo the first time around. Use the conditional operator when evaluating the password.
- In Java program, this is the output of this program Enter MICHAEL JORDAN's grade in Physics101: 99Enter KOBE BRYANT's grade in Physics101: 90Enter LEBRON JAMES's grade in Physics101: 85 Enter MICHAEL JORDAN's grade in Algebra101: 90Enter KOBE BRYANT's grade in Algebra101: 85Enter LEBRON JAMES's grade in Algebra101: 99 Enter MICHAEL JORDAN's grade in Programming 2: 75Enter KOBE BRYANT's grade in Programming 2: 74Enter LEBRON JAMES's grade in Programming 2: 71 Which student would you like to check? [1] Michael Jordan [2] Kobe Bryant [3] Lebron James [0] Exit Student Name: Lebron JamesGrade Physics101: Algebra101: Programming 2:General Weighted Average: Passed:Create a Java program using nested forloop to display the given pattern.In JAVA, I want to do a crime rate prediction program for my senior project; how would i go about it? where do I start and what do I need in order to begin? please answer the question below in good detail please. I need to use an algorithm in java to achieve this. Present the feasibility of the crime rate prediction project?
- Write a Java program to calculate a gamer's total XP score with a bonus per level. The program should: 1. Prompt and read the user’s input for the gamer's name, Level 1 XP (L1), Level 2 XP (L2), Level 3 XP (L3), and Engagement score (ES). User Scanner to read input. 2. Each XP score input should be in whole numbers between 10-100 and in increments of 5. The total XP score with bonuses should be calculated as follows: L1+L1*0.20+L2+L2*0.30+L3+L3*0.50+ES+ES*0.60 3. Output the gamer's information and the total calculated XP score (including bonuses). 4. Prompt the user as to whether they want to calculate total XP for another gamer and repeat the input/output processing. 5. Allow the user to exit the program without inputting the gamer's data Documentation o Include header comments that include your name, date, and description of the program. o Include body comments. o Consistent indentations o Consistent white line spaces.Write a program using the above idea but to solve the following situation:In a certain application (details withheld to protect the company's 'privacy'), legitimate values are:Range of Values Category0 - 5 B8 - 14 N20 - 21 Q25 - 43 D50 - 59 N60 - 99 AThe values are decimal ones -- not integers (the cutoff valuse just happen to be whole numbers). Any value notinside a specified range is considered invalid and should receive a category value of '-'. (Note that category 'N'has two ranges associated with it...)Write templated functions which can receive a value, the arrays for legal value limits and resulting categories,and an invalid category value and return the resulting mapped category. (You'll have at least two -- one for thisprogram and one for the grade situation as above.) Place these in a library (conversion.h?).The following Python code returns this error, and I have no idea how to fix it. Any and all help would be appreciated Traceback (most recent call last): File "D:\Grand Canyon University\CST_580\Topic 4\project 6a.py", line 40, in <module> agent.move() File "D:\Grand Canyon University\CST_580\Topic 4\project 6a.py", line 13, in move new_location = self.current_location + direction ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~TypeError: unsupported operand type(s) for +: 'int' and 'str' <start of Python code> import random class Agent: def __init__(self, start_location, destination_location): self.current_location = start_location self.destination_location = destination_location def move(self): # Randomly choose a direction to move in direction = random.choice(['up', 'down', 'left', 'right']) # Move in the chosen direction new_location = self.current_location + direction # Calculate the distance to the…
- Write a Python script to determine the cost of an automobile insurance premium, based on driver's age and the number of accidents that the driver has had. The basic insurance charge is $500. There is a surcharge of $100 if the driver is under 25 and an additional surcharge for accidents: \# of accidents Accident Surcharge 1 50 2 125 3 225 4 375 5 575 6 or more 700 example: ```Age? 26``` ```Accidents? 3``` ```Your premium is $725```write a java program that ask user for input and produce output like January 31, 2023. that accept any integer between 1 and 12 as first input, any integer between 1 and 31 as the second input, and any integer between 1 and 99 as the theird input. The inputted numbers must be inside the eligible ranges. E.g., if the user inputs 15 as the first number, theprogram must generate the corresponding error message. The number of eligible days must depend on the month. E.g., the second input of 31 is not eligible if the first input was 4 (April). If the inputted year is a leap, the number of eligible days in February must be 29. instead of stopping after the wrong input, your program must request the new input until the correct one is provided. the execution should look like this: Enter a month from 1 to 12: 2Enter a day from 1 to 29: 12Enter a year from 1 to 99: 10February 12, 2010.More? (Y/N) YEnter a month from 1 to 12: 1Enter a day from 1 to 31: 1Enter a year from 1 to 99: 0Invalid year.…Write a java program to determine the number of MALE and FEMALE out of 15 inputted names with their corresponding gender. If MALE, the gender is 1, and if FEMALE, the gender is 0. Restrict the inputted gender for each name from 0 to 1. If the inputted gender is not on the range, the program will remind the user of a message for the accepted value for the gender and allows the user to re-enter the gender.