Compulsory Task 2 Follow these steps: Write a test class to test the following methods in the java.lang.String class: o length o charAt o substring o indexOf
Q: Write an abstract data type for a queue whose elements can be any primitive type. Use Java 5.0, C#…
A: The AbstractQueue class in Java is a part of the Java Collection Framework and implements the…
Q: Consider the undirected graph shown below. It has 9 vertices as shown. Assume that the vertices lie…
A: we need to find the edges in the minimum spanning tree by following prim's algorithm.
Q: What role does a foreign key play in maintaining data integrity in a database? Do you know why this…
A: The answer to the following question:-
Q: Calculate the mean for this Statement 1 % 2 % 3 % 4 % 5 % N M It gives us access to…
A: NOTE: The programming language is not mentioned. So, the program is written in Python language.…
Q: What advantages do automatic deployment and configuration of servers provide? Do you think there are…
A: Advantages of providing and configuring servers automatically
Q: Write a function `popularLetters(string)` that takes a string as an argument and returns an array of…
A: function popularLetters(string) { // Create an object to keep track of how many times each…
Q: Make a distinction between verification and validation. Provide specific examples.
A: The procedures of verification and validation verify the data that was supplied by the user.…
Q: The retrieval and storage of documents in Microsoft World: please explain.
A: Given: Retrieving and storing a document in MS Word.This is how. Steps to recover MS Word…
Q: There may be governance concerns when transitioning from on-premise to IaaS infrastructure, but how
A: The principles guiding a political system's capacity to settle disputes between participants and…
Q: DaaS refers to "database as a service" in this context. In other words, what is it, and how does it…
A: Database as a Service (DAAS): It is a cloud computing service that allows database access without…
Q: Algorithm to Restrictions on Image Points procedure generate( G : group; P : property; s : 1..k+l;…
A: Given: We have to write a Algorithm to Restrictions on Image Points . Initial segment of the…
Q: Create a list of the required and optional features for the student "lost and found" app.
A: Functional prerequisites Usernames can only contain letters and spaces. Any image format may be used…
Q: What advantages do automatic deployment and configuration of servers provide? Do you think there are…
A: Let's see the answer
Q: function that returns the number of zeros in a given simple list of numbers.
A: The solution is an given below :
Q: IoT adoption faces what challenges?
A: IoT stands for internet of things. IoT is network of physical devices embedded with softwares and…
Q: When it comes to cloud computing, what are some of the pros and cons of having users all over the…
A: Cloud computing enables enterprises to provide clients with storage, database, networking, and…
Q: What constitutes a typical Web application?
A: Introduction: The following is a list of the many parts that make up a conventional web application:…
Q: Explain what virtualization is and how it works in the context of cloud computing.
A: Cloud computing refers to the delivery of a variety of services over the Internet as opposed to…
Q: In the U.S. fuel efficiency of cars is specified in miles per gallon (mpg). In Europe it is often…
A:
Q: Can you explain the function of the data dictionary in the DBLC procedure?
A: The six phases of the Database Life Cycle (DBLC) are database initial study, database design,…
Q: 2.1 You have learned about the similarities and dissimilarities of the Queue and Stack ADTs.…
A: Stack and Queue both are linear data structures in which data are inserted and deleted. The push and…
Q: What kind of governance concerns should be taken into account when moving from in-house servers to…
A: Introduction: The charity administration maintains the infrastructure of the charity information. We…
Q: Think you can remember the difference between active and passive transformations from a few fast…
A: Write some brief remarks on active and passive transformations, please.
Q: Using HTML Create the inputs that collect information from the user: First_name: Last_name:…
A: The above questions is asked to create a html page using all the data that is given. Toos- HTML
Q: 1. Write a Program to implement DFS algorithm and print the DFS sequence for below graph start with…
A: def dfs(graph, start,visited = []): if start in visited: return…
Q: What role does MVC play in web application architecture? What are a few benefits of utilising an MVC…
A: MVC Stands for Model View Controller.
Q: Use the traversal method (pre order ) draw the bst (binary search tree ) of the number . Don't…
A: Given, The nodes of the binary search tree in pre-order traversal: 99, 34, 90, 43, 3, 11, 91, 64,…
Q: Memory types like RAM and Register exist, but they are not the same.
A: Introduction: Memory is a piece of hardware used to store computer data, instructions, and programs.…
Q: Is there anything special that must be done in order to make a web app?
A: Introduction: Web-based apps are any programme that can be accessed through the Internet as opposed…
Q: Software designed specifically to function inside a web environment.
A: Introduction: Software is a set of instructions that tells a computer how to do specific tasks. It…
Q: question 18 60 50 -The In the 100 -In S The data 85 45 Is there any issue with the routing (Yes,…
A: Answer: We need to write the what is issue with the network so we will see in the more details with…
Q: Many individuals use programming languages to create software for usage on the internet. Give…
A: List three programming languages, and explain how they work with web-based applications: Solution:…
Q: OSI Model application, presentation, and session layers’ task can be combinedly performed by which…
A: Transport layer: Transport is the 4th layer.The primary task of the transport layer is to deliver…
Q: What are the benefits of utilizing a document store as opposed to a relational database?
A: Explanation: According to the question, a document-oriented database or the record preserved in a…
Q: Why not use four lines to describe each type of software design?
A: Software design Software design is a part of the software development advancement process that…
Q: Where should you look for governance problems when moving your IT systems to the cloud?
A: If you're moving from physical servers to an infrastructure as a service model, what governance…
Q: Users are able to interact with computers through the use of input devices. Reply:
A: Input Device: Any hardware that facilitates communication between a user and a computer is an input…
Q: Explain the functionality of the boots using only bullet points.
A: How the computer boots: When a computer is switched on, the booting startup grouping starts the…
Q: Which of the following is true about the exec1 () function call? exec1 returns the exit status of a…
A: 1) execl function replaces the calling process image with a new process image 2) This has the…
Q: What parts must be in place before a web app can be built?
A: Web-based applications: this one is a remote server application. Web browsers are required to access…
Q: What kind of governance concerns should be taken into account when moving from in-house servers to…
A: Introduction:The cloud is helpful here and is a secure alternative for running a nonprofit overall.…
Q: The reason for this is the rapid development of computing technology. Is it possible to demonstrate…
A: Please find the answer below :
Q: What role does a foreign key play in ensuring the correctness of data in a database? Please provide…
A: Introduction: A "foreign key" is a database key that connects two tables.The FOREIGN KEY constraint…
Q: evelop an algorithm for an optimization problem called the shortestpath problem. The algorithm uses…
A: In general, the shortest-path issue seeks the shortest path in a graph G between a source node s and…
Q: Write algorithm to Choosing an Appropriate Base. procedure generate( G : group; P : property; s :…
A: generate(G: group; P: property; s: 1..k+l; I 1..k+l; [71, 72..... 7i-1]: starting base image…
Q: Make use of the term "snapshot isolation" to describe the building of an airline's database. Could a…
A: Snapshot isolation: In lock-based isolation levels, the transaction that is reading data blocks the…
Q: Task 1 Removing words containing substrings Topics: List processing, string split, and join This…
A: Answer: Algorithms: Step1: We have set the true in the while and if they false the terminate the…
Q: Q4- Write a C++ Program to Find the Sum Above and Below of Main Diagonal Matrix 1 2 3 N 4 5 6 7 8…
A: #include <iostream>using namespace std;int main(){ int n; //reading size of matrix…
Q: What exactly does it mean when we talk about the structure of a computer?
A: Introduction: A computer structure is made up of a number of linked components that process, store,…
Q: What are some of the governance challenges to look out for when transitioning from on-premises…
A: Answer: The infrastructure of the charity information is maintained by the charity administration…
task 13.2
Step by step
Solved in 4 steps with 2 images
- Eclipise Exercise 1: Write a Java application that simulates a test. The test contains at least five questions about first three lectures of this course. Each question should be a multiple-choice question with 4 options. Design a Test class. Use programmer-defined methods to implement your solution. For example: create a method to simulate the questions – simulateQuestion create a method to check the answer – checkAnswer create a method to display a random message for the user – generateMessage create a method to interact with the user - inputAnswer Display the questions using methods of JOptionPane class. Use a loop to show all the questions. For each question: If the user finds the right answer, display a random congratulatory message (“Excellent!”,”Good!”,”Keep up the good work!”, or “Nice work!”). If the user responds incorrectly, display an appropriate message and the correct answer (“No. Please try again”, “Wrong. Try once more”, “Don't give up!”, “No. Keep…Exercise 1: Write a Java application that simulates a test. The test contains at least five questions about first three lectures of this course. Each question should be a multiple-choice question with 4 options. Design a Test class. Use programmer-defined methods to implement your solution. For example: create a method to simulate the questions – simulateQuestion create a method to check the answer – checkAnswer create a method to display a random message for the user – generateMessage create a method to interact with the user - inputAnswer Display the questions using methods of JOptionPane class. Use a loop to show all the questions. For each question: If the user finds the right answer, display a random congratulatory message (“Excellent!”,”Good!”,”Keep up the good work!”, or “Nice work!”). If the user responds incorrectly, display an appropriate message and the correct answer (“No. Please try again”, “Wrong. Try once more”, “Don't give up!”, “No. Keep trying..”). Use….is a block of code which only runs when it is called A classs integer method loop
- PART B: JUnit Testing Write a Java program according to the following: Create a Multiple.java class. Create the following two static methods (with return type float): SquareRoot() and CubeRoot(). SquareRoot) method should take two arguments and return the float value at the end. CubeRoot() method should take three arguments and return the float value at the end. Create a test class with the name MultipleTest.java. In this class, import the following libraries at the top of this file import org.junit. Before; import org.junit. Test; import static org.junit.Assert.assertEquals; Create an object of Calculator.java class by writing the following code in CalculatorTest.java class: private Multiple multiple; @Before public void setup() {this.multiple new Multiple():) 4. Generate the JUnit test classes for both the methods one by one. Declare and initialize the required variables to pass those to the methods. Store the expected result in one of the variables and then compare it with the…All methods in this class are public. -int ID -name -status (int ID, String name, String status) setiD (int ID) setName (String name) setStatus (String status) getName) string getStatuso toString0 Pick one: True/FalseObject Oriented Programming: 213COMP, 214COMP (Feb-2022) Assignment- I [10 marks] Academic honesty: O Only pdf file accepted & student ID, will be your upload file. O Student who submit copied work will obtain a mark of zero. O Late work or attach file by email message not allowed. Q1: Write the signature for a method that has one parameter of type String, and does not return a value. Q2: Write the signature for a method that has two parameters, both of type Student, and returns an int value. Q3: Write the constructor's headers of the followings? new Student (202101156, “Ahmed"); new Address(51, "jazan university","CS&IT" ); new Grade(true, 505235600, 4.5); Q4: a) Write a class Student that define the following information: name, stid , age. b) Explain a mutators (setters) and accessors(getters) methods for each attributes(fields). c) Add three constructors: • with empty constructor. one parameter constructor (name of student) two parameters constructor (name and stid) d) Create two…
- Program62.javaWrite a program that prompts for a full name (first and last) and assigns it to one string. The program then passes the full name to a void method as its sole parameter. The void method should print the first name, on one line, as many times as indicated by the length of the last name. Sample Output (image below) Program64.javaWrite a program that demonstrates method overloading by defining and calling methods that return the area of a triangle, a rectangle, or a square.Program62.javaWrite a program that prompts for a full name (first and last) and assigns it to one string. The program then passes the full name to a void method as its sole parameter. The void method should print the first name, on one line, as many times as indicated by the length of the last name. Sample Output (image below)Part I: PrintVertical.java Write a program that will prompt the user to enter a sentence (string data), read that sentence into your program as a single string, and then finally process the string by calling the method specified below (vertical). You must process the sentence by calling the method rather than processing the string directly in your main method. Write a void method, vertical, which receives a string as a parameter and prints each letter of the string to the screen on separate lines. Example Execution (user input in green) Please enter a sentence: Hey there! Your sentence printed vertically is: H e t h e r
- A mountain climbing club maintains a record of the climbs that its members have made. Information about a climb includes the name of the mountain peak and the amount of time it took to reach the top. The information is contained in the ClimbInfo class as declared below. The ClimbingClub class maintains a list of the climbs made by members of the club. The declaration of the ClimbingClub class is shown below. You will write implementations of the addClimb method. import java.util.List; import java.util.ArrayList; class ClimbInfo { private String name; private int time; /** Creates a ClimbInfo object with name peakName and time climbTime. * * @param peakName the name of the mountain peak * @param climbTime the number of minutes taken to complete the climb */ public ClimbInfo(String peakName, int climbTime) { name = peakName; time = climbTime; } /** @return the name of the mountain peak */ public String getName() { return name; } /** @return the number of minutes…public class Password {String password;String SPECIAL_SYMBOLS = "!@#$%^&*"; public boolean specialSymbol(char symbol){//TODO: Return true if symbol is a special symbol. otherwise return false.// HINT: use indexOF method to check if symbol is in the string SPECIAL_SYMBOLS.return false;} Please read the todo statement of the java code, thank you.Java Programming: Below is the lexer, shank and token files along with the shank.txt file. The shank file is the main method file. The lexer must break up the input text stream into lexemes and return a token object for each one in the shank.txt file. Make sure to fix the errors in the lexer.java file and show the complete code for lexer.java.There must be no error in the code at all. Run the whole code and show the output which the shank.txt must be printed out in the terminal. Attached is the rubric. Lexer.java package mypack; import java.util.HashMap;import java.util.List;import mypack.Token.TokenType; public class Lexer { private static final int INTEGER_STATE = 1;private static final int DECIMAL_STATE = 2;private static final int IDENTIFIER_STATE = 3;private static final int SYMBOL_STATE = 4;private static final int ERROR_STATE = 5;private static final int STRING_STATE = 6;private static final int CHAR_STATE = 7;private static final int COMMENT_STATE = 8; private static final…