As a COMMENT IN CODE, please DO Test-Cases on how you would test your solution assumptions and hence your code explore a specific way to perform a Breadth First Search (BFS) of a given Graph [Figure 1].
Q: Write a project to implement the following functions: String replaceAll(String substring, String…
A: String replaceAll() method public String replaceAll ( String regex, String replacement) parameters:…
Q: Depending on X which is the last digit of your student number, implement the following function F by…
A:
Q: computer science- What are the dangers of resume screening programmes? How does resume screening as…
A: Introduction: The following are the risks linked with resume screening programmes:
Q: Q2) Consider the regular expression: (ablac)* a. Use Thompson's construction to construct a NFA. b.…
A: The Answer is in given below steps
Q: Group root = new Group (); Scene scene = new Scene (root, 400, 400, Color.WH horizontalLines (10,…
A: I have the complete code below:
Q: Suppose a movie theater has 36 seats, laid out in a rectangular six rows by six seats. Let the seats…
A: The Answer is
Q: Q1) on the simulator simulate the NFA that recognizes the language Af. The language 1 (001*)* with…
A: We have to draw a NFA with only 3 states for given language : 1* (001+)* I have provided the NFA on…
Q: What does the concept of "shared responsibility" imply in terms of cloud security
A: Introduction: A shared responsibility paradigm is akin to a cloud security approach in that it is a…
Q: Briefly explain why OFDM adopted in the LTE radio interface can reduce the multi-path propagation…
A: Here You have mentioned only one question so Answer will be according to asked question. The answer…
Q: Consider the adjacency matrix below. Upload a plcture (it can be hand drawn) of the adjacency list…
A:
Q: What is parametric polymorphism in a subprogram, and can you give an example with an explanation of…
A: Introduction: Parametric polymorphism is a programming language method that allows for the general…
Q: What is the default folder in which
A: What is the default folder in which the ISO file will be kept when it is created by default? Answer:…
Q: What exactly is Windows 95 Security?
A: Introduction: Windows 95 appears to be a DOS-inspired operating system.
Q: Declaring a class virtual transforms it into an abstract class. T/F
A: Introduction: When it comes to object-oriented programming, a virtual class is a form of class where…
Q: Create a program that approximates the three roots of the equation f(x) = 5.3221 x3 - 4.2842 x2 -…
A: A Python program that approximates the three roots of the equation f(x) = 5.3221 x3 - 4.2842 x2 -…
Q: Explain what the term "salt" means in the context of cryptography. You should go through how it is…
A: Introduction: People who have the same password utilise the salt. For the attack, the salt password…
Q: explain why each principle is vital to security and how it facilitates the creation of security…
A: NOTE :- Below i explain the answer in my own words by which you understand it well. Data…
Q: ubnetting (Subnetting) Fill in the blanks. (If possible show your solution) Number of needed…
A: According to the Question below the Solution: 1. Address class: The given network address belong…
Q: What is Standard Error, and what does it mean?
A: The standard error(SE) of a measurement is the exact standard deviation of a statistical sample…
Q: Why is it required to provide a base case for every recursive function?
A: Introduction Why is it required to provide a base case for every recursive function?
Q: Which of the following is a method of the Object class? O a. super) O b. encrypt( O c. equals) O d.…
A: Which of the following is a method of the Object class? a.) super() b.) encrypt c.) equals() d.)…
Q: Computer experts advise increasing the computer's Random Access Memory (RAM) if the processing speed…
A: The Answer is in step2
Q: QUESTION 3 create a 2 tape Turing machine that has on tape 1 the alphabet of a,b,null, on tape 2 the…
A: Please find the Answer below in second step:-
Q: Use Rice's Theorem to prove that it is undecidable whether, for any positive integer constant k, a…
A: Let language L accept TM M I.e. <M> belongs to L if <M> accepts exactly k strings. So…
Q: Draw a class diagram showing classes, attributes, operations, and relationships. If you believe that…
A: There are 2 classes. Classes are: employees, projects. The relationship is: WORK.
Q: Describe the elements of a backup strategy. What are the differences between backup plans for mobile…
A: Introduction: Describe the elements of a backup strategy. What are the differences between backup…
Q: 1. Why data fields should be private?
A: Let's know what is private and then you will be in a better position to understand why data fields…
Q: There is Hash Table implemented with an array of 10 linked lists (shown below). Following 15 numbers…
A:
Q: We'll say that a String is ab-balanced if for all the 'a' chars in the string, there exists a 'b'…
A: import java.util.*;public class Main{ public static void main(String[] args) { Scanner sc=new…
Q: codes sen starts (*) will the foblowing How many to the console ? while i<-5 : i += 1 if i 7.2 =30:…
A: Python provides break and continue statements to handle such situations and to have good control on…
Q: What exactly is Open Database Connectivity (ODbc)?
A: Introduction: Open Database Connectivity (ODBC) is a database access interface that is defined by…
Q: Explain how information from an access log can be utilised to determine the true identity of an…
A: Introduction: In the control log, the impersonator noticed the following:
Q: Need Template (or pattern) function of "Add to Cart" ; "Go to Cart" and "Cart".
A: <form action="<?php echo $block->getUrl('checkout/cart/add') ?>" method="post">…
Q: Explain how the terminology for the various sorts of exceptions differs from one system to the next.
A: Introduction: There are exceptions derived from the Sytem, which is System. SystemException.
Q: Why are businesses migrating to the cloud?
A: Introduction: The cloud is the most cost-effective way to automate the error-prone, guide duties…
Q: Modify task4.c to sort the array using any sorting algorithm. Your program should work like this: 1…
A: We need to write a C program to sort an Integer Array in Ascending order. We can use any Sorting…
Q: What difficulties does a simultaneous multithreading architecture require an operating system to…
A: Operating system : Issues that arise while employing a multithreading architecture in an operating…
Q: When you invoke a method on an object instance, the version of the method that will be executed will…
A: Introduction: Given question comes under object oriented programming concepts, we make several…
Q: Write a program that first gets a list of integers from input. The input begins with an integer…
A: def ints_less_than_or_equal_to_threshold(user_values, upper_threshold): new_array = [] for…
Q: A0-o A A2 A3-1
A: I have answered below:
Q: What does the word "Cell" relate to in terms of computing architecture?
A: Computer Architecture Cell: In terms of computer architecture, CELL is a microprocessor chip with…
Q: Computer science What is the menu's content? Explain how task-related menus are organised in…
A: Introduction: Menu Menus are useful for providing clues to the concept. It is nicely built around…
Q: How to proceed the data in each excel entry box into separate txt files and upload them to the SAS…
A: NOTE :- Below i explain the answer in my own words by which you understand it well. More often…
Q: What methods can be used to impsove information poivacy
A: The ways to keep your information private: Algorithms for cryptography: Homomorphic encryption is a…
Q: We'll say that a String is ab-balanced if for all the 'a' chars in the string, there exists a 'b'…
A: Required: We'll say that a String is ab-balanced if, for all the 'a chars in the string, there…
Q: Suppose that you have formatted your disk with a block size of 1024 bytes and assume that we have…
A: The Answer start from step-2.
Q: What are your responsibilities as a Systems Analyst?
A: Introduction: The purpose of an information technology system analyst is to analyse and provide…
Q: Write a main function that performs the following: • Prompts user to enter 2 integer values a and b.…
A: The above program is coded in C programming language below:
Q: ternet and Web can be used for the Vintage Rally Club as a business tool including a tool for…
A: Below the the Internet and Web can be used for the Vintage Rally Club as a business tool including…
Q: How about a few points that should be included in every decent cyber security plan
A: - We need to talk about cyber security plan.
Java
Very important: As a COMMENT IN CODE, please DO Test-Cases on how you would test your solution assumptions and hence your code
explore a specific way to perform a Breadth First Search (BFS) of a given Graph [Figure 1].
Step by step
Solved in 5 steps with 4 images
- Implement class “LinkedList” which has two private data members head: A pointer to the Node class length: length of the linked listImplement the following private method:1. Node* GetNode(int index) const;A private function which is only accessible to the class methods. . For example, index 0 corresponds to the head and index length-1 corresponds to end node of the linked list. The function returns NULL if the index is out of bound.Implement the following public methods:2. LinkedList();Constructor that sets head to NULL and length equal to zero.3. bool InsertAt(int data, int index);Insert a new node at the index. Return true if successful, otherwise,return false. The new node should be at the position “index” in the linked list after inserting it. You might have to use GetNode private function. these 3 partsImplement a Single linked list to store a set of Integer numbers (no duplicate) • Instance variable• Constructor• Accessor and Update methods 2.) Define SLinkedList Classa. Instance Variables: # Node head # Node tail # int sizeb. Constructorc. Methods # int getSize() //Return the number of nodes of the list. # boolean isEmpty() //Return true if the list is empty, and false otherwise. # int getFirst() //Return the value of the first node of the list. # int getLast()/ /Return the value of the Last node of the list. # Node getHead()/ /Return the head # setHead(Node h)//Set the head # Node getTail()/ /Return the tail # setTail(Node t)//Set the tail # addFirst(E e) //add a new element to the front of the list # addLast(E e) // add new element to the end of the list # E removeFirst()//Return the value of the first node of the list # display()/ /print out values of all the nodes of the list # Node search(E key)//check if a given…Implement a Single linked list to store a set of Integer numbers (no duplicate) • Instance variable• Constructor• Accessor and Update methods 1. Define a Node Class.a. Instance Variables # E element- (generics framework) # Node Next (pointer) - refer to the next node (Self-referential)b. Constructorc. Methods # E getElement() //Return the value of this node. # setElement(E e) // Set value to this node. # Node getNext() //Return the pointer of this node. # setNext(Node n) //Set pointer to this node. # displayNode() //Display information of this node.
- Implement a Doubly linked list to store a set of Integer numbers (no duplicate) • Instance variable• Constructor• Accessor and Update methods2. Define DLinkedList Classa. Instance Variables: # Node header # Node trailer # int sizeb. Constructorc. Methods # int getSize() //Return the number of nodes of the list. # int getSize() //Return the number of elements of the list. # boolean isEmpty() //Return true if the list is empty, and false otherwise. # E getFirst() //Return the value of the first node of the list. # E getLast()/ /Return the value of the Last node of the list. # addFirst(E e) //Add a new node to the front of the list. # addLast(E e) //Add a new node to the end of the list. # Node remove(Node n) //remove a node which has the reference n from the list # Node removeFirst() //Remove the first node of the list, and return the removed node or null if failed. # Node removeLast() //Remove the last node of the list, and return the…Implement a Doubly linked list to store a set of Integer numbers (no duplicate) • Instance variable• Constructor• Accessor and Update methods1. Define a Node Class.a. Instance Variables # E element - (generics framework) # Node next (pointer) - refer to the next node (Self-referential) # Node prev (pointer) - refer to the previous node (Self-referential)b. Constructorc. Methods # E getElement() //Return the value of this node. # setElement(E e) // Set value to this node. # Node getNext() //Return the next pointer of this node. # setNext(Node n) //Set the next pointer to this node. # Node getPrev() //Return the pointer of this node. # setPrev(Node n) //Set the previous pointer to this node. # displayNode() //Display the value of this node.package circularlinkedlist;import java.util.Iterator; public class CircularLinkedList<E> implements Iterable<E> { // Your variablesNode<E> head;Node<E> tail;int size; // BE SURE TO KEEP TRACK OF THE SIZE // implement this constructorpublic CircularLinkedList() {} // I highly recommend using this helper method// Return Node<E> found at the specified index// be sure to handle out of bounds casesprivate Node<E> getNode(int index ) { return null;} // attach a node to the end of the listpublic boolean add(E item) {this.add(size,item);return false; } // Cases to handle// out of bounds// adding to empty list// adding to front// adding to "end"// adding anywhere else// REMEMBER TO INCREMENT THE SIZEpublic void add(int index, E item){ } // remove must handle the following cases// out of bounds// removing the only thing in the list// removing the first thing in the list (need to adjust the last thing in the list to point to the beginning)// removing the last…
- Implement a LinkedList class that stores integers using dynamic memory and a proper main program to test it. The following member functions need to be properly implemented and tested: 1. Default constructor. 2. Parmetrized Constructor. 3. Sum. 4. Average. 5. InsertAtHead. 6. InsertAtTail. 7. Delete. 8. Pop. 9. Circular. 10. Display. Sample answer is also provided.Computer Science Java Programming ******* Write a Java application that will, given an appropriate data structure, will be able to track the following module and its dependencies as well as implement an appropriate search algorithm to create the correct graph for any given module. The graph will show all the corresponding dependent modules in their correct order of dependency. Must use Stack, either Double ArrayList or Linked List, and simple search to implement this. Module A: Dependencies: B D E K L Module B: Dependencies: F G M Module C: Dependencies: F Module D: Dependencies: G Module E: Dependencies: B A Module F: Dependencies: B Module G: Dependencies: NONE Module K: Dependencies: M Module L: Dependencies: Q Module M: Dependencies: A Module Q: Dependencies: NONE Ensure that dependencies are only visited only once. To test: Input A Your Output: Module A. Dependencies: B F G M D E K M L QA) Write a generic Java queue class (a plain queue, not a priority queue). Then, call it GenericQueue, because the JDK already has an interface called Queue. This class must be able to create a queue of objects of any reference type. Consider the GenericStack class shown below for some hints. Like the Stack class below, the GenericQueue should use an underlying ArrayList<E>. Write these methods and any others you find useful: enqueue() adds an E to the queue peek() returns a reference to the object that has been in the queue the longest, without removing it from the queue dequeue() returns the E that has been in the queue the longest, and removes it from the queue contains(T t) returns true if the queue contains at least one object that is equal to t *in the sense that calling .equals() on the object with t the parameter returns true.* Otherwise contains returns false. size() and isEmpty() are obvious.
- Implement class “LinkedList” which has two private data members head: A pointer to the Node class length: length of the linked list // Node* GetNode(int index) const;A private function which is only accessible to the class methods. This function takes an array-like index and returns the address of the node at that index. For example, index 0 corresponds to the head and index length-1 corresponds to end node of the linked list. The function returns NULL if the index is out of bound.// Implement the following public method: 1. bool RemoveHead();// Use RemoveAt FunctionRemove first node. Return true if successful, otherwise, false.2. bool RemoveEnd();// Use RemoveAt FunctionRemove last node. Return true if successful, otherwise, false.3 . void DisplayList() const;Display data of the whole linked list this in c++.Complete the method to perform breadth first traversal (search) here is the method: private static void breadthFirst() { //Todo System.out.println("test"); }here is the complete source code: Graph.java---------------------------------package finlab;import java.util.*;public class Graph { List<Edge>[] list; public Graph(int n){ list = new LinkedList[n]; for(int i=0; i<list.length;i++){ list[i] = new LinkedList<>(); } } void addEdge(int u, int v, int w){ list[u].add(0,new Edge(v,w)); } boolean isConnected(int u, int v){ for(Edge e: list[u]) { if (e.v == v) return true; } return false; } @Override public String toString(){ String result= ""; for(int i=0; i<list.length; i++){ result+= i+": "+list[i]+"\n"; } return result; }}Edge.java--------------------------------------------------------package…Create a class Queue and a Main class. This queue will be implemented using the LinkedList class that has been provided. This queue will hold values of a generic type (<T>). Your Queue should have the following public methods: public void enqueue(T data) public T dequeue() public T peek() public int size() public boolean isEmpty() public class LinkedList<T> { private Node<T> head; private Node<T> tail; private int size; @Override public boolean isEmpty() { return size == 0; } @Override public void append(T data) { Node<T> node = new Node<>(data); if (tail == null) { head = tail = node; } else { tail.next = node; node.prev = tail; tail = node; } size++; } @Override public void prepend(T data) { Node<T> node = new Node<>(data); if (head == null) { head = tail = node; } else {…