Write a grading
- a. There are two quizzes, each graded on the basis of 10 points.
- b. There is one midterm exam and one final exam, each graded on the basis of 100 points.
- c. 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 a percent before they are averaged in.)
Any grade of 90 or more is an A, any grade of 80 or more (but less than 90) is a B, any grade of 70 or more (but less than 80) is a C, any grade of 60 or more (but less than 70) is a D, and any grade below 60 is an F. The program will read in the student’s scores and output the student’s record, which consists of two quiz and two exam scores as well as the student’s average numeric score for the entire course and the final letter grade. Define and use a structure for the student record. If this is a class assignment, ask your instructor if input/output should be done with the keyboard and screen or if it should be done with files. If it is to be done with files, ask your instructor for instructions on file names.
Want to see the full answer?
Check out a sample textbook solutionChapter 10 Solutions
Problem Solving with C++ (10th Edition)
Additional Engineering Textbook Solutions
Modern Database Management (12th Edition)
Starting Out with Python (4th Edition)
Web Development and Design Foundations with HTML5 (9th Edition) (What's New in Computer Science)
Computer Science: An Overview (12th Edition)
Starting Out with Java: From Control Structures through Data Structures (4th Edition) (What's New in Computer Science)
- 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…arrow_forwardIN C++ Implement a class Car with the following properties. A car has a certain fuel efficiency (measured in miles/gallon or liters/km—pick one) and a certain amount of fuel in the gas tank. The efficiency is specified in the constructor, and the initial fuel level is 0. Provide another parameterized constructor which takes both efficiency and fuel as parameters. Also supply methods getGasInTank, returning the current amount of gasoline in the fuel tank. getEfficiency() return the efficiency of car. setGasInTank(double fuel), to add gasoline to the fuel tank. setEfficiency(double efficiency) Supply a method Drive () that simulates driving the car for a certain distance, reducing the amount of gasoline in the fuel tank according to its efficiency. Sample usage: Car myHybrid (50); // 50 miles per gallon myHybrid.addGas(20); // Tank 20 gallons myHybrid.Drive(100); // Drive 100 miles double gasLeft = myHybrid.getGasInTank(); // Get gas remaining in tank Supply a main method that tests…arrow_forwardYou are asked to write a discount system for a beauty saloon, which provides services and sells beauty products. It offers 3 types of memberships: Premium, Gold, and Silver. Premium, gold and silver members receive a discount of 20%, 15%, and 10%, respectively, for all services provided. Customers without membership receive no discount. All members receives a flat 10% discount on products purchased (this might change in the future). Your system shall consist of three classes: Customer, DiscountRate and Visit, as shown in the class diagram. It shall compute the total bill if a customer purchases $x of products and $y of services, for a visit. Also, write a test program VisitDriver (are not to be graded and optional) to exercise all the classes. Important: "Visit Class diagram - ERROR" Constructor method of Visit class must recieve Customer object instead of String name. Visit(Customer customer, Date date) The class DiscountRate contains only static variables and methods (underlined in…arrow_forward
- You are asked to write a discount system for a beauty saloon, which provides services and sells beauty products. It offers 3 types of memberships: Premium, Gold, and Silver. Premium, gold and silver members receive a discount of 20%, 15%, and 10%, respectively, for all services provided. Customers without membership receive no discount. All members receives a flat 10% discount on products purchased (this might change in the future). Your system shall consist of three classes: Customer, DiscountRate and Visit, as shown in the class diagram. It shall compute the total bill if a customer purchases $x of products and $y of services, for a visit. Also, write a test program VisitDriver (are not to be graded and optional) to exercise all the classes. Important: "Visit Class diagram - ERROR" Constructor method of Visit class must recieve Customer object instead of String name. Visit(Customer customer, Date date) The class DiscountRate contains only static variables and methods (underlined in…arrow_forwardThis is a debugging question - The files provided in the code editor to the right contain syntax and/or logic errors. In each case, determine and fix the problem, remove all syntax and coding errors, and run the program to ensure it works properly. Code given - public abstract class DebugBoat { String boatType = new String(); int passengers String power = new String(); public FebugBoat(String bt) { boatType = bt; } public boolean equals(otherBoat) { boolean result; if((passengers == otherBoat.passengers) && (power.equals(otherBoat.power))) result = true; else result = true; return result } public String toString() { return("This " + boatType + "boat carries " + passengers + " and is powered by + power); } public abstract void setPower(); public abstract void setPassengers(); } // Creates and displays an array of boats - // some are rowboats; some are ocean liners import…arrow_forwardCreate a "tank" class and use it in a program that accepts height and radius from the user and prints total volume in cubic feet, total volume in gallons, and total weight of the water in pounds. Also print the surface area of the top of the tank, the surface area of the outside of the tank, and the total of these two areas in case you need to paint the tank (in square feet). So, the only inputs the class would need is the height and radius of the tank in feet. (python)arrow_forward
- This is a debugging question - The files provided in the code editor to the right contain syntax and/or logic errors. In each case, determine and fix the problem, remove all syntax and coding errors, and run the program to ensure it works properly. Code I was given - public abstract class DebugBoat { String boatType = new String(); int passengers String power = new String(); public FebugBoat(String bt) { boatType = bt; } public boolean equals(otherBoat) { boolean result; if((passengers == otherBoat.passengers) && (power.equals(otherBoat.power))) result = true; else result = true; return result } public String toString() { return("This " + boatType + "boat carries " + passengers + " and is powered by" + power); } public abstract void setPower(); public abstract void setPassengers(); } // An array for different boat types public class DebugEleven2 { public static void…arrow_forwardThis is a debugging question - The files provided in the code editor to the right contain syntax and/or logic errors. In each case, determine and fix the problem, remove all syntax and coding errors, and run the program to ensure it works properly. Code I was given - public abstract class DebugBoat { String boatType = new String(); int passengers String power = new String(); public FebugBoat(String bt) { boatType = bt; } public boolean equals(otherBoat) { boolean result; if((passengers == otherBoat.passengers) && (power.equals(otherBoat.power))) result = true; else result = true; return result } public String toString() { return("This " + boatType + "boat carries " + passengers + " and is powered by" + power); } public abstract void setPower(); public abstract void setPassengers(); } // Instantiates Rowboat // Rowboat is child of Boat public class DebugEleven1 {…arrow_forward1. Suppose making a class called Day. Two of its variables are year and currentTemperature. The step is Year should be a final variable, and currentTemperature should not be final. Can you explain why? 2. When we write a unit test only basing the test on the documentation, which tells us what the function is supposed to do, this is an example of a: Black Box Test Can you explain! 3. Assuming working on a project that involves programming a simulation of a game of soccer. The current step in the project is to implement kicking the ball. These students all follow the recommended order for designing and testing code. Look at the following code that the students just finished writing to decide which of the following students is closest to completing this step? The code is below. Please explain. /** Kick checks if the player can kick the ball, and if yes, kicks the ball** @param b A ball object to kick* @returns false if they cannot kick, otherwise true*/public boolean kick(Ball…arrow_forward
- How do I take a long number input, validate the input as a long number and then subsequently use it in a different class? Basically, I want to input and validate a 15-16 digit long number (to exclude string and float), fetch it again to validate it with a different set of conditions in a different or subsequent class.arrow_forwardIn python how do you: Complete the FoodItem class by adding a constructor to initialize a food item. The constructor should initialize the name to "None" and all other instance attributes to 0.0 by default. If the constructor is called with a food name, grams of fat, grams of carbohydrates, and grams of protein, the constructor should assign each instance attribute with the appropriate parameter value. The given program accepts as input a food item name, fat, carbs, and protein and the number of servings. The program creates a food item using the constructor parameters' default values and a food item using the input values. The program outputs the nutritional information and calories per serving for both food items. Ex: If the input is: M&M's 10.0 34.0 2.0 1.0 where M&M's is the food name, 10.0 is the grams of fat, 34.0 is the grams of carbohydrates, 2.0 is the grams of protein, and 1.0 is the number of servings, the output is: Nutritional information per serving of None:…arrow_forwardWrite the classes for the Java program to run as the sample below Data: Occupation,Number of workers,Location quotient,Mean Hourly Wage,Mean Annual WageComputer systems analysts,15450,1.6,60.27,125350Information security analysts,2590,1.1,65.82,136910Computer and information research scientists,2330,4.6,78.53,163330Computer network support specialists,2840,0.9,42.8,89020Computer user support specialists,15640,1.5,37.82,78670Computer network architects,4550,1.7,71.27,148250Network and computer systems administrators,6700,1.2,51.3,106700Database administrators and architects,3830,1.7,55.16,114730Computer programmers,5690,1.9,60.3,125420Software developers and software quality assurance analysts and testers,64310,2.6,69.59,144740Web developers and digital interface designers,5990,2.3,54.76,113910Computer occupations (all other),21270,3.5,60.33,125480Actuaries,380,1,53.12,110500Mathematicians,50,1.1,65.38,135980Operations research…arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education