Question

In: Computer Science

I need a flow chart built in raptor and the Java source code in the source...

I need a flow chart built in raptor and the Java source code in the source folder (src)

Please fully document the program: add comments to describe all major parts of the solution. SO that I can understand how and why the code was built that way.

Problem specifications:

-The TSA want you to design and code a program that will be used to screen travelers through AirportX. When a traveler arrives at the airport, he/she is required to go through a checkpoint for COVID-19. The traveler temperature is checked and a recommendation is made for the traveler to be quarantined or not.

A traveler will be quarantined if all of the following conditions are met:

-the temperature read for the traveler is 100.4 or more degrees Fahrenheit.

-the traveler is coughing.

-the traveler is experiencing a shortness of breath.

What need to be collected about a traveler?

Beside collecting all of the above information about a traveler, the first name and last name and passport number of the traveler are collected only if the traveler is to be quarantined.

What to do?

-develop a full solution made up of a short analysis of the problem, a flowchart using Raptor, another flowcharting program, or even by hands, and a full Java program.

Solutions

Expert Solution

FLOWCHART

output

JAVA PROGRAM

import java.io.*;
import java.util.Scanner;
class COVIDSTATUS
{
   public static void main(String [] args)
   {
   String fname,lname,passportNum,cough,breath;
   double temp;
   //create scanner object of Scanner class
   Scanner read = new Scanner(System.in);
  
   System.out.println("Body Temperature : ");
   temp=read.nextDouble(); //READ THE BODY TEMPERATURE
   read.nextLine();
   System.out.println("Do you have Cough(Yes/No) : ");
  
   cough=read.nextLine(); //read the status of cough
  
   System.out.println("Have you experiencing a shortness of Breath(Yes/No) : ");
   breath=read.nextLine(); //read the status of breathing problem
   //condition to check whether all three symptoms found
   if(temp>=100.4 && cough.equalsIgnoreCase("yes") && breath.equalsIgnoreCase("yes"))
   {
       System.out.println("Enter first name : ");
       fname = read.nextLine();//read first name
       System.out.println("Enter Last name : ");
       lname = read.nextLine();//read last name
       System.out.println("Enter Passport Number : ");
       passportNum= read.nextLine();//read passport number
       System.out.println(fname+" "+lname+" You have symptoms of COVID-19");
       System.out.println("Passport Number : "+passportNum);
       System.out.println("Body Temperature :"+temp);
       System.out.println("Cough :"+cough);
       System.out.println("Breathing Problem :"+breath);
      
       System.out.println("You have to Quarantined.");
   }
   else
   { //BLOCK FOR NOT QUARANTINED
       System.out.println("Body Temperature :"+temp);
       System.out.println("Cough :"+cough);
       System.out.println("Breathing Problem :"+breath);
       System.out.println("You will not Quarantined");
   }
}
}

OUTPUT


Related Solutions

Please can you draw a flow chart for the following code : Program code for Payroll,java:...
Please can you draw a flow chart for the following code : Program code for Payroll,java: public class Payroll { public Payroll(String name,int ID,double payRate) { this.name=name; this.ID=ID; this.payRate=payRate; } private String name; private double payRate,hrWorked; private int ID; public Payroll() { name="John Doe"; ID=9999; payRate=15.0; hrWorked=40; } public String getName() { return name; } public int getID() { return ID; } public void setPayRate(int payRate) { this.payRate=payRate; } public void setHrWorked(double hrWorked) { this.hrWorked=hrWorked; } public double getPayRate() {...
I need a full java code. And I need it in GUI With the mathematics you...
I need a full java code. And I need it in GUI With the mathematics you have studied so far in your education you have worked with polynomials. Polynomials are used to describe curves of various types; people use them in the real world to graph curves. For example, roller coaster designers may use polynomials to describe the curves in their rides. Polynomials appear in many areas of mathematics and science. Write a program which finds an approximate solution to...
JAVA JAVA JAVA Hey i need to find a java code for my homework, this is...
JAVA JAVA JAVA Hey i need to find a java code for my homework, this is my first java homework so for you i don't think it will be hard for you. (basic stuff) the problem: Write a complete Java program The transport Company in which you are the engineer responsible of operations for the optimization of the autonomous transport of liquid bulk goods, got a design contract for an automated intelligent transport management system that are autonomous trucks which...
I NEED IT PRINT IN THIS FORM JAVA How is a Java source file executed? 1....
I NEED IT PRINT IN THIS FORM JAVA How is a Java source file executed? 1. It is compiled and runs natively 2. It is interpreted but not compiled 3. It is compiled into byte code and executed by the Java Virtual Machine 4. It is magic Please enter your answer 1 Sorry that answer is not correct. The correct answer is 3 Correct output: How is a Java source file executed? 1. It is compiled and runs natively 2....
This problem needs to be solved with source code. I need a C++ program that will...
This problem needs to be solved with source code. I need a C++ program that will help me solve this question. I need it in C++, please. Writing with comments so it maybe cleared. 1.2. We received the following ciphertext which was encoded with a shift cipher: xultpaajcxitltlxaarpjhtiwtgxktghidhipxciwtvgtpilpit ghlxiwiwtxgqadds. 1. Perform an attack against the cipher based on a letter frequency count: How many letters do you have to identify through a frequency count to recover the key? What is...
Java homework problem: I need the code to be able to have a message if I...
Java homework problem: I need the code to be able to have a message if I type in a letter instead of a number. For example, " Please input only numbers". Then, I should be able to go back and type a number. import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JTextField; public class LoginGui {    static JFrame frame = new JFrame("JFrame Example");    public static void main(String s[]) {        JPanel panel...
I need an idea of Java code that will convert an integer (1 to 3,999) into...
I need an idea of Java code that will convert an integer (1 to 3,999) into roman numerals using if statements; arrays and loops sadly aren't allowed and that's all I can come up with.
(This is for java) I need to rewrite this code that uses a while loop. public...
(This is for java) I need to rewrite this code that uses a while loop. public class Practice6 {      public static void main (String [] args) {         int sum = 2, i=2;        do { sum *= 6;    i++;    } while (i < 20); System.out.println("Total is: " + sum); }
I need to make this into a Java Code: Write a program that prompts the user...
I need to make this into a Java Code: Write a program that prompts the user for a double value representing a radius. You will use the radius to calculate: circleCircumference = 2πr circleArea = πr2 sphereArea = 4πr2 sphereVolume = 43πr3 You must use π as defined in the java.lang.Math class. Your prompt to the user to enter the number of days must be: Enter radius: Your output must be of the format: Circle Circumference = circleCircumference Circle Area...
JAVA CODE BEGINNERS, I already have the DEMO CLASS(NEED YOU TO USE), I need you to...
JAVA CODE BEGINNERS, I already have the DEMO CLASS(NEED YOU TO USE), I need you to use all methods, also switch statements. Write a Temperature class. The class will have three conversion methods: toCelsius(), toKelvin() and toFahrenheit(). These methods will return a Temperature in those three scales equal to the this temperature. Note that the value of this is not changed in these conversions. In addition to these three conversion methods the class will have methods add(Temperature), subtract(Temperature), multiply(Temperature), and...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT