Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Question
Create 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)
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 3 steps with 1 images
Knowledge Booster
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
- You've decided to test the wifi speed in the classroom at the beginning of every lecture. Create a program that will tell you if the wifi speed over the past 3 classes has increased, decreased, or neither. If the wifi speeds are sorted and increasing, then print out "The wifi is getting faster!". If the wifi speeds are sorted and decreasing, then print out "The wifi is getting slower!". If the wifi speeds are unsorted or if two or more speeds are the same, then print "The wifi speed is changing unpredictably." The user should input 3 non-negative numbers (double) separated by spaces. Sample runs: Enter wifi speeds over the last 3 classes: 162 180 225 The wifi is getting faster! Enter wifi speeds over the last 3 classes: 37.5 21.2 19.9 The wifi is getting slower! Enter wifi speeds over the last 3 classes: 162 135.3 225 The wifi speed is changing unpredictably. Ensure you are doing basic input validation, output Please enter a valid input. if the user inputs a negative wifi speed. Make…arrow_forwardWrite a class, NumberToMonth, which does the following: a. Ask the user to enter the month of the year (number1 through 12): "Enter the month of the year - number 1 to 12" b. Get the month using a Scanner c. checks for invalid input (i.e. numbers that are not 1- 12) and terminates the program using System.exit(1)if input is invalid d. Prints the name of the month: "The month is XXXXX" Tips | Use a multi-way if-else statement Submission I Copy and paste your code | Screen shot the console with user input of three example months (one invalid input, two any month) Sample Run Enter the month of the year (number 1 to 12) 77 Invalid Input Enter the month of the year (number 1 to 12) 6 The month is June Enter the month of the year (number 1 to 12) 12 The month is Decemberarrow_forwardImplement a python version of the game Hangman in which a player attempts to guess a secret word one letter at a time. Normally Hangman is a two-player game but in your version the user will play three rounds against the computer. Use the following as the secret word in each round: 1. “APPLE”2. “OBVIOUS”3. “XYLOPHONE” Here are the steps to follow in each round: Print the secret word with each letter replaced with the underscore character, “_” Prompt the user to enter a letter or word using the following message, “Enter a letter or word: ”. If the user enters a single letter, check if that letter is in the secret word (case-insensitive). The user can make up to 6 letter guesses in a round. If the user guesses a letter they have already guessed, print the message “You've already guessed that letter!” and don’t count it as one of their 6 guesses. Go straight to step 6. If the user enters a word, check if the word matches the secret word (case-insensitive). Word guesses should not…arrow_forward
- There are three main operations on rectangles: intersection, union, and difference. Among them, only intersection is guaranteed to return another rectangle. In general, the union of two rectangles is... two rectangles, and the difference between two rectangles is ... a whole lot of rectangles, as we will see. We let you implement rectangle intersection. Of course, the intersection is defined only if the rectangles have the same number of dimensions. The intersection is computed by taking the intersection of the intervals of the two rectangles for corresponding dimensions. If one of the intervals is empty, you should return None. [] # @ title Rectangle intersection def rectangle_and(self, other): if self.ndims != other.ndims: raise TypeError("The rectangles have different dimensions: {} and {}".format( )) self.ndims, other.ndims ### YOUR SOLUTION HERE Rectangle. _and_ = rectangle_and [ ] r1 = Rectangle((2, 3), (0, 4)) r2 = Rectangle((0, 4), (1, 3)) draw rectangles (r1, r2) draw…arrow_forwardUsing Math.max and/or Math.min, write a class MaxOrMin, and make sure touse Math.max and Math.min which does the following: a. Create a Scannerb. Declare two variables, number1 and number 2c. Ask the user to enter 2 numbersd. Using the information above, print messages displaying the highest and lowest values ora message if the numbers are equal. The messages should look like the sample outputbelow Tip• Use if-else statement Submission• Copy and paste your code• Screen shot the console with user input of three examples Sample Run Enter a number 5Enter a number 9The lowest value is 5The highest value is 9 Enter a number 24Enter a number 11The lowest value is 11The highest value is 24 Enter a number 12Enter a number 1212 and 12 are equalarrow_forwardnot handwritten Explain Meadowdale Dairy Farm sells organic brown eggs to local customers. They charge $3.25 for a dozen eggs, or 45 cents for individual eggs that are not part of a dozen. Write a class that prompts a user for the number of eggs in the order and then display the amount owed with a full explanation. For example, typical output might be, "You ordered 27 eggs." "That's 2 dozen at $3.25 per dozen and 3 loose eggs at 45.0 cents each for a total of $7.85."arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- 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
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education