Absolute Java (6th Edition)
Absolute Java (6th Edition)
6th Edition
ISBN: 9780134041674
Author: Walter Savitch, Kenrick Mock
Publisher: PEARSON
bartleby

Concept explainers

bartleby

Videos

Textbook Question
Book Icon
Chapter 3, Problem 9PP

Write a program that calculates the total grade for N classroom exercises as a percentage. Use the Decimal Format class to output the value as a percent. The user should input the value for N followed by each of the N scores and totals. Calculate the overall percentage (sum of the total points earned divided by the total points possible) and output it using the DecimalFormat class. Sample input and output are shown below.

How many exercises to input? 3 Score received for exercise 1: 10 Total points possible for exercise 1: 10 Score received for exercise 2: 7 Total points possible for exercise 2: 12 Score received for exercise 3: 5 Total points possible for exercise 3: 8 Your total is 22 out of 30, or 73 .33% .

Blurred answer
Students have asked these similar questions
write a program in python Write a program that will allow a student to enter their name and then ask them to solve 10 mathematical equations. The program should display two random numbers that are to be added, such as: 247 + 129 The program should allow the student to enter the answer. The program should then display whether their answer was right or wrong, and accumulate the right values. After the 10 questions are asked, calculate the average that was correct. Then display the student name, the number correct, and the average correct in both decimal and percentage format. In addition to any system functions you may use, you might consider the following functions: A function that allows the student to enter their name. A function that gets two random numbers, anywhere from 1 to 500. A function that displays the equation and asks the user to enter their answer. A function that checks to see if the answer is correct and accumulates the number correct. A function that calculates the…
At a certain university, students have to submit their exams online. The administration decides that for each minute of late submission, 5 points are deducted. Write a program that asks the user for his initial grade and the late submission time (in minutes), and then displays the final result. Sample Run 1: Enter your initial grade: 82 Enter the late submission time (in minutes): 6 Your final grade is 52 Sample Run 2: Enter your initial grade: 115 Grades should be between 0 and 100 Sample Run 3: Enter your initial grade: 43 Enter the late submission time (in minutes): 10 Your final grade is 0
Assignment Write a program that moves a forester unit and a desert corps unit to a given target location and prints the number of hours it took for each unit to reach the target. First, the user will give the starting X and Y positions of the forester unit as well as its base speed (all ints). Then, the starting X and Y positions of the desert corps unit as well as its base speed (all ints). Finally, the target X and Y positions (both ints) and the terrain type (std::string). Speeds are given as distance traveled in one full day (i.e., 24 hours) and is affected by the terrain type using a multiplier over the base speed. Also, after 1 full day, each unit rests for a certain number of hours. Speed multiplier and rest amount of each type of unit depending on the terrain type are as below. Speed Multiplier Rest Duration After 1 day Terrain type Forester Desert Corps Forester Desert Corps Forest 1.3 0.6 4 12 Desert 0.4 1.2 15 6 Hills 0.7 0.8 6 8 Others 1.0 0.8 8 6 After getting all this…

Chapter 3 Solutions

Absolute Java (6th Edition)

Ch. 3 - Prob. 11STECh. 3 - Prob. 12STECh. 3 - Prob. 13STECh. 3 - Suppose are two variables that have been given...Ch. 3 - Prob. 15STECh. 3 - Assume that nextword is a String variable that has...Ch. 3 - Write an if-else statement that outputs the word...Ch. 3 - Write an if-else statement that outputs the word...Ch. 3 - Determine the value, true or false, of each of the...Ch. 3 - Does the following sequence produce a division by...Ch. 3 - Prob. 21STECh. 3 - Prob. 22STECh. 3 - What output would be produced in Self-Test...Ch. 3 - What is the output produced by the following? Ch. 3 - What output would be produced in Self-Test...Ch. 3 - Prob. 26STECh. 3 - What is the most important difference between a...Ch. 3 - Prob. 28STECh. 3 - Prob. 29STECh. 3 - What is the output of the following? Ch. 3 - Rewrite the following for statement as a while...Ch. 3 - What is the output of the following loop? Identify...Ch. 3 - What is the output of the following loop? Comment...Ch. 3 - Prob. 34STECh. 3 - For each of the following situations, tell which...Ch. 3 - What is the output of the following? Ch. 3 - What is the output of the following? Ch. 3 - What is the output produced by the following?...Ch. 3 - What is the output produced by the following?...Ch. 3 - Fix the bug in the code in the earlier subsection...Ch. 3 - Add some suitable output statements to the...Ch. 3 - What is the bug in the following code? What do you...Ch. 3 - Prob. 43STECh. 3 - What numbers could be generated by...Ch. 3 - What numbers could be generated by...Ch. 3 - Use the method Math. random to generate a random...Ch. 3 - (This is a version of Programming Project 2.1 from...Ch. 3 - A designer is trying to create a new pattern of...Ch. 3 - Weight is defined as the gravitational force...Ch. 3 - It is difficult to make a budget that spans...Ch. 3 - You have just purchased a stereo system that cost ...Ch. 3 - The Fibonacci numbers Fn are defined as follows:...Ch. 3 - An Armstrong number is an n-digit number that...Ch. 3 - In a certain code language, numerals are each...Ch. 3 - Write a program that calculates the total grade...Ch. 3 - The game of Pig is a simple two-player dice game...Ch. 3 - You have three identical prizes to give away and a...Ch. 3 - Redo or do for the first time Programming Project...Ch. 3 - The file words. txt on the hook's website contains...Ch. 3 - The file words. txt on the book's website contains...Ch. 3 - This problem is based on a "Nifty Assignment" by...Ch. 3 - Prob. 16PP

Additional Engineering Textbook Solutions

Find more solutions based on key concepts
What happens if the code in line 51 in Listing 8.4 is changed to if (row!= i col != j grid[row][col] == grid[...

Introduction to Java Programming and Data Structures, Comprehensive Version (11th Edition)

Under what circumstances would a subclass need to override a superclass method?

Starting Out with Java: From Control Structures through Data Structures (4th Edition) (What's New in Computer Science)

Give an example of a data constraint.

Database Concepts (8th Edition)

Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Constants, Variables, Data types, Keywords in C Programming Language Tutorial; Author: LearningLad;https://www.youtube.com/watch?v=d7tdL-ZEWdE;License: Standard YouTube License, CC-BY