Intructions: Submission: ONLY java file. You can include the two programs in one java file or submit one java file for each question. Test your program many times before you submit it on blackboard. Your program should be free of syntax errors and logical errors. The program is free of logical errors if it gives the correct results. This assignment is individual assignment and any duplicated answers will result in zero. 5.4 (CONVERSION FROM MILES TO KILOMETERS) Write a program that displays the following table (note 1 mile is 1.609 kilometers): Miles Kilometers 1 1.609 3.218 14.481 10 16.090
Q: Example 7: Write a program to create a matrix A(5*5), then replace the diagonal with zeros. continue
A: - We need to code the matrix program. - We are using C++ here.
Q: Distinguish the difference between declaring one class as a friend of another class (object…
A: No function or class may declare itself a buddy of another type. Utilize the buddy keyword and the…
Q: Problem 2 (. Draw the schematic for a multicell SRAM with 3 read ports and 2 write ports
A: Below is th schematic diagram
Q: can we use try-catch exception handling in Arduino? using C++? kindly elaborate why or why not
A: Arduino compiler or IDE accepts C and C++.
Q: Please answer c++ Use the simplest method (brute force) to solve the closest pair of points…
A: Getting the minimum distance among the given set of points usually requires O(n^2).
Q: Consider an ordered disk queue with requests involving tracks 97,145,22,14,124,65 and 67. if the…
A: C-SCAN is a varient of scan designed to provide a more uniform wait time.
Q: 2. Determine which characteristics of an algorithm de- scribed in the text (after Algorithm 1) the…
A: An algorithm is a finite set of precise instructions for performing a computation or for solving a…
Q: Handshaking is a programmable .interface technique True False
A: Find the answer with reason given as below :
Q: 28. In a linear linked list, a. the next pointer of each node has the value NULL b. the last node…
A: In this question we have to understand the linked list and provide the correct answer. Lets…
Q: Assume your boss requests you to inflate the benefit statistics for an IT proposal to boost a…
A: Justification: Raising the benefit estimates on IT proposals solely to increase the project's…
Q: What impact has Google had on our lives?
A: In this question, we have to understand what impact google is making on our lives ? Let look and…
Q: Explain why model checking is sometimes a more cost-effective way to verification than evaluating…
A: In model checking, finite state machines are used to model systems, and this finite-state model is…
Q: Please povide a straightforward algorithm and find its time complexity.
A: for(i=1; i<=n; i++){ //n times for(j=1; j<=n; j++){ //n times…
Q: Write a program called Cylinder.java that calculates the volume of a cylinder. Your program should…
A: I give the code in Java along with output and code screenshot
Q: What is the best way for application software users to back up their data? Select one (1) relevant…
A: There are various storage medium available for backing up data used by users of application…
Q: Create a Temprature class. Make two methods : 1. convertFahrenheit - It will take celsius and will…
A: Make Temperature class having two method convertFahrenheit convertCelsius convertFahernheit :-…
Q: Example 6: Write a program to create a matrix A(5*5), then print the elements of diagonal only.break
A: Step-1: StartStep-2: Declare an array A of size 5*5Step-3: Take input array elementsStep-4: Print…
Q: What are the ramifications of insider threats to cloud security, as well as some potential…
A: Answer : If any threats happen with inside to the cloud then it will effect the cloud overall data…
Q: rue story: in the spring of 1999, a man in Tampa, Florida was diagnosed with stomach cancer. He…
A: True story: in the spring of 1999, a man in Tampa, Florida was diagnosed with stomach cancer. He…
Q: What is the effect of a data breach on cloud security? What are some of the possible…
A: Introduction: Cloud computing data leakA data breach occurs when secure/confidential information is…
Q: Give an example of how mixed expressions are used.
A: Introduction: Mixed mode arithmetic occurs when one of the operands is a real number and the other…
Q: Write a program to create a matrix A(5*5), then print the elements of diagonal only. break
A: Here in this program user will input N*N matrix and program will print its diagonal elements. in the…
Q: What exactly is configuration management, and why is it so crucial?
A: Solution : Configuration Management It is the systems engineering strategy to ensuring that…
Q: --Problem -3 -Create a flowchart design that depicts the solving of the following problem: Asks user…
A: The Answer is in step2
Q: What does the phrase "time value of money" mean?
A: What does the phrase "time value of money" mean?
Q: Question 5. a) Which data structure that would you use to represent the site map of Facebook? The…
A: Facebook uses a graph data structure for the site map. it consists of a group of entities and their…
Q: Explain integrated development environments (IDEs) and application life cycle management (ALM)…
A: Integrated Development Environment (IDE); It is the people, tools, and procedures that manage an…
Q: There are four types of IT system maintenance. Assume you were in charge of a tiny airline's…
A: Introduction: The following are the four forms of system maintenance: Maintenance that is…
Q: Define the terms "response time," "bandwidth," "throughput," and "turnaround time." What is the…
A: Introduction: Response time refers to the time it takes for a user to make a request and for the…
Q: C program for array manipulation Reverse the array of 10 elements Take array from user and print…
A: HI THEREI AM ADDING C PROGRAM AS REQUIREMENT BELOWPLEASE GO THROUGH IT THANK YOU
Q: Hash chains and rainbow tables are used to recover hashed passwords. Outline similarities and…
A: A hash chain is a sequence of values derived via consecutive application of a cryptographic hash…
Q: There may be issues when code is merged into a larger system. What is the role of configuration…
A: Configuration management: Software system are constantly changing during development and use.…
Q: Create 20 different LED display/simulation using C++, it should have a minimum of 100 delay and a…
A: Given: the delays given:- minimum - 100maximum - 500 the loop should be:- minimum - 5 maximum -…
Q: Explain why memberwise assignment in a class with a pointer member may cause problems.
A: The Answer is in step-2.
Q: What are the roles of information experts in the information services unit? What do they do?
A: Introduction: Someone who gathers, records, organises, saves, preserves, retrieves, and disseminates…
Q: Give instances of useful IT community resources for a systems analyst.
A: System analysts are responsible for maintaining and improving the computer systems of the…
Q: In Web 1.0, explain the "Information Portal" and its limitation when compared to the other newer web…
A: Web 1 was the first widely used version of the internet, with sites displaying information but…
Q: Explain an assault against a web-based cookie-based authentication scheme.
A: Cookies: Cookies are little data files; a cookie is a short bit of text given to your browser by a…
Q: What are the Whetstone, Dhrystone, and Linpack benchmarks' flaws that the SPEC CPU benchmarks…
A: start The synthetic benchmarks Whetstone and Dhrystone are: They were created exclusively for the…
Q: Simplify following Boolean Expressions using Quine-McClukey tabular method.…
A: Minimised expression obtained for F(A,B,C,D,E,F) using Quine-McCluskey tabular method is given…
Q: The evolution of wireless LAN protocols may be summarised in a few sentences.
A: The Answer start from step-2.
Q: Q3: Link between Five right choices in A and B lists, where N=|1 3; 3 5; 5 7ir List A a-3 b-2 List A…
A: sum function will give us column sum and thus it will give us vector [9 15] and min function will…
Q: What Is A Symbol Table?
A: A data structure is a data organization, management and storage format that enables efficient access…
Q: C program array manipulation Write c program to take 10 array elements from user as input Print…
A: ALGORITHM:- 1. Take input for the 10 array elements from the user. 2. Find the maximum element from…
Q: What is the communication type of a wireless local area network?
A: A wireless local area network-WLAN is linking two or more devices over a wireless network. WLANs are…
Q: You may take advantage of Hadoop's high degree of computational redundancy when you utilise it.…
A: Yes, you may take advantage of Hadoop's high degree of computational redundancy when you utilize it…
Q: Why additional attributes should be included to increase the classification accuracy
A: Why additional attributes should be included to increase the classification accuracy
Q: Explain in a few sentences what the term "memberwise assignment" refers.
A: Copying one object to the other, one member at a time as though assigning each member individually,…
Q: Even if a programmer already understands a range of programming languages, why is it useful for him…
A: Even if a programmer already understands a range of programming languages, why is it useful for him…
Q: What are the differences between forward and reverse engineering tools, and how do you use them?
A: Engineering Tools (Forward and Reverse) Engineering tools, which include forward and reverse…
Please try to explain how to do it. I'll appreciate your help.
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images
- JAVA PROGRAM Chapter 4. Homework Assignment (read instructions carefully) Write a program that asks the user for the name of a file. The program should read all the numbers from the given file and display the total and average of all numbers in the following format (three decimal digits): Total: nnnnn.nnn Average: nnnnn.nnn Class name: FileTotalAndAverage double_input1.txt double_input2.txt PLEASE MODIFY THIS CODE, SO WHEN I UPLOAD IT TO HYPERGRADE IT PASSES ALL THE TEST CASES, BECAUSE WHEN I UPLOAD IT TO HYPERGRADE IT DOES NOT PASS THE TEST CASES. IT HAS TO PASS ALL THE TEST CASES. I PROVIDED THE CORRECT OUTPUT AS A SCREENSHOT AS A REFERRENCE. import java.io.BufferedReader;import java.io.FileReader;import java.io.IOException;import java.util.InputMismatchException;import java.util.Scanner;public class FileTotalAndAverage { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); String fileName; do {…JAVA PROGRAM Chapter 4. Homework Assignment (read instructions carefully) Write a program that asks the user for the name of a file. The program should read all the numbers from the given file and display the total and average of all numbers in the following format (three decimal digits): Total: nnnnn.nnn Average: nnnnn.nnn Class name: FileTotalAndAverage PLEASE FIX AND MODIFY THIS JAVA SO WHEN I UPLOAD IT TO HYPERGRADE IT PASSES ALL TEST CASSES PLEASES. RIGHT NOW IT SAYS 0 OUT 3 PASSED. THE PICTURES THAT I PROVIDED PROOF THAT WHEN I UPLOAD IT TO HYPERGRADES IT FAILS TEST CASSES. THANK YOU. import java.io.*;import java.util.Scanner;public class FileTotalAndAverage { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); System.out.println("Please enter the file name: "); while (true) { String fileName = scanner.nextLine(); File file = new File(fileName); if (file.exists() &&…COMPUTER SCIENCE 130 JAVA PROGRAM Chapter 4. Homework Assignment (read instructions carefully) Write a program that asks the user for the name of a file. The program should read all the numbers from the given file and display the total and average of all numbers in the following format (three decimal digits): Total: nnnnn.nnn Average: nnnnn.nnn Class name: FileTotalAndAverage double_input1.txt double_input2.txt PLEASE FIX AND MODIFY THIS JAVA SO WHEN I UPLOAD IT TO HYPERGRADE IT PASSES ALL TEST CASSES PLEASES. RIGHT NOW IT SAYS 0 OUT 3 PASSED. THE PICTURES THAT I PROVIDED PROOF THAT WHEN I UPLOAD IT TO HYPERGRADES IT FAILS TEST CASSES. THANK YOU. import java.io.BufferedReader;import java.io.FileReader;import java.io.IOException;import java.util.InputMismatchException;import java.util.Locale;import java.util.Scanner;public class FileTotalAndAverage { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); String…
- JAVA PROGRAM Chapter 4. Homework Assignment (read instructions carefully) Write a program that asks the user for the name of a file. The program should read all the numbers from the given file and display the total and average of all numbers in the following format (three decimal digits): Total: nnnnn.nnn Average: nnnnn.nnn Class name: FileTotalAndAverage PLEASE FIX, CHANGE AND MODIFY THIS JAVA PROGRAM SO WHEN I UPLOAD IT TO HYPERGRADE IT PASSES ALL TEST CASSES PLEASES. RIGHT NOW IT SAYS 0 OUT 3 PASSED. THE PICTURES THAT I PROVIDED PROOF THAT WHEN I UPLOAD IT TO HYPERGRADES IT FAILS TEST CASSES. THANK YOU. import java.io.BufferedReader;import java.io.FileReader;import java.io.IOException;import java.util.InputMismatchException;import java.util.Locale;import java.util.Scanner;public class FileTotalAndAverage { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); String fileName; do {…Chapter 4. PC #14. Line Numbers (page 265) Write a Java program that asks the user for the name of a file. The program should display the contents of the file with each line preceded with a line number followed by a colon. The line numbering should start at 1. I should be able to run the program in my compiler and type input1.txt and it should print out the output. Here are the test cases that it should pass Test Case 1 Please enter the file name or type QUIT to exit:\nquitENTER Test Case 2 Please enter the file name or type QUIT to exit:\nbadfilename.txtENTERFile: badfilename.txt does not exist.\nPlease enter the file name again or type QUIT to exit:\nquitENTER Test Case 3 Please enter the file name or type QUIT to exit:\ninput1.txtENTER1: a\n2: b\n3: c\n4: d\nObjective:Design and implement a word unscrambler game in Java.Details:Your program should read in a random word from a file called words.txt (note the lack of capitalization) that you provide. There should not be any hard limit on the number of words in the file. If words were added/removed from the file, your program should recognize such changes of the words.txt and handle appropriately next time it runs. The file should contain one word per line. To read a random word you can generate a random number between 1 and the number of lines, and skip n-1 lines before reading the word. Scramble the word by swapping random pairs of letters a random number of times. Display the scrambled word with character indexes on top. Assume that the word is always no more than ten characters (so that index can be within 0-9 range, inclusive).Offer the user a menu with the following choices:• Enter 1 to swap a pair of lettersIf this option is selected prompt the user to enter two indexes and swap the…
- IN JAVA PLEASE The program will read and store thebad words(Kill,killer,assault,etc.) from the file. Then, it will display the following options to the user.• Enter -1 to exit.• 1 - Enter a sentence for profanity check• 2 - Choose a file for profanity checkIf the user chooses the first option, the program will display a text similar to "Enter a text," then he/shewill enter a text. If the user chooses the second option, a file chooser will be prompted to the user forhim/her to select a "text file. “If the user chooses third option, the program will be terminated.If the program finds any bad words, it will replace them with "*** (exactly 3 stars regardless of wordlength") and write it to the console for the first option or overwrite the existing file for the secondoption. Additional Notes:• Use JFileChooser for file reading and BufferedWriter for file writing operations.• Implement custom exceptions to prevent common run-time errors that the user may cause.• You can ignore…java Program Chapter 4. Homework Assignment (read instructions carefully) Write a program that asks the user for the name of a file. The program should read all the numbers from the given file and display the total and average of all numbers in the following format (three decimal digits): Total: nnnnn.nnn Average: nnnnn.nnn Class name: FileTotalAndAverage I do not want a goodbye system out in the program and it has to pass all the test cases. Test Case 1 Please enter the file name or type QUIT to exit:\ninput1.txtENTERTotal: 11.800\nAverage: 2.950\n Test Case 2 Please enter the file name or type QUIT to exit:\ninput2.txtENTERTotal: 17.300\nAverage: 3.460\n Test Case 3 Please enter the file name or type QUIT to exit:\ninput3.txtENTERTotal: 1.124\nAverage: 1.124\n Test Case 4 Please enter the file name or type QUIT to exit:\ninput4.txtENTERFile input4.txt is empty.\n Test Case 5 Please enter the file name or type QUIT…JAVA PROGRAM Chapter 4. Homework Assignment (read instructions carefully) Write a program that asks the user for the name of a file. The program should read all the numbers from the given file and display the total and average of all numbers in the following format (three decimal digits): Total: nnnnn.nnn Average: nnnnn.nnn Class name: FileTotalAndAverage I need a "," (comma) to the number format here (after the first %):System.out.printf(Locale.US, "Total: %.3f%n", total); Also, I don't need to set the Locale. PLEASE FIX AND MODIFY THIS JAVA SO WHEN I UPLOAD IT TO HYPERGRADE IT PASSES ALL TEST CASSES PLEASES. RIGHT NOW IT SAYS 0 OUT 3 PASSED. THE PICTURES THAT I PROVIDED PROOF THAT WHEN I UPLOAD IT TO HYPERGRADES IT FAILS TEST CASSES. THANK YOU import java.io.*;import java.util.Scanner;import java.util.Locale;public class FileTotalAndAverage { public static void main(String[] args) { Scanner scanner = new Scanner(System.in);…
- **USE PYTHON** The U.S. Food & Drug Administration (FDA) offers downloadable/printable postersLinks to an external site. that “show nutrition information for the 20 most frequently consumed raw fruits … in the United States. Retail stores are welcome to download the posters, print, display and/or distribute them to consumers in close proximity to the relevant foods in the stores.” In a file called nutrition.py, implement a program that prompts consumers users to input a fruit (case-insensitively) and then outputs the number of calories in one portion of that fruit, per the FDA’s poster for fruitsLinks to an external site., which is also available as textLinks to an external site.. Capitalization aside, assume that users will input fruits exactly as written in the poster (e.g., strawberries, not strawberry). Ignore any input that isn’t a fruit. PLEASE SEE IMAGES FOR DETAILS (**use PYTHON**)Requested files: InClass02.java, input.txt Maximum number of files: 6 Create a simple java program that reads all the content in a .txt file, the user will enter the filename to be opened. In this case, the file will contain multiple lines of student details with each line containing a single student detail. Your task is to then create a student class that models the firstname, lastname, year of birth and gender of every student. The student class should further be able to assign every student created with a student number using a class variable[format is 2022000X, X is a number such as 1,2..] and be able to calculate the age of each student. Within the driver class add all the students read from file into an ArrayList and then print the first and last student in the list. You are additionally expected to deal with most common exceptions(See samples below) [HINT: DO NOT PROVIDE A PATH BUT RATHER ONLY OPEN THE FILE WITH RELATIVE PATH/FILENAME] Sample run 1: Enter filename:…[JAVA Code] In this lab, you will open the file, flowers.dat, and read input from that file in a pre-written Java program. The program should read and print the names of flowers and whether they are grown in shade or sun. // Flowers.java - This program reads names of flowers and whether they are grown in shade or sun from an input // file and prints the information to the user's screen. // Input: flowers.dat. // Output: Names of flowers and the words sun or shade. import java.io.*; // Import class for file input. public class Flowers { public static void main(String args[]) throws Exception { // Declare variables here // Open input file. // Create BufferedReader object. // Write while loop that reads records from file. // Print flower name and the words sun or shade. br.close(); System.exit(0); } // End of main() method. } // End of Flowers class.