4. TABLE 1 below shows the taxrate for pairs of status and income ranges. TABLE 1 status 1 1 1 2 2 2 income <=30000 <=50000 >50000 <=60000 <=100000 >100000 taxrate .02 .04 .07 .10 .12 .15 Write Java code for a method named computeTaxrate that accepts two integers and returns the taxrate as specified by the table. For example, if status of 1 and income of 25000 were passed to computeTaxrate, it would return a value of .02 If 2 and 85000 were passed, it would return a value of .12
Q: please help me creating a ERD-diagram for the following cafe website and ordering Database design:…
A: It is easy for the developers to understand the system by simply looking at the ER diagrams.
Q: Compare Oracle's cloud offerings against those of Amazon, Google, and Microsoft.
A: Compare Oracle's cloud offerings against those of Amazon, Google, and Microsoft answer in below…
Q: Just what does it imply when we talk about a "computer network"? What are the several components…
A: Definition: A network is made up of two or more nodes (computers, for example), which are connected…
Q: What information is included in each interrupt vector table entry
A: Introduction It is a table that contains vectors, as its name implies. However, what exactly are…
Q: make notepad program in android studio kotlin
A: INTRODUCTION: You will discover how to make and use your first Android app in this codelab using the…
Q: Describe the various safeguards in MS-Excel and how they work. Give reasons and instances to back up…
A: Types: The following protection types are available in MS-Excel to safeguard data: Record Level.…
Q: How does cloud scalability operate, and what is it exactly? What characteristics of cloud computing…
A: Cloud scalability In cloud computing, Cloud scalability refers to the ability to increase or…
Q: They have revolutionized the way their business clients obtain software and resources by providing…
A: Cloud computing infrastructure which refers to the one it is the collection of hardware and software…
Q: When it comes to disk scheduling, how risky is it to employ the SSTF algorithm?
A: Disk scheduling method SSTF: The technique known as SSTF, or Shortest Seek Time First, is used to…
Q: Our query takes one nanosecond to perform and returns millions of relevant web pages, according to…
A: The speed of electron transport undoubtedly constrains any advances to the current PC gadgets. This…
Q: Is your computer's or mobile device's operating system easily accessible? Why is this advantageous
A: An operating system is in charge of managing software, processes, memory, and hardware. It enables a…
Q: What are the three characteristics that a network must have in order to be regarded practical and…
A: What are the three characteristics that a network must have in order to be regarded practical and…
Q: (15) 6. Minimal polynomial: a) Find the minimal polynomial of √3i over Q. b) Find the minimal…
A: Solution for the given question,
Q: What does the acronym GSM mean? What is the purpose of your phone's SIM card?
A: GSM, a global mobile communications system, is a cellular phone technology in its second generation.…
Q: Should understanding of emotions and empathy be part of robot attitudes?
A: The simulation of human intelligence processes by machines, particularly computer systems, is known…
Q: Why is understanding how operating systems interact with computers so important?
A: Introduction How operating systems interact with machines is the topic of this inquiry.
Q: What procedures would you take to troubleshoot a computer error code?
A: Required: What steps would you take to troubleshoot a computer problem code? No operating system or…
Q: Familiarity with the fundamentals of social networking First, we'll discuss what we mean by…
A: According to the information given:- We have to describe the familiarity with the fundamentals of…
Q: Write code that uses a while loop to display the powers of 2 exactly as shown below: 1 2 4 8 16 32…
A: Answer Introduction: Start Take the number of terms Find the power of 2 Computer results Print Stop…
Q: Database management systems may be useful even for single-user programs with little data needs. Are…
A: DBMS(database managemnet system) is made up of several software applications that utilise the…
Q: Name any two basic principles of Object-oriented Programming.
A: Object-Oriented Programming (OOP): It is programming paradigm in the computer science which relies…
Q: Procedure-level variables are typically declared at the end of a procedure. True False Question 46 ✔…
A: 45 Explanation- Procedure-level variables are typically declared at the beginning of a procedure. 46…
Q: 1. We consider a Bayesian network with 20 random variables. We only know that 10 of the variables…
A: Bayesian network: A Bayesian network is a graphical representation of a set of variables and their…
Q: Use prolog for the coding Using prolog write a predicate to guess a number interactively from 1 to…
A: Introduction The write() predicate can be used to write the output. This predicate accepts the…
Q: Some HTML tags work in pairs
A: Please find the detailed answer in the following steps.
Q: What are the primary criteria for evaluating DBMs for data warehouses?
A: The requirements for evaluating DBMS products for datawarehousing are given below. 1.CONCURRENT…
Q: Take into account that the sender is aware of, and prepared for, a continuous roundtrip delay. Given…
A: Timer essential in protocol: In this case, the total delay caused by the roundtrip journey between…
Q: Should you write an essay comparing various CPU Scheduling Algorithms, or what?
A: The algorithms for scheduling the CPU: The development of CPU scheduling algorithms is a challenging…
Q: Can you name the three broad types of procedural languages that exist? You should explain each in a…
A: There is no concept of class in procedural programming. It is possible to create a procedural…
Q: What are some examples of Automata Theory in action?
A: The applications of automata theory must be determined here. Answer: There are several varieties of…
Q: Program - Python Write a function min_max() that takes a list s as an argument, and print the…
A: In this question, it is asked to create a python program for the given problem statement. The…
Q: What exactly is the data processing procedure?
A: data processing, data manipulation using a computer.Data processing can include any use of computers…
Q: iii) Use MATLAB to show that the sum of the following infinite series converge to 1: 1 Σ₁²=²+²+2 -…
A: MATLAB:
Q: Consider software that enables a surgeon in one area to do surgery on a patient in another location…
A: Take a part of the software that, with the use of an internet connection, enables a surgeon in one…
Q: Program - Python Give two sets set1={1,2,3,4,5} set2={4,5,6,7,8} Run each of the four Python set…
A: Python is a computer programming language often used to build websites and software, automate tasks,…
Q: Most of the code may be downloaded from the internet as a tarball. Which one of these statements is…
A: Format in the tarball: The tarball format is the most ancient one, and it may be used for archiving…
Q: What are the five most notable applications of computer graphics in today's business world?
A: I was given: Which five fields are considered to be the most significant applications of computer…
Q: Networks are the many means through which computers may exchange data with one another. Which…
A: Two or more computers are connected to share resources, exchange data or enable electronic…
Q: Brief introduction to the pros and cons of having global connection in a cloud computing setting.
A: Introduction: With the use of this technology, businesses may provide their clients compute services…
Q: Describe how the merging of the internet, mobile phones, and other media has paved the way for the…
A: Emerging Technologies: A disruptive technology is one that overthrows an existing technology and…
Q: Program - python Create an array of 10 integers and pre-populate it with 10 numbers. Then write a…
A: Below is an illustration of how to construct a 10-int integer array, pre-fill it with 10-numbers,…
Q: specifying number of bits for each field of instruction
A: Following is the structure of an instruction address Mode OpCode Memory and Register Mode and…
Q: Do neural networks process information in a logical order? Explain.
A: In this question we need to explain whether neural networks process information in logical order or…
Q: There are four general states of a process: (1) ready, (2) running, (3) waiting, and (4) terminated.…
A: Process : A running process is referred to as a program. It is the instance of a computer program…
Q: How would you define an algorithm if you had to do it yourself?
A: A collection of clear, executable steps that constitute an ordered, ending process is known as an…
Q: We suggest adding a new category to Flynn's taxonomy. What sets advanced computers apart from their…
A: Flynn's taxonomy : Flynn's taxonomy is a classification system for computer architectures developed…
Q: When we say "computer network," what do we mean exactly? What exactly are the parts of the network,…
A: Computer network: A computer network is a group of connected computers that exchange information…
Q: How might the potential dangers of corporate networking be mitigated? Many difficulties are…
A: Individuals can engage with the sort of social media and build a network. Engaging with others and…
Q: What are the two sorts of services provided by the Internet to its users? What are some of the…
A: The two categories of services the internet offers to its application are: The Internet offers its…
Q: In what ways may cloud collaboration be useful? When it comes to teamwork, how precisely can using…
A: Cloud collaboration may be utilised for many forms of teamwork and how this aids in cooperation.…
Please written by computer source
java please
Step by step
Solved in 3 steps with 2 images
- 1. Replace the (????) with relevant code to make th eprogram function. Details about the code are given below:(Java as been used) a) This program creates a reference to a file in main() and passes the reference to countWords() countWords(), not main(), reads the file and displays Total lines Total words Average words per line */ package finalexamtakehome1; import java.io.*; /** * * @author sweetkim */ public class Finalexamtakehome1 { // public static void countWords(????) { int lineCount = 0; int wordCount = 0; while (????()) { String line = input.nextLine(); lineCount++; Scanner lineScan = new Scanner(line); while (????()) { String next = lineScan.next(); wordCount++; } } double averageWords = (double) wordCount / lineCount; System.out.println("Total lines = " + lineCount); System.out.println("Total words = " + wordCount); System.out.printf("Average words per line =…char xusername[10]; char xbankname[10]; int xaccountnum[4]; int xcardnum[14]; int xpass[4]; int xwalletnum[11]; int xOTP[4]; printf("Enjoy a range of our banking services including cash withdrawals and deposits, card and loan installment payments, bill payments, smart wallet recharge, and card-less services.\n\n\n"); printf("If you are bank staff press 1. \t\t\t If you are a customer press 2.\n"); int num;label0: scanf_s("%d", &num); if (num == 1) {//bank staff char bank_staff[10] = { "mahmoud" }; char xbank_staff[10]; int bank_pass[4] = { 5,5,5,5 }; int xbank_pass[4]; int doha = 0; labelinf1: printf("Enter your name.\n"); scanf_s("%s", xbank_staff, 10); if (strcmp(xbank_staff, bank_staff) == 0) { printf("Enter your password.\n"); scan_array(xbank_pass, 4); for (int i = 0; i < 4; i++) { if (xbank_pass[i] == bank_pass[i]) {…Need help in java please I am doing a program that uses the insertionsort() method. The output should look like this insertionsort() Test: BEFORE: [42, 23, 20, 46, 90, 53, 13, 24, 74, 100] BEFORE: [byzantine, iceberg, yellow, dark cyan, antique bronze, dark slate gray, telemagenta, jet, dark red, red salsa] AFTER: [13, 20, 23, 24, 42, 46, 53, 74, 90, 100] AFTER: [antique bronze, byzantine, dark cyan, dark red, dark slate gray, iceberg, jet, red salsa, telemagenta, yellow] Numbers Result Correct?: true Colors Result Correct?: true however I have this error and I'm unsure if I'm doing it right, I provided my code and the output I get please help me
- Complete and modify the code. 1 def to_share(total_candies, n_friends=4): 2 """Return the number of leftover candies that must be 3 smashed after distributing 4 the given number of candies evenly between 3 friends. 5 6 >>> to_share(91) 7 1 8 """ 9 return total_candies 10 11 to_share(10, 4) 12 to_share(5) 13 to_share(1, 5)23.6 LAB: BankAccount class (Use Python) Build a class called BankAccount that manages checking and savings accounts. The class has three attributes: a customer name, the customer's savings account balance, and the customer's checking account balance. Implement the following constructor and instance methods as listed below: Constructor with parameters (self, new_name, checking_balance, savings_balance) - set the customer name to parameter new_name, set the checking account balance to parameter checking_balance, and set the savings account balance to parameter savings_balance. deposit_checking(self, amount) - add parameter amount to the checking account balance (only if positive) deposit_savings(self, amount) - add parameter amount to the savings account balance (only if positive) withdraw_checking(self, amount) - subtract parameter amount from the checking account balance (only if positive) withdraw_savings(self, amount) - subtract parameter amount from the savings account…USE THE PROGRAM CODE BELOW TO CODE 1. COMMAND LINE ARGS CODE IN JAVA 1. Command Line Args Modify problem # 1 from Lab 8 to accept the values for the key as command line arguments. Your program may assume the arguments given at the command line are integers. If there are no arguments, print a message. If there is at least one argument, compute and print the average of the arguments. Note that you will need to use the parseInt method of the Integer class to extract integer values from the strings that are passed in. If any non-integer values are passed in, your program will produce an error, which is unavoidable at this point. Test your program in NetBeans using the data for problem # 1 Lab 8 as command line arguments. import java.util.Scanner;import java.text.NumberFormat; public class Quizzes{ //---------------------------------------------- // Read in the number of questions followed by // the key, then read in each student's answers // and calculate the number…
- 3.21 In Java Primary U.S. interstate highways are numbered 1-99. Odd numbers (like the 5 or 95) go north/south, and evens (like the 10 or 90) go east/west. Auxiliary highways are numbered 100-999, and service the primary highway indicated by the rightmost two digits. Thus, I-405 services I-5, and I-290 services I-90. Given a highway number, indicate whether it is a primary or auxiliary highway. If auxiliary, indicate what primary highway it serves. Also indicate if the (primary) highway runs north/south or east/west. Ex: If the input is: 90 the output is: I-90 is primary, going east/west. Ex: If the input is: 290 the output is: I-290 is auxiliary, serving I-90, going east/west. Ex: If the input is: 0 or any number not between 1 and 999, the output is: 0 is not a valid interstate highway number.1. Write a class to calculate the distance between two massive objects using using Newton's law of universal gravitation. Use it to determine the distance between the Earth and the Moon in kilometres. Then use it to determine the distance between the Earth and the Sun in kilometres. ?=??1?2?2F=Gm1m2r2 You may find the following values useful: Gravitational Constant: ?=6.674×10−11 m3kg−1s−2G=6.674×10−11 m3kg−1s−2 Mass of the Earth: ?⊕=5.972×1024 kgM⊕=5.972×1024 kg Mass of the Moon: ?=7.348×1022 kgm=7.348×1022 kg Mass of the Sun: ?⊙=1.989×1030 kgM⊙=1.989×1030 kg Force of attraction between the Earth and the Moon: ?=1.986×1020 NF=1.986×1020 N Force of attraction between the Earth and the Sun: ?=3.6×1022 NF=3.6×1022 N Please give proper explanation and typed answer only.23.5 LAB: Random values (Use Python) In main.py define the RandomNumbers class, which has three integer attributes: var1, var2, and var3. Write getter method for each attribute: get_var1(), get_var2() and get_var3(). Then write the following 2 instance methods: set_random_values( ) - accepts a low and high integer values as parameters, and sets var1, var2, and var3 to random numbers within the range of the low and high input values (inclusive). get_random_values( ) - prints out the 3 random numbers in the format: "Random values: var1 var2 var3" Ex: If the input is: 15 20 the output may be: Random values: 17 15 19 where 17, 15, 19 can be any random numbers within 15 and 20 (inclusive). Note: When submitted, your program will be tested against different input range to verify if the three randomly generated values are within range.
- Using C++ 11 Write a program which overloads fractions arithmetic operations for division. And include the overloading operators which we did in the class like multiplication, comparison, insertion, and extraction operators. Here is the class: class NumDays { int hr; //declaring hour variable to store hours float days; //declaring days variable to store days public: //default constructor NumDays() { hr = 0; days = 0.0; }; // parametrized constructor NumDays(int hrs) { hr = hrs; days = float(hrs / 8.0); }; // implementing getters method to return hours value from class int getHour() { return hr; } // implementing getters method to return no of days from class float getDays() { return days; } // method to implement addition operator NumDays operator + (NumDays obj) { int hrs = getHour() + obj.getHour(); NumDays temp(hrs); return temp; } // method to…Complete both Unit Tests using the given code Unit Test #1 performOperation addition test Build Output NtTest6b116967.java:9: error: performOperation(double,double,String) has private access in Calculator assertTrue(tester201.performOperation(5, 2, "+") == 7.00); ^ Test Contents Calculator tester201 = new Calculator(); @Test public void unitTest() { assertTrue(tester201.performOperation(5, 2, "+") == 7.00); } Unit Test #2 performOperation multiplication test Build Output NtTeste16b3fd1.java:9: error: performOperation(double,double,String) has private access in Calculator assertTrue(tester202.performOperation(5, 2, "*") == 10); Test Contents ^ Calculator tester202 = new Calculator(); @Test public void unitTest() { assertTrue(tester202.performOperation(5, 2, "*") == 10); } The Given Code // Calculator.java - This program performs arithmetic, ( +. -, *. /, % ) on two…How do I fix the error Java? Error ---------- Movie.toString() returns: Movie: [ Minutes 142 | Movie Name:The Shawshank Redemption | not kid friendly | Number of Cast Members: 3 | Cast Members: ] instead of: Movie: [ Minutes 142 | Movie Name: The Shawshank Redemption | not kid friendly | Number of Cast Members: 3 | Cast Members: Tim Robins, Morgan Freeman, Bob Guton ] without bringing this error Error ---------- Exception occurred while calling Movie.toString() Code: import java.util.*; import java.util.Arrays; public class Movie { private String movieName; private int numMinutes; private boolean isKidFriendly; private int numCastMembers; private String[] castMembers; // default constructor public Movie() { this.movieName = "Flick"; this.numMinutes = 0; this.isKidFriendly = false; this.numCastMembers = 0; this.castMembers = new String[10]; } // overloaded parameterized constructor public Movie(String movieName, int numMinutes, boolean isKidFriendly, String[] castMembers)…