WHY STUDENT PREFER US?  
4.9/5

5 Star Rating

93940

Orders Deliver

3949

PhD Experts

24x7

Support

100%

Privacy

100%

Top Quality

Sample Details

Programming Fundamentals of Java

Number Of View : 299

Download : 0

Pages: 3

Words : 591

Question :

 

Write a basic program that will diagnose the symptoms a user is experiencing as possibly covid or not. It would write the answers and/or symptoms experienced by the user to a file with a recommendation to go see a doctor to be tested for covid or for the treatment the flu or some other illness. Again though, this should be a beginner-level JAVA program.

 

Answer :

 

public  class COVIDSymptomQuestionnaire 1          

public  static void main(String args[]) {                   int yesCount = 0; // Counter for number of YES responses            

        float temperature = OF; // variable and data type for temperature          

        String travelLocation = ""; // variable and data type regarding travel          

                   

        System.out.print("What is your name?"); // asks user to input their name            

        String name = System.conso/e().readLine(); //reads user input from console          

                   

        System.out.print("What is your age?:    "); // asks user their age          

        int age = Integer.parse/nt(System.conso/e().readLine()); //reads user inpu  t from console      

                   

        System.out.print("Do you have a fever? Y/N: "); // asks user if they are r  unning a fever      

        String haveFever = System.conso/e().readLine(); //reads user input from co  nsole      

        if  (haveFever.equals("y")  11  haveFever.equals("Y")){        

        yesCount++; // adds a number to the Yes counter if answer is Yes            

        System.out.print("What was the temperature taken when last checked?:    "); // asks user to input temperature      

        temperature= Float.parseF/oat(System.conso/e().readLine()); //reads user    input from console      

                   

                   

        System.out.print("Do you have a cough? Y/N: "); // asks if user has a coug  h      

        String haveCough = System.conso/e().readLine(); //reads user input fro  m console      

        if  (haveCough.equals("y")  II  haveCough.equals("Y"))  1          

        yesCount++; // adds a number to the Yes counter if answer is Yes            

                   

                   

        System.out.print("Are you experiencing a shortness of breath or having dif  ficulty breathing? Y/N: "); // asks if  user    has any problems

        String breathingProblem = System.conso/e().readLine();  //reads user in put from console        

        if  (breathingProblem.equals("y")   II breathingProblem.equals("Y"))    {          

        yesCount++; // adds a number to the Yes counter answer is Yes          

                   

                   

        System.out.print("Are you experiencing muscle pain or body aches? Y/N:  "); // asks the user if they have any body  aches   or pain

 

        String musclePain= System.conso/e().readLine(); //reads user input fro  m console

 

Place Order For A Top Grade Assignment Now

We have some amazing discount offers running for the students

Order Now

Get Help Instantly

    FREE FEATURES

    Limitless Amendments

    $09.50 free

    Bibliography

    $10.50 free

    Outline

    $05.00 free

    Title page

    $07.50 free

    Formatting

    $07.50 free

    Plagiarism Report

    $10.00 free

    Get all these features for $50.00

    free

    Latest Blog Boost your grades with expert tips and tricks from our academic blog.

    Chicago-Manual-17-Reference-A-Complete-Guide-to-Citing-Sources-.jpg

    Chicago Manual 17 Reference: A Complete Guide to Citing Sources

    Notes and bibliography and author-date are two citation systems in the Chicago Manual of Style, 17th Edition. When it comes to using the Chicago Manual […]

    Revising-Your-Own-Academic-Writing-A-Checklist-.jpg

    Revising Your Own Academic Writing: A Checklist

    Revising your own academic writing is not just about correcting grammar. Before the submission of your academic paper, you need to review your thesis statement, […]

    What-To-Do-If-Youre-Accused-of-Plagiarism-A-Guide-to-Protecting-Academic-Integrity-.jpg

    What To Do If You’re Accused of Plagiarism: A Guide to Protecting Academic Integrity

    If you are accused of plagiarism, remain calm, analyze the evidence, understand your university’s policies, preserve all your academic papers and sources, and respond honestly. […]

    View More Blogs

    Ready to Boost Your GPA?

    Join over 100,000 students who have score their target grades with verified PhD experts β€” human-written, rubric-matched, on time submission.

    Secure Payments: Visa Mastercard PayPal
    AmEx
    Stripe
    256-bit SSL GDPR Compliant DMCA Protected
    Academic Integrity & Disclaimer
    Great Assignment Help is an academic tutoring and reference service (Est. 2016). All work β€” including essays, dissertations, case studies, and research papers β€” is intended solely as reference material and learning guidance. Students must not submit our work as their own; doing so may violate your institution's academic integrity policy. Prices are starting rates and may vary by level, subject, and deadline. Results may vary. Data stored on encrypted U.S. servers (AWS, SOC 2). Not affiliated with any university. Read our Honor Code, Terms, and Privacy Policy before ordering.
    Β© 2016– GreatAssignmentHelp Inc. All rights reserved. "GreatAssignmentHelp" is a registered trademark. Unauthorized reproduction of site content is subject to DMCA takedown.
    3