skip to Main Content
The smarter way
to do assignments.

Please note that this is just a preview of a school assignment posted on our website by one of our clients. If you need assistance with this question too, please click on the Order button at the bottom of the page to get started.

Question:From the code listed below, I need to refine it to be more efficient, correct so it will run, and to do the following:And also – implement repetitive tasks of your algorithm while using conditional and iteration statements in C#. Implement the loop option that suits best your project. Test the code for different input values of the variable(s) to include the out-of-range values. Add a statement that displays an error message. Document the test results.using System;/**Filename: ENGR115Module1QuizWritten by: Johan NikolaiDate: 2018This program contains a quiz of 10 questions related to coffee*/public class ENGR115Module1Quiz { static void Main() { System.Console.WriteLine(“Hello C#!”); } }public static void Questionone()   {   Console.Write(“Q1) Coffee beans grow on?n1) A low vinen2) Bushn3) Treen4) Coffee plantn”);   int answer1 = Convert.ToInt32(Console.ReadLine());   Console.ReadKey();   String message1 = (answer1 != 3) ? “Incorrect” : “Correct”;   Console.WriteLine(message1);}public static void Questiontwo(){   Console.Write(“Q2) Most coffees are a blend of?n1) Light and dark roastsn2) Arabica and robusta beansn3) Caffeine and essential oilsn4) African and South American beansn”);   int answer2 = Convert.ToInt32(Console.ReadLine());   Console.ReadKey();   String message2 = (answer2 != 2) ? “Incorrect” : “Correct”;   Console.WriteLine(message2);}public static void Questionthree(){   Console.Write(“Q3) What is an ibrik is?n1) Grinding tooln2) Turkish word for baristan3) Middle Eastern coffeehousen4) Copper pot for making Turkish coffeen”);   int answer3 = Convert.ToInt32(Console.ReadLine());   Console.ReadKey();   String message3 = (answer3 != 1) ? “Incorrect” : “Correct”;   Console.WriteLine(message3);}public static void Questionfour(){   Console.Write(“Q4) Arabica varieties such as Java and Mocha are named after?n1) Plantationsn2) Coffee growern3) Flavoringsn4) Ports of originn”);   int answer4 = Convert.ToInt32(Console.ReadLine());   Console.ReadKey();   String message4 = (answer4 != 4) ? “Incorrect” : “Correct”;   Console.WriteLine(message4);}public static void Questionfive(){   Console.Write(“Q5) sixteenth century Muslim rulers banned coffee because of?n1) Stimulating effectsn2) Gambling in coffeehousesn3) Black market in coffee traden4) Coffee limited to spiritual ceremoniesn”);   int answer5 = Convert.ToInt32(Console.ReadLine());   Console.ReadKey();   String message5 = (answer5 != 1) ? “Incorrect” : “Correct”;   Console.WriteLine(message5);}public static void Questionsix(){   Console.Write(“Q6) Kopi Luwak the world’s most expensive coffee?n1) Processed during a full moonn2) Brewed in solid gold potsn3) Grown at a higher altitude than other beansn4) Coffee beans eaten and then excreted by a Sumatran wild catn”);   int answer6 = Convert.ToInt32(Console.ReadLine());   Console.ReadKey();   String message6 = (answer6 != 4) ? “Incorrect” : “Correct”;   Console.WriteLine(message6);}public static void Questionseven(){   Console.Write(“Q7) coffee is actually a fruit.n1) Truen2) Falsen”);   int answer7 = Convert.ToInt32(Console.ReadLine());   Console.ReadKey();   String message7 = (answer7 != 1) ? “Incorrect” : “Correct”;   Console.WriteLine(message7);}public static void Questioneight(){   Console.Write(“Q8) coffee stays warmer when you add cream.n1) Truen2) Falsen”);   int answer8 = Convert.ToInt32(Console.ReadLine());   Console.ReadKey();   String message8 = (answer8 != 1) ? “Incorrect” : “Correct”;   Console.WriteLine(message8);}public static void Questionnine(){   Console.Write(“Q9) george washington invented instant coffee.n1) Truen2) Falsen”);   int answer9 = Convert.ToInt32(Console.ReadLine());   Console.ReadKey();   String message9 = (answer9 != 1) ? “Incorrect” : “Correct”;   Console.WriteLine(message9);}public static void Questionten(){   Console.Write(“Q10) dark roast coffees have less caffeine than lighter roasts.n1) Truen2) Falsen”);   int answer10 = Convert.ToInt32(Console.ReadLine());   Console.ReadKey();   String message10 = (answer10 != 1) ? “Incorrect” : “Correct”;   Console.WriteLine(message10);}public static void Main(string[] args){   Console.Write(“Name: MenCourse: my coursenAssignment title: My QuiznTo answer enter the number of your choice then press enter, then any button.n”);   Questionone();   Questiontwo();   Questionthree();   Questionfour();   Questionfive();   Questionsix();   Questionseven();   Questioneight();   Questionnine();   Questionten();}

GET HELP WITH THIS ASSIGNMENT TODAY

Clicking on this button will take you to our custom assignment page. Here you can fill out all the additional details for this particular paper (grading rubric, academic style, number of sources etc), after which your paper will get assigned to a course-specific writer. If you have any issues/concerns, please don’t hesitate to contact our live support team or email us right away.

How It Works        |        About Us       |       Contact Us

© 2018 | Intelli Essays Homework Service®

Back To Top