Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The controversial issue of global warming has been widely publicized by the film

ID: 3800386 • Letter: T

Question

The controversial issue of global warming has been widely publicized by the film “An Inconvenient Truth,” featuring former Vice President Al Gore. Mr. Gore and a U.N. network of scientists, the Intergovernmental Panel on Climate Change, shared the 2007 Nobel Peace Prize in recognition of “their efforts to build up and disseminate greater knowledge about man-made climate change.” Research both sides of the global warming issue online (you might want to search for phrases like “global warming skeptics”). Create a five-question multiplechoice quiz on global warming, each question having four possible answers (numbered 1–4). Be objective and try to fairly represent both sides of the issue. Next, write an application that administers the quiz, calculates the number of correct answers (zero through five) and returns a message to the user. If the user correctly answers five questions, print “Excellent”; if four, print “Very good”; if three or fewer, print “Time to brush up on your knowledge of global warming,”

Need this is Java please and thank you.

Explanation / Answer


// Quiz.java
import java.util.Scanner;

public class Quiz {

   public static void main(String[] args) {

   Scanner sc=new Scanner(System.in);

   int correctAnswer_count=0;
   int i=0;
   int answers[]={4,3,3,3,2};


   while(true)
   {

   System.out.println("Question1) The Most abundant gas in the Earth's Atmosphere is :");
   System.out.println("1.Carbon-di-oxide");
   System.out.println("2.Methane");
   System.out.println("3.Nitrous Oxide");
   System.out.println("4.Water Vapour");
   System.out.print("Your Answer: ");
   int question1 = sc.nextInt();
   if(question1<1 || question1>4)
   {
       System.out.println("::Invalid Choice::");
       continue;
   }
       else
       {
           if(question1==answers[i])
           {
               System.out.println("Correct Answer");
               correctAnswer_count++;
               i++;
           }
           else
            System.out.println("Incorrect Answer");
           break;
       }

   }


   while(true)
   {
     
   System.out.println(" ____________________________");
   System.out.println("Question2) Which of the following is not a major greenhouse gas?");
   System.out.println("1.Water Vapour");
   System.out.println("2.Carbon-di-oxide");
   System.out.println("3.Ozone");
   System.out.println("4.Methane");
   System.out.print("Your Answer: ");
   int question2 = sc.nextInt();
   if(question2<1 || question2>4)
   {
       System.out.println("::Invalid Choice::");
       continue;
   }
       else
       {
           if(question2==answers[i])
           {
               System.out.println("Correct Answer");
               correctAnswer_count++;
               i++;
           }
           else
            System.out.println("Incorrect Answer");
           break;
       }

   }


   while(true)
   {
     
   System.out.println(" ____________________________");
   System.out.println("Question3) Ozonosphere is mainly depleted by");
   System.out.println("1.Excess CO");
   System.out.println("2.Excess Co2");
   System.out.println("3.CFCs");
   System.out.println("4.Ozone");
   System.out.print("Your Answer: ");
   int question3 = sc.nextInt();
   if(question3<1 || question3>4)
   {
       System.out.println("::Invalid Choice::");
       continue;
   }
       else
       {
           if(question3==answers[i])
           {
               System.out.println("Correct Answer");
               correctAnswer_count++;
               i++;
           }
           else
            System.out.println("Incorrect Answer");
           break;
       }

   }


   while(true)
   {
     
   System.out.println(" ____________________________");
   System.out.println("Question4) Which of the following is not a Potential adverse effect of global warming?");
   System.out.println("1.More extreme weather Patterns");
   System.out.println("2.Retreat of Glaciers");
   System.out.println("3.An Increase of UVB Radiation");
   System.out.println("4.Sea Level Rise");
   System.out.print("Your Answer: ");
   int question4 = sc.nextInt();
   if(question4<1 || question4>4)
   {
       System.out.println("::Invalid Choice::");
       continue;
   }
       else
       {
           if(question4==answers[i])
           {
               System.out.println("Correct Answer");
               correctAnswer_count++;
               i++;
           }
           else
            System.out.println("Incorrect Answer");
           break;
       }

   }


   while(true)
   {
     
   System.out.println(" ____________________________");
   System.out.println("Question5) Ultravoilet radiations from sunlight causes a reaction that produces?");
   System.out.println("1.Flourides");
   System.out.println("2.Ozone");
   System.out.println("3.Sulphur Oxide");
   System.out.println("4.carbon monoxide");
   System.out.print("Your Answer: ");
   int question5 = sc.nextInt();
   if(question5<1 || question5>4)
   {
       System.out.println("::Invalid Choice::");
       continue;
   }
       else
       {
           if(question5==answers[i])
           {
               System.out.println("Correct Answer");
               correctAnswer_count++;
               i++;
           }
           else
            System.out.println("Incorrect Answer");
           break;
       }

   }


   if(correctAnswer_count==5)
   System.out.println(" REPORT::Excellent");
   else if(correctAnswer_count==4)
   System.out.println(" REPORT::Very Good");
   else if(correctAnswer_count<3)
   System.out.println(" REPORT::Time to brush up your knowledge of global warming");

   }

}


/*
output:

Question1) The Most abundant gas in the Earth's Atmosphere is :
1.Carbon-di-oxide
2.Methane
3.Nitrous Oxide
4.Water Vapour
Your Answer: 2
Incorrect Answer

____________________________
Question2) Which of the following is not a major greenhouse gas?
1.Water Vapour
2.Carbon-di-oxide
3.Ozone
4.Methane
Your Answer: 4
Correct Answer

____________________________
Question3) Ozonosphere is mainly depleted by
1.Excess CO
2.Excess Co2
3.CFCs
4.Ozone
Your Answer: 1
Incorrect Answer

____________________________
Question4) Which of the following is not a Potential adverse effect of global warming?
1.More extreme weather Patterns
2.Retreat of Glaciers
3.An Increase of UVB Radiation
4.Sea Level Rise
Your Answer: 3
Correct Answer

____________________________
Question5) Ultravoilet radiations from sunlight causes a reaction that produces?
1.Flourides
2.Ozone
3.Sulphur Oxide
4.carbon monoxide
Your Answer: 2
Incorrect Answer

REPORT::Time to brush up your knowledge of global warming


*/

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote