![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
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
![Use the style guide provided in Chapter 2.16 as a starting point and also incorporate
these guidelines:
•
•
You can use either brace format (open on same or next line)
о Whatever you use – be consistent
Use descriptive names (exception - loop variables)
。 Bonus - good naming and style reduces the need for comments
Save comments for non-obvious code.
Comments go on the line above that code, horizontally aligned
o E.g. count
= count + 1; doesn't need a comment
•
•
•
•
Combine declarations and initialization whenever possible
Always use the best loop for that type of iteration
Use whitespace to separate each section (e.g., classes, methods, imports,
variable declarations) – space consistently and eliminate random whitespace.
-
。 Space out subtasks logically inside methods – don't clump it all together.
Make sure you take the extra time to ensure everything is ready even in the case of a
mishap.
Failure to follow these procedures will result in a penalty.
Sample output
Here is an example of what your report should look like. You can vary it as long the
temperatures line up vertically and everything is clearly labeled:
CIS 231
-
Assignment 4
-
Your Name
Fahr
Cels
Kelv
30.0
-1.1
272.0
40.0
4.4
277.6
50.0
10.0
283.2
======
=======
=======
Average:
High:
40.0
4.4
277.6
50.0
10.0
283.2
Low:
30.0
-1.1
272.0
Above Average:
1
Equal to Average:
1
Below Average:
1
Standard Deviation:
10.0](https://content.bartleby.com/qna-images/question/c58de9ec-9f31-4164-89c7-d28763515568/eaf2b87c-d337-4beb-a25b-2574508bcaf0/lv5126q_thumbnail.png)
Transcribed Image Text:Use the style guide provided in Chapter 2.16 as a starting point and also incorporate
these guidelines:
•
•
You can use either brace format (open on same or next line)
о Whatever you use – be consistent
Use descriptive names (exception - loop variables)
。 Bonus - good naming and style reduces the need for comments
Save comments for non-obvious code.
Comments go on the line above that code, horizontally aligned
o E.g. count
= count + 1; doesn't need a comment
•
•
•
•
Combine declarations and initialization whenever possible
Always use the best loop for that type of iteration
Use whitespace to separate each section (e.g., classes, methods, imports,
variable declarations) – space consistently and eliminate random whitespace.
-
。 Space out subtasks logically inside methods – don't clump it all together.
Make sure you take the extra time to ensure everything is ready even in the case of a
mishap.
Failure to follow these procedures will result in a penalty.
Sample output
Here is an example of what your report should look like. You can vary it as long the
temperatures line up vertically and everything is clearly labeled:
CIS 231
-
Assignment 4
-
Your Name
Fahr
Cels
Kelv
30.0
-1.1
272.0
40.0
4.4
277.6
50.0
10.0
283.2
======
=======
=======
Average:
High:
40.0
4.4
277.6
50.0
10.0
283.2
Low:
30.0
-1.1
272.0
Above Average:
1
Equal to Average:
1
Below Average:
1
Standard Deviation:
10.0
![This program involves inputting multiple data items (temperatures) that are each within
a certain range and then outputting a report about them utilizing arrays and methods.
1. The program will input from 1 to 35 (inclusive) Fahrenheit temperatures from the
user. You must first ask them to enter the number of temperatures that they will
be typing in. If the value entered is not between 1 and 35, you need to display a
message informing the user that the value they entered is out of range and make
them re-input until they provide an acceptable value. Prompt every input.
2. The Fahrenheit values are doubles and must range between -150.0 and 350.0
(inclusive.) If an out-of-range temperature is entered, you must display a
message informing the user as such and have them re-input until an in-range
value is entered.
3. Generate the output specified below.
Notes/Specifications:
1. You must create an array to hold your (double) temperature values.
2. All output needs to be right-justified and aligned by the decimal point (see back)
3. Blank lines are only used to separate sections of the report (#5 below, and back.)
4. Display all floating-point (double) numbers to one decimal place.
5. The output must be done in this order:
a. The assignment and your name
b. The values in ascending order (in Fahrenheit, Celsius, and Kelvin)
c. The average temperatures (for Fahrenheit, Celsius, and Kelvin)
d. The highest and lowest temperatures (for Fahrenheit, Celsius, and Kelvin)
e. The amount of temperatures above/equal to/and below the average (once)
f. The standard deviation for Fahrenheit. Use "corrected sample standard
deviation" (n-1 divisor):
(be sure to address and avoid a potential divide by zero.)
6. Part of your grade is based on how well you break down the problem into smaller
components. Each static method should only handle one primary task
(computing and outputting data need to be separate methods.)
•
main() will only be used for crucial variables and calling other (static)
methods. There are no instance variables/methods in this program.
• NOTE: Taking all code and putting it into a method that's called from
main () or other attempt to circumvent this requirement will result in an
extremely large deduction. Humongous, in fact.
7. The sort algorithm must be coded using the most optimal implementation
provided for that sort (Insertion or Selection) in the Chapter 8 material.
8. All requirements from Assignment 3 (including formatting) are in force for this
(and any subsequent) assignment unless specifically amended.
9. Your code must be free of compile and runtime errors.
10. Any variables being accessed in a method must be passed in as arguments and
used as parameters. No external access is permitted.](https://content.bartleby.com/qna-images/question/c58de9ec-9f31-4164-89c7-d28763515568/eaf2b87c-d337-4beb-a25b-2574508bcaf0/n80cyun_thumbnail.png)
Transcribed Image Text:This program involves inputting multiple data items (temperatures) that are each within
a certain range and then outputting a report about them utilizing arrays and methods.
1. The program will input from 1 to 35 (inclusive) Fahrenheit temperatures from the
user. You must first ask them to enter the number of temperatures that they will
be typing in. If the value entered is not between 1 and 35, you need to display a
message informing the user that the value they entered is out of range and make
them re-input until they provide an acceptable value. Prompt every input.
2. The Fahrenheit values are doubles and must range between -150.0 and 350.0
(inclusive.) If an out-of-range temperature is entered, you must display a
message informing the user as such and have them re-input until an in-range
value is entered.
3. Generate the output specified below.
Notes/Specifications:
1. You must create an array to hold your (double) temperature values.
2. All output needs to be right-justified and aligned by the decimal point (see back)
3. Blank lines are only used to separate sections of the report (#5 below, and back.)
4. Display all floating-point (double) numbers to one decimal place.
5. The output must be done in this order:
a. The assignment and your name
b. The values in ascending order (in Fahrenheit, Celsius, and Kelvin)
c. The average temperatures (for Fahrenheit, Celsius, and Kelvin)
d. The highest and lowest temperatures (for Fahrenheit, Celsius, and Kelvin)
e. The amount of temperatures above/equal to/and below the average (once)
f. The standard deviation for Fahrenheit. Use "corrected sample standard
deviation" (n-1 divisor):
(be sure to address and avoid a potential divide by zero.)
6. Part of your grade is based on how well you break down the problem into smaller
components. Each static method should only handle one primary task
(computing and outputting data need to be separate methods.)
•
main() will only be used for crucial variables and calling other (static)
methods. There are no instance variables/methods in this program.
• NOTE: Taking all code and putting it into a method that's called from
main () or other attempt to circumvent this requirement will result in an
extremely large deduction. Humongous, in fact.
7. The sort algorithm must be coded using the most optimal implementation
provided for that sort (Insertion or Selection) in the Chapter 8 material.
8. All requirements from Assignment 3 (including formatting) are in force for this
(and any subsequent) assignment unless specifically amended.
9. Your code must be free of compile and runtime errors.
10. Any variables being accessed in a method must be passed in as arguments and
used as parameters. No external access is permitted.
Expert Solution
![Check Mark](/static/check-mark.png)
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 2 steps
![Blurred answer](/static/blurred-answer.jpg)
Knowledge Booster
Similar questions
- Modify the Dice Poker program from this chapter to include any or all of the following features: 1- Splash Screen. When the program first fires up, have it print a short introductory message about the program and buttons for "Let's Play" and "Exit." The main interface shouldn't appear unless the user se- lects "Let's Play." 2-Add a "Help" button that pops up another window displaying the rules of the game (the payoffs table is the most important part). 3-Add a high score feature. The program should keep track of the 10 best scores. When a user quits with a good enough score, he/she is invited to type in a name for the list. The list should be printed in the splash screen when the program first runs. The high-scores list will have to be stored in a file so that it persists between program invocations.arrow_forwardJava script add event help needed 5) In the "myPage" section, select the fifth// button and assign a "click" listener. When// clicked, it should toggle the class named// "fourthPara" for the fifth paragraph// in the "myPage" section. // 6) In the "myPage" section, select the sixth// button and assign a "click" listener. When// clicked, it should change the text content// of the sixth paragraph in the "myPage"// section to:// "Event Bubbling. Stopping propagation."// Your event listener should be set to// Event Bubbling. You should stop the// event propagation. HERE IS THE INDEX HTML : <!DOCTYPE html><html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Practice Assignment 11</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/mocha/8.1.1/mocha.css"…arrow_forwardConnectedCircles.java, allows the userto create circles and determine whether they are connected. Rewrite the programfor rectangles. The program lets the user create a rectangle by clicking amouse in a blank area that is not currently covered by a rectangle. As the rectanglesare added, the rectangles are repainted as filled if they are connected orare unfilled otherwise, as shown in Figure b–c.arrow_forward
- In java plsarrow_forwardNeed help with coding this in python using tkinter Write a GUI program to let the user enter a file name from an entry field and then count the number of occurrences of each letter in that file. Clicking theShow Result button displays the result in a text widget. You need to displaya message in a message box if the file does not exist. https://www.bartleby.com/questions-and-answers/need-help-with-coding-this-in-python-using-tkinter-write-a-gui-program-to-let-the-user-enter-a-file-/153862b8-6d38-47a4-bd38-9c66882021d1arrow_forwardhelp finish the code of the provided code.arrow_forward
- Can you implement a module named inventory that will be responsible for managing the players inventory? The module should hold the inventory and implement the following functions: - displayInventory: Displays the current inventory - addToInventory: Adds an item to the inventory. *Use existing code below and don't use HTML* const prompt = require("prompt-sync")(); var adventurersName = ["Captain Thomas King","George","Tim","Sarah","Mike","Edward",];var len = 0;var Inventory = new Array(5).fill(" ");Inventory[len++] = "Food";Inventory[len++] = "Wine";Inventory[len++] = "Horses";Inventory[len++] = "Medicine"; var adventurersKilled = 3;var survivors;var numberOfAdventurers = adventurersName.length; survivors = numberOfAdventurers - adventurersKilled; displayIntroduction();getLeader(); var user_life = 3;var correct_answer = ["1","2","3"];var userIsCorrect;var options = ["\nOption 1 Enter the village hut?","Option 2 Eat the turkey leg?","Option 3 Sit on the stool?","Option 4 Talk with the…arrow_forwardPLEASE DONT COPY OFF OTHER POSTS CODE help with java..plzz paste indented code add comments tooarrow_forwardBean Counter - Chapter 18 - Use your TEXT editor to build the Bean Counter program - Save each version (Versions 0 - 10) - Final Version should work! Start with this code for VERSION O in your text editor! Save as BeanV0.html charset="UTF-8"> The Bean Counter Confirming that bean.html works var drink = "latte"; var ounce = 12; var shots = 2; var taxRate = 0.088; var price; if (drink == "espresso") price = 1.40; if (drink if (ounce :== "latte" || drink == "cappuccino") { 8) price = 1.95; if (ounce == 12) price = 2.35; if (ounce == 16) price = 2.75; } if (drink == "Americano") price = 1.20 + 0.30*(ounce/8); "expresso") price = price + (shots - 1)*.50; if (drink == price = price + price*taxRate; alert(price); html>arrow_forward
- I need some help fixing this code. I need it to let me enter the ISBN number witht the dashes and find the check number my code is below Ill like my teachers direction as a refernce. def main():while True:print('1. Verify the check digit of an ISBN-10')print("2. verify the check digit of an ISBN-13")print("3. Convert an ISBN-10 to an ISBN-13")print('4. Convert an ISBN-13 to an ISBN-10')print('5. Exit')command = input("Enter the Command (1-5): ")if command == '5':breakelif command == '1' or command == '3':# get 10 digit inputISBN = input("Please enter the ISBN-10 number: ")ISBN = ISBN.replace('-', '')while len(ISBN) != 10:print("Please make sure you have entered a number which is exactly 10 characters long.")ISBN = input("Please enter the ISBN number: ")ISBN = ISBN.replace('-', '')print(format(ISBN))if command == '1':print(check_10_digit(ISBN))else:print(convert_10_to_13(ISBN))elif command == '2' or command == '4':# get 13 digit inputISBN = input("Please enter the 13 digit number:…arrow_forwardObjectives: Construct and use 1D and 2D arrays Send arrays to methods Iterate through an array to perform a calculation Details:This assignment will be completed using the Eclipse IDE. Attach your .java file to the Assignment page. Which of the following five people is the most interesting famous computer scientist? Grace Hopper Ada Lovelace Katherine Johnson Frances Allen Shafi Goldwasser Let’s say that we ask a group of 20 people to vote for which one of the computer scientists is most interesting. Each voter votes for one candidate and, of course, we are interested in who wins. Our data is a matrix with each row representing one of the five computer scientists and each column representing one of the 20 voters. The data in the matrix consists of 1s and 0s. The number 1 in each column represents a vote for the candidate represented by that row. Here is an example matrix (the data matrix is just the numbers). Next to each row is the name of the computer scientist represented by…arrow_forward*with psuedo code First, launch NetBeans and close any previous projects that may be open (at the top menu go to File ==> Close All Projects). Then create a new Java application called "WeightedAvgDataAnalyzer" (without the quotation marks), that does the following: This program is similar to the previous assignment - "WeightedAvgDropSmallest" - with a major difference that the inputs for the program will be read from a file and the output for this assignment should be written to a new file. The concept of application is as follows: The program will read numbers from a file - data.txt - that you will create, where the weight is a double (greater than 0.0 and less than or equal to 1.0) and the other numbers are the number, n, of lowest values to drop and then the numbers to be averaged after dropping the lowest n values. Example data.txt file would display: 0.5 3 10 70 90 80 20 The program then calculates the weighted average of all those numbers except the lowest n numbers, where…arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
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
![Text book image](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
![Text book image](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
![Text book image](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
![Text book image](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
![Text book image](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
![Text book image](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education