An archery target consists of a central circle of yellow surrounded by con-centric rings of red, blue, black and white. Each ring has the same width, which is the same as the radius of the yellow circle. Write a programthat draws such a target. Hint: Objects drawn later will appear on top ofobjects drawn earlier.
Q: 6 -2.6 -2.7 Bias Assume that the activation function used for all neurons is "logistic function" and…
A: The answer is
Q: stakeholder register for a Greek restaurant
A: Stakeholder Register Stakeholder Type Level of interaction Importance Vendor Primary Recurring…
Q: Trace the output of the following codefragments? a) for(vari=10;i=0;i--){document.write(i)}…
A: a) This will not print anything as i starts with 10 and should be less than 10 in each iteration…
Q: I am writing a method to remove the first element in a doubly linked list. However I am supposed to…
A: While handling exceptions, In the 'catch' block we need to provide exactly what our 'try' block can…
Q: Explain FIVE (5) approaches in developing secure systems in digital business.
A: 1) Protect with passwords:- This may seem like a no-brainer, but many cyber attacks succeed…
Q: 1. Scalability is one of the quality attributes of a software system. Explain five tactics of…
A: “Since you have asked multiple questions, we will solve the first question for you. If you want any…
Q: What does RAM stand for
A: We need to discuss RAM.
Q: One of the purposes of TIME_WAIT is to handle the case of a data packet from a first incarnation of…
A:
Q: Write a class called Candidate to store details of a candidate in the election. The class must…
A: #include <stdio.h> #include <stdio.h> #define CANDIDATE_COUNT#define CANDIDATE1…
Q: -4.8 -5.2 N 5.9 5.2 -2.6 -2.7 Bias Assume that the activation function used for all neurons is…
A: The answer is
Q: IP hosts that are not designated routers are required to drop packets misaddressed to them, even if…
A:
Q: 5) a) Consider the (7,4) hamming code with data word 1111 and evaluate the 7-bit composite code word…
A: Hamming (7,4) code is a linear error-correcting code that encodes 4-bit data word to 7-bit codeword…
Q: Create a webpage to sort three numbers using JavaScript conditional statement. For example, x=0,…
A: HTML code <!DOCTYPE html><html><head><meta charset=utf-8…
Q: Write a program that determines the distance to a lightning strike based onthe time elapsed between…
A: We need to find the distance to the lightning strike based on their time elapsed between the flash…
Q: Ans
A: Introduction:The framework governing how components interact with one another is called computer…
Q: Simplify the following boolean equation using the laws of boolean algebra and draw the simplified…
A: We are given a Boolean function and we are going to simplify the expression first and then we will…
Q: The first two bytes of a 2M x 16 main memory have the following hex values: 1. Byte 0 is FE 2. Byte…
A: ANSWER:-
Q: Differentiate between lossy and lossless data compression technique
A: Data compression techique defined as the data size reduced but without loss of information there are…
Q: name, street, city) ii. account (account number, customer id, branch id, balance) iii.…
A: Structured Query Language abbreviated as SQL is a query language. It is widely used language in…
Q: C++ Problem 1 please
A: Given We know about the C++ programing.
Q: Trace the following code by showing the values of the 3 variables in the table on the right, for…
A: Code -----------------> x y z var x = 5; -----------------> 5 N/A N/A var y = 10;…
Q: Which of the following is true regarding polymorphism ? O Polymorphism allows us to have a method in…
A: Polymorphism means performing single action in different ways. There are two types of polymorphism:…
Q: (a) Suppose the matrix A is m × n and suppose that b is in the range of A. Give a formula for all…
A:
Q: A subject used by an adversary to process a message they cannot is being used as a(n) ___________.…
A: The question has been answered in step2
Q: The TCP header does not have a boot ID field. Why isn't there a problem with one end of a TCP…
A:
Q: Suppose two hosts A and B are connected via a router R. The A-R link has infinite bandwidth; the R-B…
A:
Q: elop a sequence diagram showing the interactions involved lent registers for a course in a…
A: Introduction: Below Develop a sequence diagram showing the interactions involved when a student…
Q: Suppose the round-trip propagation delay for Ethernet is 46.4 µs. This yields a minimum packet size…
A:
Q: Apex Assignment: Create a apex class called addition and then create a method to add the 2 integer…
A: Introduction: Apex is one of the programming languages which is utilized to make the salesforce…
Q: A micro instruction format has micro operation field which is divided into 2 subfields F1 and F2,…
A: The answer as follows
Q: (i) Retrieve the name and revenue of the driver with the highest revenue. (What's the SQL code)?…
A: i. Query: SELECT d.NAME, SUM(r.PRICE) AS REVENUEFROM DRIVER d, RIDE rWHERE d.ID=r.DRIVER GROUP BY…
Q: What is the central processing unit in the power circuit in the mobile?
A: Answer:
Q: b) Design a dynamic array of 25 elements. Fill them using rand function of two digits. Then take a…
A: CODE: #include <stdio.h>#include <stdlib.h> int main(){int* ptr;int i; // Dynamically…
Q: SELECT P.NAME, P. EMAIL FROM PASSENGER P WHERE P.ID NOT IN SELECT PASSENGER_ID FROM RIDE_PASSENGER;
A: SQL is the structured query languages. This is used to store, manipulate and to retrieve the datas…
Q: Develop a sequence diagram showing the interactions involved when a student registers for a course…
A: UML Sequence diagram: In a software development process, several classes and objects are designed to…
Q: a) Declare variables a, itIsAVariable, p79356 and number3. b) Display a dialog asking the user to…
A: As per the requirement provided the code. Note: As per our guidelines we are suppose to answer only…
Q: In the statement below, "Fighter" is a/an... public class Foo extends Bar implements Fighter { ... }…
A: In the statement below "Fighter" is an Choose the correct statements Lets see the answer in step 2.
Q: An online warehouse provides features for their customers to browse and search products and to place…
A: Solution:: Package diagram, a kind of (related to what holds something together and makes it…
Q: After establishing a connection with the local DNS server PC1 now knows the IP and MAC addresses of…
A: ARP working: When a new host or computer establishes a connection, an IP address is associated with…
Q: Consider the following code snippet: int sum = 0; int mylist[] = {8, 12, 3, 4, 12, 9, 8}; for (int…
A: The given code snippet is: int sum = 0;int mylist[] = {8 , 12, 3, 4, 12, 9, 8};for (int row = 0; row…
Q: Suppose that you are given the following information for the articles publications: • Each article…
A: The question has been answered in step2
Q: What are the two main types of firewall? (select two) Private Firewall Public Firewall Corporate…
A: A host-based firewall is firewall software that is installed on a single computer or other networked…
Q: Write the language denoted by the following regular expressions: (i) (?∗?∗)∗ (ii) ?(?|?)∗? (iii)…
A: The question has been answered in step2
Q: describes the input system used by a IX-generated lexical analyzer (though not by LEX itself). This…
A: The lexical analyzer is used in the first phase of compiler for lexical analysis. Lexical analyzer…
Q: "Rabenstein code was used to send a message with 4 information bits, you receive 100110001, if you
A: The answer is
Q: IP hosts that are not designated routers are required to drop packets misaddressed to them, even if…
A: Introduction: Routing: Routing is the process of selecting a path for traffic in a network or…
Q: Describe a protocol combining the sliding window algorithm with selective ACKS. Your protocol should…
A:
Q: Under which of these conditions overloading a method would work (ie: the class will contain two…
A: SUMMARY Answer : ALL THE OPTIONS ARE CORRECTStyles are used in Java to describe a gesture object.…
Q: wasn't able to receive the same output for whatever reason. Also, could you remove all of the input…
A: SavingsAccount.h code: #ifndef SAVINGSACCOUNT_H#define SAVINGSACCOUNT_H using namespace std; class…
Q: Indices can speed up query processing, but it's usually a terrible idea to index every attribute,…
A: The answer is
An archery target consists of a central circle of yellow surrounded by con-
centric rings of red, blue, black and white. Each ring has the same width,
which is the same as the radius of the yellow circle. Write a program
that draws such a target. Hint: Objects drawn later will appear on top of
objects drawn earlier.
Step by step
Solved in 2 steps with 1 images
- Write a program that draws a fixed polygonwith points at (30, 10), (60, 30), (50, 70), (35, 35), and (10, 50). Wheneverthe mouse is moved, display a message indicating whether the mousepoint is inside the polygon at the mouse point or outside of it, as shown inFigure. To detect whether a point is inside a polygon, use the containsmethod defined in the Node class.Exercise 2: The intersection method computes the intersection of two rectangles- that is, the rectangle that would be formed by two overlapping rectangles if they were drawn, as shown at right. You call this method as follows: Rectangle r3 = r1.intersection (r2); Write a program IntersectionPrinter that constructs two rectangle objects, prints them as described in Exercise 1, and then prints the rectangle Intersection object that describes the intersection. Then the program should print the result of the intersection method when the rectangles do not overlap. Add a comment to your program that explains how you can tell whether the resulting rectangle is empty. The random class implements a random number generator, which produces sequences of numbers that appear to be random. To generate random integers, you construct an object of the Random class, and then apply the nextInt (50) gives you a random number between 0 and 49. Use the Random class to construct the two rectangle objects.canMove(int x, int y, int destX, int destY, Side s): This method returns true if the player of color s can move the piece at coordinates (x,y) can move to coordinates (destX, destY) on the board in its current state. This means that here you do need to consider this piece’s interaction with other pieces on the board. Conditions for this method to return false are given in the code. public boolean canMove(int x, int y, int destX, int destY, Side s){ /* TODO write a method that checks if a piece at coordinates x,y can move to coordinates destX,destY Conditions for false: - Origin or destination coordinates are outside the board - Piece at origin is null - If source and destination coordinates are the same - Piece at origin is not of the same side as s - You can check this using piece.getSide() - Piece cannot move to the destination by piece movement rules - You should check this using Piece.canMove(destX,…
- Kingdom of Trolls is celebrating their Kingdom Day and one of the activities that is taking place is a game where a player rolls a magic ball down the hill on a path with spikes. As the ball rolls down, it strikes a spike and bursts open to release a number of smaller balls (in our simulated game, the number of smaller balls is a randomly generated integer between 2 and 6, inclusive). As the smaller balls further roll down, when one strikes a spike, that ball and all its sibling balls burst and each generates another set of smaller balls (using the same random number already generated for the first roll). The balls keep rolling downhill and striking spikes and bursting into smaller balls until a golden ball is released by one of the bursts. At this time, the game is over and the player is told how many balls were generated during the last burst (including the golden ball). The game is played by two players at a time and the player who had the lowest number of balls generated on the…The Penny Pitch game is popular in amusement parks. Pennies are tossed onto aboard that has certain areas marked with different prizes. For example: The prizes available on this board are puzzle, game, ball, poster, and doll. At the end ofthe game, if all of the squares that say BALL are covered by a penny, the player gets theball. This is also true for the other prizes. The board is made up of 25 squares (5 x 5).Each prize appears on three randomly chosen squares so that 15 squares contain prizes.Create a penny_pitch application that displays a Penny Pitch board (use [ and ] toindicate squares) with prizes randomly placed and then simulates ten pennies being randomly pitched onto the board. After the pennies have been pitched, the applicationshould display a message indicating which prizes have been won, it any.Java program help Simulate a slot machine. The customer will add a fixed amount of money to the machine and play the slots. There should be 4 images for the game: "Apple", "Orange", "Banana", and "Cherry". If three of the images match, the customer wins $2 and is added to their balance. If all four match, the customer wins $10 and that is added to their balance. If less then four match there is no prize money, and the customer is charged $1 for the try. The customer can quit after each try, and the program will print out the customer's cash balance. Coding Details: Use an array of strings to store the 4 strings listed above. Use a do-while loop for the program. The program starts once the user enters how much money they have. The decision to stop occurs at the bottom of the loop. The do-while loop keeps going until the user quits, or there is no money left. The pseudocode for the program is shown below: Determine the fruits to display (step 3 below) and print them Determine if there…
- Write a program that enables the robot, shown below in its starting position, to complete the maze, ending in the bottom right corner. The robot may not pass through any black spaces.Design an application that does the following: A Solid can be a FlatSurfaceSolid or a CurvedSurfaceSolid. Every solid will have a volume. The method volume will be polymorphic. A solid has faces, vertices and edges. A flat-surface solid also has a variable called side which represents the length of the side. A curved-surface solid also has a radius. A Cube is a FlatSurfaceSolid. A cube has 6 faces, 8 vertices and 12 edges. It will have a side. A Sphere is a CurvedSurfaceSolid. It has 1 face, 0 vertices and 0 edges. It will have a radius. Create an ArrayList of solids (driver file named YourLastNameCISC231Q1.java). The arraylist will have 4 elements – 2 cubes (one with side length 3 and another will side length 4) and 2 spheres (one with radius 3 and another with radius 4). Create a driver class to instantiate an array of solids and display the details of each solid along with the volume of each solid.Write the following function that draws a line from point (x1, y1) to (x2, y2) with color (default to black) and line size (default to 1).def drawLine(x1, y1, x2, y2, color = "black", size = 1):
- Email me the answers to the following questions. If you are not familiar with Peg Solitaire, then look it up online. Peg Solitaire is a game consisting of a playing board with 33 holes together with 32 pegs. In the picture above, the hole in the center is empty and the remaining holes contain pegs. The goal is to remove all the pieces except one, which should be in the center. A piece can be removed by jumping an adjacent piece over it into an empty hole. Jumps are permitted horizontally or vertically, but not diagonally. Your assignment consists of one required part, plus one extra credit part: 1. Explain (in words) why Breadth First Search and Iterative Deepening are not good methods for this problem.Using the code in the image provided: Implement a method called summation which adds two integers and returns their sum. INPUT: The first line of input contains an integer a. The Second Line of input containes and integer b. OUTPUT: Print the result which is the sum of a and b.You are to write a program that allows the user to draw a simple house using 5 mouse clicks. - The first two clicks will be the opposite corners of the rectangular frame of the house. - The third click will indicate the center of the top edge of the rectangular door. The door should have a total width that is 1/5 of the width of the house frame. The sides of the door should extend from the corners of the top down to the bottom of the frame. - The 4th click will indicate the center of a square window. The window is as wide as the door. (A change from the original book program.) - The last click will indicate the peak of the roof. The edges of the roof will extend from the point at the peak to the corners of the top edge of the house frame. Make the lines of the roof edge green. (Another change from the original book program.)