You have been asked to test a method called 'catWhiteSpace' in a 'Paragraph' object that, within the paragraph, replaces sequences of blank characters with a single blank character. Identify testing partitions for this example and derive a set of tests for the 'catWhiteSpace' method.
Q: Which of the following is not a Python type-conversion function?a) float b) round c) int d) abs
A: Introduction A specific range of values is utilised to store data for each type of data in Python.…
Q: Write a program that gets a list of integers from input, and outputs the integers in ascending order…
A: Here is the c++ implementation of above problem. I have used bubble to get the results.
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: 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: Write a C++ program that reads strings until "QUIT" input, which then displays all strings in the…
A: According to the information given:- We have to follow the instruction in order to get desired…
Q: Design a web page with a text box (username) where the user can enter a name and another text box…
A: PROVIDE JS SOURCE CODE Design a web page with a text box (username) where the user can enter a name…
Q: Explain why TIME. WAIT is a somewhat more serious problem if the server initiates the close than if…
A: Explain why TIME.WAIT is a somewhat more serious problem if the server initiates the close than if…
Q: Which of the following are incorrect statements to create a Lock? O a Lock lock = new…
A: Introduction: The Lock is a Java Interface that is used for represents the concurrent lock which…
Q: Butwhat happens if we write an expression that mixes an int with a float?
A: Data Type: A data type, often known as type, is a characteristic of data that informs the compiler…
Q: You are a software engineering manager and your team proposes that model-driven engineering should…
A: Model driven engineering is a software development methodology that focuses on model creation,…
Q: GSM time slot is 577 s (microseconds) in duration and includes far more than a snapshot of e…
A: The answer is
Q: data and on. Nowadays, have targeted organisations that deal with confidential consumer information…
A: SUMMARY Data breach definition: a data breach exposes confidential, sensitive or proprietary…
Q: Name at least three tasks performed by the WinMain (startup) procedure.
A: WinMain Procedure WinMain is the name of the primary entry point for every Windows application.…
Q: . What is the maximum bandwidth at which an IP host can send 576-byte packets without having the…
A:
Q: Write any five PL/SQL programs.
A: PL/SQL Programs Developers may combine the strength of SQL and procedural instructions using the…
Q: When closing a TCP connection, why is the two-segment-lifetime timeout not necessary on the…
A: During this transition, TCP waits to receive an ACK. When it finally does, it knows there is no way…
Q: Explain why TIME. WAIT is a somewhat more serious problem if the server initiates the close than if…
A: SUMMARY TIME_WAIT and its design counteraccusations for protocols and scalable customer- garçon…
Q: Write a program that prompts the user to input an integer between 0 and 35. If the number is less…
A: The input is taken in num variable from the user. int diff = num - 10; //asciiOfA to be…
Q: void setLimits (int x, int y); int getNumber();
A: Answer is given below.
Q: What would be the effect of the following code: public class Body Part { } public class Leg extends…
A: The Given question are multiple choice selected based question.
Q: The value of 4! isa) 9 b) 24 c) 41 d) 120
A: We need to find the The value of 4!
Q: Find out the generic format for TCP header options from Request for Comments 793.
A: TCP Header TCP header holds several information fields with the host address of source and…
Q: Where True Value = Approx. Value Approx.Value (2) Approx.Value (h) Approx. Value (2) - Approx.Value…
A: Program: #include <iostream> using namespace std; int main() { int half; cout << "Enter…
Q: Explain why TIME. WAIT is a somewhat more serious problem if the server initiates the close than if…
A: TIME.WAIT: After getting the end ACK from the distant TCP, the nearby TCP holds up to sure that the…
Q: d to construct both classes and realize the
A: Given :- In the above given question, the statement is mention in the above given question Need…
Q: Assume d is a dictionary with string keys, list values, and at least one key:value pair. Which of…
A: Dictionary in Python: It is an unordered collection of items in the form of key-value pair. Syntax…
Q: What will happen if traceroute is used to find the path to an unassigned address? Does it matter if…
A:
Q: AIM: Write a program to do Binary Search using a given Search Key in a Sorted Linear Array 'A' which…
A: CODE: #include<iostream> using namespace std; int BinarySearch(int A[],int N,int Key){…
Q: Q2) Given the message= “password must be secure”. Propose one technique that uses transposition to…
A: Introduction: Network security is a bunch of innovations that safeguards the convenience and…
Q: Create a menu system program in c++ that asking an input based on the choices below. If the input is…
A: The quadratic equation formula is given below: ax2+bx+c=0 The discriminant of the equation is…
Q: What command would set the coordinates of win to go from (0,0) in thelower-left corner to (10, 10)…
A: setCoords for graphics. The Zelle graphics' system of coordinates The origin is in the upper left…
Q: Let's suppose there is an organization w 120 host addresses. The administrator ha Briefly explain in…
A: The answer is in step 2:
Q: Please fix this code:
A: where is your code please uploade the question in a write way you have not shareed the code
Q: Using SQL data definition language, write the SQL statements to create each of the following…
A: Let's create SQL statement for each of the given relations: 1. CREATE TABLE Student ( StudentID int,…
Q: You are a software engineering manager and your team proposes that model-driven engineering should…
A: The factors that you have to consider when making this decision includes: 1. The expertise of the…
Q: Show that the time efficiency of solving the coin-row problem by exhaustive search is at least…
A: The question has been answered in step2
Q: What command would be used to draw the graphics object shape into thegraphics window win?a) win .…
A: Lets see the solution.
Q: . Consider the sliding window algorithm with SWS = RWS = 3, with no out-of-order arrivals and with…
A:
Q: nto two subnets, and divide the 72.16.0.0 (class B IP address) into
A: The answer is
Q: Consult Request for Comments 793 to find out how TCP is supposed to respond if a FIN or an RST…
A: Introduction TCP addresses Transmission Control Protocol a correspondence standard that engages…
Q: Why is encapsulation called Data Hiding?
A: Introduction Data encapsulation, otherwise called data hiding, is the system by which the execution…
Q: Explain why TIME. WAIT is a somewhat more serious problem if the server initiates the close than if…
A: As the server often participates in much more connections than clients, the server's record-keeping…
Q: 4) Suppose we have to transmit a list of five 4 bit numbers that we need to send to a destination.…
A: Note: if you need answer using CRC( include corresponding generator polynomial.)
Q: Below is the class Greeter and its method, greet: public class Greeter { } public String greet() { }…
A: The program is written in Java. Check the program screenshot for the correct indentation. Please…
Q: Write a single pseudocode statement that indicates each of the following:a) Display the message…
A: a. Display the message "Enter two numbers". The corresponding pseudocode statement is: print "Enter…
Q: 7 Question Which of the following is a best security practice to protect your credentials when…
A: Below is the answer to above question...
Q: Recall the topic USING ARRAYS and answer the questions below 1. What is the purpose of the ‘new’…
A: Given Question: What is the function of the C# 'new' operator?
Q: th these threads donot run on preemptive platform in the same way.Thus,prioritize the threads by…
A: SUMMARY Java Thread setPriority() system The setPriority() system of thread class is used to change…
Q: Write a program that adds all numbers from 2 to 10,000 to a list. Then remove the multiples of 2…
A: I have provided PYTHON CODE along with CODE SCREENSHOT and OUTPUT…
Q: ain why TIME. WAIT is a somewhat r bus problem if the server initiates the if the client does.…
A: Introduction: Below describe the why TIME. WAIT is a somewhat more serious problem if the server…
Step by step
Solved in 2 steps
- To demonstrate working with ArrayLists, we will be working with four source files: a Dessert class, two classes that extend Dessert called IceCream and Cake, and a TestDessert class. The TestDessert class contains a main() method that declares an ArrayList to hold Dessert objects. This ArrayList is referenced by the variable named "list". Examine TestDessert's main() method and notice the four comments. You are to implement code that accomplishes the tasks described in each step. For step 1, you are to populate the ArrayList with 10 IceCream and Cake objects. These objects should be inserted into the ArrayList at random. This means each run of the program should produce an ArrayList with different proportions of IceCream and Cake objects. After this operation, the ArrayList should contain 10 total objects (IceCream and Cake objects). Display the ArrayList after the operation. For step 2, if the first and last dessert in the ArrayList are different (one is IceCream and the other is…Please assist with non graded problem. Create a Calculator class that implements sum, subtraction, multiplication, and division operations, and throws an appropriate exception whenever the user attempts to perform a division by zero. Then develop a graphical interface (with JavaFx) for your calculator using TextField, Button, and Label objects, or any other graphical objects you like. Graphically display division by zero errors.Design and implement an insertSorted() method for the MyArrayList class. The method should receive a single object and insert it in its correct position. You can assume that the calling array is already in a sorted order. The calling array is therefore updated. Follow the three step method for designing the method. Develop the java code for the method. Create a test program to test the method thoroughly using the Integer wrapper class.
- Implement the FindText() function, which has two strings as parameters. The first parameter is the text to be found in the user provided sample text, and the second parameter is the user provided sample text. The function returns the number of instances a word or phrase is found in the string. In the PrintMenu() function, prompt the user for a word or phrase to be found and then call FindText() in the PrintMenu() function. Before the prompt, call cin.ignore() to allow the user to input a new string.Ex: Enter a word or phrase to be found: more "more" instances: 5Reuse your Car class . In a main, build an object of that class, and print out the object using System.out.println(). Notice that this simply reports the memory address of the object in question, and we’d like to do something more useful. To replace (or override) the toString (or equals) function. Now, build a toString function that prints out the make, model, and odometer reading for a vehicle object. public class Car { //instance variables private int odometer; private String make; private String model; //overloading //constructors public Car(int odometer,String make, String model) { this.odometer = odometer; this.make = make; this.model = model; } public Car(String make, String model) { this.make = make; this.model = model; } public Car(String make) { this.make = make; } /* *getter & setter methods */ public int getOdometer() { return odometer; } public void…Answer the given question with a proper explanation and step-by-step solution. Write a method that takes in an array of Point2D objects, and then analyzes the dataset to find points that are close together. Be sure to review the Point2D API. In your method, if the distance between any pair of points is less than 10, display the distance and the (x,y)s of each point. For example, "The distance between (3,5) and (8,9) is 6.40312." The complete API for the Point2D ADT may be viewed at http://www.ime.usp.br/~pf/sedgewick-wayne/algs4/documentation/Point2D.htmlLinks to an external site.. Do not compare a point to itself! Try to write your program directly from the API - do not review the ADT's source code. (Don't worry too much about your answer compiling - focus on using an API from its documentation.) Your answer should include only the method you wrote, do not write a complete program.
- In this lab, you will create a backend class called SortableSet. A set, in computer science, is an unordered collection of unique objects. In our SortableSet, all of the objects in the set will also be immutable at the set level. This means that even if the data class used to create objects is not immutable, once they are in the set they are. We do this by making a deep copy of any objects being added to the set or returned from the set. The objects stored in the SortableSet must implement an interface called Sortable that provides a numeric sorting key and a deep copy method. SortableSet also takes advantage of two custom exception classes: DuplicateException and InvalidKeyException. Finally, the "sortable" part of SortableSet is implemented by a getSortedList method that makes a deep copy of every object in the set, saves them to an array, and then sorts them based on each object's sorting key. The sort algorithm used is a recursive radix sort modified to work with objects.Answer the given question with a proper explanation and step-by-step solution. USING JAVA: ---Sorting the Invoices via dates--- Another error that will still be showing is that there is not Comparable/compareTo() method setup on the Invoice class file. That is something you need to fix and code. Implement the use of the Comparable interface and add the compareTo() method to the Invoice class. The compareTo() method will take a little work here. We are going to compare via the date of the invoice. The dates of the Invoice class are by default saved in a MM-DD-YYYY format. So they have a dash '-' between each part of the date. So you will need to split the date of the current invoice AND split the date of the object sent to the method. We have three things to compare against here. First we need to check the year. If the years are the same then you should go another step forward and compare the months. If the months are the same then you will lastly have to compare the day. Use whatever…In the Utils class provided to you in this exercise, please fill in the details for a method called swapArray(). You can either upload a file or use the Edit tab to submit your work. The VPL tester will pass an arbitrary array of type integer to your method, along with the value of the locations in the array of two values that need to be swapped (exchanged). For instance, in the illustration below, the method swapArray is told to swap the values in positions 0 and 2 of an array made up of {10, 20, 30, 40, 50}. The three input parameters to the method are the array, as well as the two array indices (i and j) that control which elements to swap. Your task is to write the contents of the method that can execute this swap.
- Are there obvious improvements that could be made here with respect the software design for Squares and Circles? What programming constructs were you familiar with, and which did you need to look up? Assume we used a separate array for Squares and for Circles rather than one unifying Object array. How would this complicate the task of adding a new Shape (say, a Triangle) to our ObjectList class?. Download the program from the instructor’s GitHub account (Ch3HW) then update it tocreate a class Student that includes four properties: an id (type Integer), a name (type String), a Major (type String) and a Grade (type Double). Use class Student to create objects (using buttonAdd) that will be read from the TextFields then save it intoan ArrayList. Perform the following queries on the ArrayList of Student objects and show the results on the listViewStudents (Hint: add buttons as needed):a) Use lambdas and streams to sort the Student objects by name, then show the results.b) Use lambdas and streams to map each Student to its name and grade, sort the results by grade (descending), then display the results.c) Use lambdas and streams to map each Student to its name and grade, to select the Students who have grade values in the range 80 to 90. Sort the results by grade value(descending), then show the results.d) Use lambdas and streams to calculate the total average of all Students…In JAVA, use a HashMap to count and store the frequency counts for all the words from a large text document. Using file util, please. Then, display the contents of this HashMap with words and frequency count. Next, please create a set view of the Map and store the contents in an array. Sort this array based on key value and display it. Finally, sort the array in decreasing order by frequency and display it as well. Please label your explanation in the code Thank you