JAVA CODING Problem: The third side of the triangle is 8 less than twice the sum of the two other sides and the first side is 5 more than the thrice the second side. If the perimeter is given, how long are its sides?
Q: Determine whether these statement forms are logically equivalent. In each case, construct a truth ta...
A: Given two statements are p ꓥ t and p. p ꓥ t contains two variables p and t. p is a single variable.
Q: 1. ((CV D) & (A V F)) Premise 2. (F+ E) 3. ((A& C) → F) 4. ((A & D) → F) Premise Premise Premise 5. ...
A: Given, ( C∨D ) & ( A∨F ) = True Using distributive law, we can rewrite it as ( ( C∨D ) & A )...
Q: Why choose artificial intelligence as your major , which careers could you go in with it ?
A: Few fields stand out as much as artificial intelligence when it comes to the top careers for the fut...
Q: RAID level 3 does not have ______ as in RAID level 1. Select one: a.Efficiency b.Enough storage spac...
A: Given: To choose the correct option.
Q: In java Program #1 - Geometric Shapes For this exercise you will need to make 4 class files. (M...
A: A class is a group of objects which have common properties. A constructor is a method that is used ...
Q: What's the difference between a relational database management system (RDBMS) and a non-relational d...
A: INTRODUCTION: A relational database management system is a form of database that stores data in tab...
Q: 1. This type of topology is highly reliable. A failure to one or a few nodes does not usually cause ...
A: Correct Option Mesh topology Explanation:- Mesh topology is highly reliable as in this topology thei...
Q: 3.11 Add shear to the instance transformation. Show how to use this expanded instance transformation...
A: A unit cube, also known as a cube of side 1, is a cube with sides that are each one unit long. A 3-d...
Q: Write a program that reads students’ names followed by their test scores. The program should output ...
A: The program will take input number to take that amount of student’s information. Then we have define...
Q: Given the ff. code snippet, determine the time complexity: void f2(int n) { for(int i=0; i < n; i++)...
A: Option A is correct answer
Q: What is the number of states required in minimal DFA to accept the strings of a regular language tha...
A: Given: Goal: Design minimum state DFA and report the minimum number of states.
Q: A method is implemented to compute a formula that involves dividing a quantity by a variable y. If ...
A: For the 1st solution then it will throw an error at the very beginning of the code and thus rest of ...
Q: Explain What Is Difference Between Baseband And Broadband Transmission?
A: Baseband and Broadband are both networking techniques. Both have their own specific advantages as we...
Q: esenham's line algorithm is adjusted to generate circle
A: given - explain how the bresenham's line algorithm is adjusted to generate circle
Q: C++ Create a program that reads a file containing a list of songs and prints the songs to the scree...
A:
Q: Use DrRacket for programming. my-curry: implement your own version of curry. Your version should...
A:
Q: What should a company do with password documentation?
A: INTRODUCTION The question is about corporations handling password documentation and here is the s...
Q: Explain why the exclusive-or cipher is not secure against a chosen plaintext attack
A: XOR Encryption is an encryption method used to encrypt data and is hard to crack by brute-force meth...
Q: Q1: Select the right answer * (True or False) False True and == in < MATLAB are logical operators Su...
A: Given: Goal: Check if the statements are true or false.
Q: If an express application contains the following call to getg: app.get('/foo', (req, res) => res.sen...
A: The answer is
Q: 5. Below is a depiction of a loop in instruction memory address Ox0 TOP: instruction 1 Ox4 instructi...
A: The branch target bits are in states 00,01,10 and 11 for branch not taken, partially branch not take...
Q: What is the size in bits of the tag in the cache?
A: Memory blocks are the blocks which are used for storing the address of the variables and the variabl...
Q: Find the errors from the following code and write the corect program. Each program has hwo errors
A: As per company guidelines we are suppose to answer only 1 question. Kindly re-post other questions ...
Q: Primary U.S. interstate highways are numbered 1-99. Odd numbers (like the 5 or 95) go north/south, a...
A: the answer is given below:-
Q: Assume that the following function prototypes are defined: void convertToCelsius(double *); void con...
A: Two thing we must understand here the way the functions are called :- First function have paramete...
Q: l area network (LAN)?
A: given - What are the benefits of having a local area network (LAN)?
Q: Java programming Write a method (void banana(int a)) that draws the following figure: a triangle wi...
A: Given: Java programming Write a method (void banana(int a)) that draws the following figure: a trian...
Q: What is “semi-supervised” learning? What problem(s) does it solve and how is it done?
A: Given: What does it mean to learn "semi-supervised"? What problem(s) does it address, and how does i...
Q: ontains how many kiloby
A: A megabyte contains how many kilobytes
Q: Consider a TCP connection betweek two hosts between A and B. The first data byte sent by A is number...
A: Given : First byte received = 1 Last byte received= 500
Q: Erd˝os and R´enyi (1960) studied a model of growth for graphs in which, at each step, two nodes are ...
A: Answer: I have given answered in the brief explanation
Q: hy do mobile apps usually require many pages? Describe the standard structure of ionic code used to ...
A: Lets see the solution.
Q: This task helps you understand how constructors work in inheritance Create a superclass, called Su...
A: The answer is
Q: grabbing is the activity of probing services running behind an open p ation.
A: Lets see the solution.
Q: C CODE PLEASE 3.28 Fixed LAB: Warm up: Automobile service cost (1) Prompt the user for an automobi...
A: Introduction: C CODE PLEASE 3.28 Fixed LAB: Warm-up: Automobile service cost (1) Prompt the us...
Q: Construct a Mealy Machine that emits a O for the first input character which can be either a or b. i...
A: Here we have to construct a Mealy Machine that emits a 0 for the first input character which can be ...
Q: You have been asked to help improve network performance on a store’s small office network. The netw...
A: The Tool which help to identify the percentage of traffic made up of broadcasts is protocol analyzer
Q: 50% 30% mplete the following table. Express all answers in scientific notation and round to two deci...
A: Instruction count of A = % of A instruction * total # of instruction = 0.2*107 = 2*106 Number of clo...
Q: The following two relations R and S have one attribute storing integers. Assume that a join is perfo...
A: SUMMARY: -Hence, we discussed all the points
Q: Distinguish between dialogue and user interface design.
A: Introduction: The sequence of interaction between a user and a system is reflected in a dialogue. An...
Q: What is the aim of an organization's information security? What advantages does data security provid...
A: The aim of an organization's information security is to protect the information and systems that sup...
Q: 2. Using conditional statements in Javascript sort the numbers -5, 6, 2 and display the sorted numbe...
A: Using conditional statements in Javascript sort the numbers -5, 6, 2 and display the sorted numbers ...
Q: Explain how we should change the insertion and deletion algorithms in a B+-tree to implement and mai...
A: A b+ tree i8s one of the trees which is an m array tree containing a variable but contains a large n...
Q: What is the asymptotic complexity of the following functions? void foo(int n){ int i; if(n < 1)...
A: void foo(int n){int i; // O(1)if(n < 1) return; ...
Q: You are configuring a connection between two backbone switches, and you want to make sure the conne...
A: You are configuring a connection between two backbone switches, and you want to make sure the connec...
Q: What protocol is used to assign dynamic IP addresses to computers on a local area network?
A: We are going to understand which protocol is used to assign dynamic IP addresses to computers on a l...
Q: a mac address, what do the first 24 bits represe
A: Answer :
Q: differentiate between texture map, environment map and bump map
A: Texture map:- A texture map is an image used (mapped) on a face or polygon. This can be a bitmap ima...
Q: What file types does Sqoop support when it comes to data import?
A: Swoop imports data using two different file types. There are two types of test files: delimited test...
Q: Using python Write a program to compute and print the month‑end balance. Input Last...
A: LastName = []PreviousBalance = []Payments = []Charges = [] print("LastName PreviousBalance Payment...
JAVA CODING
Problem: The third side of the triangle is 8 less than twice the sum of the two other sides and the first side is 5 more than the thrice the second side. If the perimeter is given, how long are its sides?
Step by step
Solved in 2 steps with 1 images
- Tiling: The precondition to the problem is that you are given threeintegers n, i, j, where i and j are in the range 1 to 2n. You have a 2n by 2n squareboard of squares. You have a sufficient number of tiles each with the shape . Your goalis to place nonoverlapping tiles on the board to cover each of the 2n × 2n tiles except forthe single square at location i, j. Give a recursive algorithm for this problem in whichyou place one tile yourself and then have four friends help you. What is your base case?Java - Encapsulation A rectangle can be formed given two points, the top left point and the bottom right point. Assuming that the top left corner of the console is point (0, 0), the bottom right corner of the console is point (MAX, MAX) and given two points (all “x” and “y” coordinates are positive), you should be able to draw the rectangle in the correct location, determine if it is a square or a rectangle, and compute for its area, perimeter and center point. To be able to do this, you should create a class Point (that has an x-coordinate and a y-coordinate). Also, create another class called Rectangle. The Rectangle should have 2 points, the top left and the bottom right. You should also implement the following methods for the Rectangle: display() - draws the rectangle on the console based on the samplearea() - computes and returns the area of a given rectangleperimeter() - computes and returns the perimeter of a given rectanglecenterPoint() - computes and returns the center point…Java Only Solution: John's barn has a fence consisting of N consecutive sections numbered from left to right from 1 to N. Each part is first painted in one of two colors: red or green, your information is given with string C. The color of the I-th part Ci will be equal to 'R' if the color of the part is red and 'G' if it is green. John decided to paint the whole fence green. To make the normal drawing process more fun he decided to do it using the following process. Every minute (until the whole fence is painted green) you will do the following steps: Select any part of the phone that is painted red. Let's show the index of this section as X. In each section with references X, X + 1, ..., min (N, X + K - 1), flip the color of the corresponding part from red to green and from green to red by re-painting. John wonders how quickly he can paint the phone. Please help her find the minimum number of minutes needed to repaint. Input: 1 73 RGGRGRG Output: 4
- code in java pls Summary: Given integer values for red, green, and blue, subtract the gray from each value. Computers represent color by combining the sub-colors red, green, and blue (rgb). Each sub-color's value can range from 0 to 255. Thus (255, 0, 0) is bright red, (130, 0, 130) is a medium purple, (0, 0, 0) is black, (255, 255, 255) is white, and (40, 40, 40) is a dark gray. (130, 50, 130) is a faded purple, due to the (50, 50, 50) gray part. (In other words, equal amounts of red, green, blue yield gray). Given values for red, green, and blue, remove the gray part. Ex: If the input is: 130 50 130 the output is: 80 0 80 Find the smallest value, and then subtract it from all three values, thus removing the gray.The following problem shows up in a number of Java texts, including Savitch's textbook: The Harris-Benedict equation estimates the number of calories your body needs to maintain your weight if you do no exercise. This is called your basal metabolic rate, or BMR. The calories needed for a woman to maintain her weight is: WBMR = 655 + (4.3 × weight in pounds) + (4.7 × height in inches) − (4.7× age in years) The calories needed for a man to maintain his weight is: MBMR = 66 + (6.3 × weight in pounds) + (12.9 × height in inches) − (6.8 × age in years) A typical chocolate bar will contain around 230 calories. Write a program that allows the user to input his or her weight in pounds, height in inches, and age in years. The program should then output the number of chocolate bars that should be consumed to maintain one’s weight for both a woman and a man of the input weight, height, and age. NOTE: This is an application of a selection statement! Input Data: Use a named constant for the…When you borrow money to buy a house, a car, or for some other purpose, you repay the loan by making periodic payments over a certain period of time. Of course, the lending company will charge interest on the loan. Every periodic payment consists of the interest on the loan and the payment toward the principal amount. To be specific, suppose that you borrow $1,000 at an interest rate of 7.2% per year and the payments are monthly. Suppose that your monthly payment is $25. Now, the interest is 7.2% per year and the payments are monthly, so the interest rate per month is 7.2/12 = 0.6%. The first months interest on $1,000 is 1000 0.006 = 6. Because the payment is $25 and the interest for the first month is $6, the payment toward the principal amount is 25 6 = 19. This means after making the first payment, the loan amount is 1,000 19 = 981. For the second payment, the interest is calculated on $981. So the interest for the second month is 981 0.006 = 5.886, that is, approximately $5.89. This implies that the payment toward the principal is 25 5.89 = 19.11 and the remaining balance after the second payment is 981 19.11 = 961.89. This process is repeated until the loan is paid. Write a program that accepts as input the loan amount, the interest rate per year, and the monthly payment. (Enter the interest rate as a percentage. For example, if the interest rate is 7.2% per year, then enter 7.2.) The program then outputs the number of months it would take to repay the loan. (Note that if the monthly payment is less than the first months interest, then after each payment, the loan amount will increase. In this case, the program must warn the borrower that the monthly payment is too low, and with this monthly payment, the loan amount could not be repaid.)
- Artificial intelligence (Question - 6) ======================= One variation on the game of nim is described in Luger. The game begins with a single pile of stones. The move by a player consists of dividing a pile into two piles that contain an unequal number of stones. For example, if one pile contains six stones, it could be subdivided into piles of five and one, or four and two, but not three and three. The first player who cannot make a move loses the game.(6.1) Draw the complete game tree for this version of Nim if the start state consists of six stones.(6.2) Perform a minimax evaluation for this game. Let 1 denote a win and 0 a loss.Determine whether a string is a palindromeA palindrome is a string of characters that reads the same from right to left as it does from left to right, regardless of punctuation and spaces.The specifications for this assignment are: •Write and test a non-recursive solution in Java that determines whether a string is a palindrome •Your program should consist of at least two methods: (1) the main method (2) the method which performs the task of determining whether the specified string is a palindrome. You should name this method isPalindrome. You should name the class that contains your “main” method and the isPalindrome method FindPalindrome. •You must use a Stack and a Queue in your solution: Write your own Stack and Queue based on the Vector in the Java API and use those in your solution. You should name those classes StackVector and QueueVector respectively. You already have access to the relevant exception classes and interfaces for the above ADTs. •All of your belong to a Java…Find the average number of words per sentence in a paragraph using java. "October arrived, spreading a damp chill over the grounds and into the castle." + "Madam Pomfrey, the nurse, was kept busy by a sudden spate of colds among the staff and students." + "Her Pepperup potion worked instantly, though it left the drinker smoking at the ears for several hours afterward." + "Ginny Weasley, who had been looking pale, was bullied into taking some by Percy." + "The steam pouring from under her vivid hair gave the impression that her whole head was on fire."
- Solution IN JAVA A quadratic equation a x² + b x + c = 0 has either 0, 1, or 2 distinct solutions for real values of x. Given a, b and c, you should return the number of solutions to the equation. Examples solutions (1, 0, -1) // x² - 1 = 0 has two = 2 solutions (1, 0, 0) → 1 // x² solutions (x solutions (1, 0, 1) // x² + 1 = 0 has no 0 has one solution (x = 0). = 0 ceal solutions. 1 and x -1).Need Python Solution Ramesh, Suresh, Mahesh, and Mukesh moved to a new town and searched for accommodations. Now this city is unlike any other city. This city is an apartment matrix and there are no roads. The only way to get around is through houses. If one of the friends passes the apartment once, the party will have to pay its full rent. From the apartment, you can go to the houses to the North, South, East, or West. Since Ramesh, Suresh, Mahesh, and Mukesh are best friends, they want to meet at least once a month. Also, all four are superstitious, so Ramesh goes West only, Suresh goes North only, Mahesh goes East only, and Mukesh goes South only. Any number of people can live in any apartment. The cost of all housing in the city is provided, some of which may be negligible. Negative costs mean that if a friend lives in or moves out of the apartment, the party will be paid an amount equal to the cost dispute. Now the goal of these four friends is to earn enough money to live in the…IN JAVA Alice and Bob are playing a board game with a deck of nine cards. For each digit between 1 to 9, there is one card with that digit on it. Alice and Bob each draw two cards after shuffling the cards, and see the digits on their own cards without revealing the digits to each other. Then Alice gives her two cards to Bob. Bob sees the digits on Alice’s cards and lays all the four cards on the table in increasing order by the digits. Cards are laid facing down. Bob tells Alice the positions of her two cards. The goal of Alice is to guess the digits on Bob’s two cards. Can Alice uniquely determine these two digits and guess them correctly? Input The input has two integers p,q (1≤p<q≤9) on the first line, giving the digits on Alice’s cards. The next line has a string containing two ‘A’s and two ‘B’s, giving the positions of Alice’s and Bob’s cards on the table. It is guaranteed that Bob correctly sorts the cards and gives the correct positions of Alice’s cards. Output If Alice can…