Please implement the sorted list class with array implementation, and use binary search to find items in the list. Include the ItemType class, and test driver cpp file in your project. You need to read input from a file, and then write output to another file.
Q: Using Figure 2.4 as a model, illustrate the operation of merge sort on the array A = (3, 41, 52, 26,…
A: Merge sort is a popular sorting algorithm that sorts an array or a list of elements by recursively…
Q: It's possible that the amount of free space on a hard disc is affected by how often live backups are…
A: RAID : A redundant Array of Inexpensive Disks, or RAID, is a data storage virtualization method that…
Q: Class field corruption must be prevented.
A: Class: A class is a blueprint or structure for generating objects in object-oriented programming…
Q: Explain the firewall's function in network security. Define the term and provide business examples.
A: Introduction: The term "firewall" refers to a type of network security system that monitors and…
Q: Problem 1. An MDP state transition graph is given below. The agent wants to go from S1 or S2 to the…
A: MDP stands for Markov Decision Process, which is a discrete-time stochastic control process used in…
Q: Although random access memory (RAM) is also considered a volatile storage medium, the question…
A: computer with a larger cache is faster because it takes less time to retrieve information.
Q: Why is fighting cybercrime important?
A: Fighting cybercrime is important for several reasons: Protecting personal and sensitive…
Q: How can a hash table improve efficiency over a linear list? Problem?
A: We have to explain how can a hash table improve efficiency over a linear list and what is the…
Q: Show how modern cloud computing technologies have helped society.
A: The use of cloud computing technologies has revolutionized the way we interact with data, providing…
Q: What is "partitioning" in operating systems? Each proposal has pros and cons
A: Answer is
Q: Provide a description of "firewall" in terms of network security, describe how it is applied to…
A: Answer is
Q: Sum of Numbers Write a program that asks the user for a positive integer value. The program should…
A: Here is your solution -
Q: What is the significance of the link between paging and linear memory?
A: Intro Paging: In order to execute many applications on a computer, paging is enabled. Solution: When…
Q: So, how can you protect yourself from a downgrade attack?
A: Attack downgrade definition An attempt to force a connection, protocol, or cryptographic algorithm…
Q: Which company firewall arrangement is most popular? Why? Explain.
A: Introduction: The purpose of an internet firewall is to protect a network by screening incoming and…
Q: Can class field manipulation be prevented?
A: What is class field manipulation? A class instance's fields or attributes can be changed at runtime…
Q: Which firewall function is more important? How should packet-filtering software be used?
A: Put out the firewall system's objective. NOTE: We'll start with the first one as you posed many…
Q: What are the main differences between the Internet and the World Wide Web (WWW)?
A: Introduction: The terms "Internet" and "World Wide Web" (WWW) are often used interchangeably, but…
Q: Firewall management: what works best? Explain.
A: Given: What do you think are the best methods for managing a firewall? Explain.
Q: Q8. You are now more sure about your choice. You still wish to broaden your horizon, but you also…
A: A database view is a subset of a database and is based on a query that runs on one or more database…
Q: What different kinds of cyberattacks are there, and what does it mean to have enough protection…
A: Introduction: Cybersecurity is the practise of preventing attacks, damage, or unauthorised access to…
Q: The cache memory in modern computers is quite important. Please explain the purpose of cache memory…
A: Introduction: CPU stands for Central Processing Unit, which is the main component of a computer that…
Q: In a school setting, how can a student database management system help?
A: Introduction A student database management system (DBMS) is a piece of software that schools use to…
Q: Explain each OSI model layer, its seven sublayers, and its protocols.
A: GIVEN: Explain the OSI layer, the seven layers, and the protocols that run in each layer. OSI: An…
Q: Your business's mail server notifies you that your password has changed and has to be confirmed. You…
A: If the mail server has been infiltrated and an attacker has gotten access to the account to access…
Q: Nonvolatile solid-state memory technologies are gaining in popularity; briefly describe some of…
A: Definition: We'll describe the most recent advances in nonvolatile solid-state memory. The first…
Q: Determine the greatest theoretical arrival rate that can be reached by a link that has a packet size…
A: greatest theoretical arrival rate that can be reached by a link that has a packet size of l and a…
Q: What differentiates the Internet from the WWW?
A: The basic distinction between the World Wide Web (WWW) and the Internet is so frequently confused…
Q: Explain the LCD monitor's flat-curved screen.
A: Introduction: LCD stands for Liquid Crystal Display. An LCD monitor is a type of display screen that…
Q: Examples differentiate scalar and superscalar CPUs. Complexity affects superscalar processing time.…
A: A vector processor uses a single command to work on many bits of data whereas a scalar processor…
Q: Do many ways of thinking about things exist? Which ones are in a straight line, and which ones…
A: If there are several processing processes, that is the question's desired answer. Also, describe…
Q: While attempting to decipher a short message, assaults on a cypher provide a greater challenge since…
A: A cypher is a computation that may be used for both encoding and decoding information. Ciphers are…
Q: In order to make use of the string manipulation techniques, which header file must be included in a…
A: File used as a header when carrying out string manipulation operations In order to make use of…
Q: An Excel workbook may achieve the same goals as a template.
A: Excel from Microsoft: It is a spreadsheet featuring graphing tools, pivot tables, and calculations…
Q: What is Integrated Development Environment?
A: IDE or Integrated Developer Environment is used by Software Developers throughout the development…
Q: Briefly summarise content. How do they affect cybersecurity research?
A: Introduction: Computer security, cyber security, or IT security refers to the safeguarding of…
Q: compare Windows Defender with another free anti-malware application.
A: Microsoft Defender is a component of Microsoft Windows 10 that provides comprehensive built-in,…
Q: What kind of an influence can hierarchy have on the size of an organization and the administrative…
A: We have to explain, What kind of an influence can hierarchy have on the size of an organization and…
Q: When an assault damages a system, it is called a
A: A "cybersecurity breach" or "cyber attack" is a term that is frequently used to describe an assault…
Q: What aspects of real-time and non-real-time operating systems are comparable and what aspects…
A: An real-time operating systems will ensure that a task will execute at a specific time for a…
Q: Consider the systems Louie and Dewey in Section 9.2.4. Suppose the sends and receives for the…
A: In computer science, Louie and Dewey are two systems used as examples in the study of secure…
Q: Which firewall function is more important? How should packet-filtering software be used?
A: A firewall is a software between a network or computer and the Internet. Directly connecting a PC to…
Q: Which computer graphics components are crucial?
A: Computer graphics involves computer-generated pictures and art. Digital photography, cinema, video…
Q: Could you explain a cache hierarchy's fundamentals?
A: Given: What would you say a real cache hierarchy looks like? Answer: The hierarchy of a cache is: L1…
Q: If there are any distinctions between the Harvard and von Neumann computer architectures, what…
A: Harvard Architecture It is a computer architecture that stores instructions and data in separate…
Q: Discuss the pros and cons of frequent software updates from the end user's point of view. Think…
A: The pros of frequent software updates include bug fixes, new features, and improved security. the…
Q: Customizable multiprocessor systems are an advantage. Benefits make system design harder.
A: Your answer is given below.
Q: Which methods are put into practise for determining an individual's level of vulnerability?
A: Methods used to determine an individual's level of vulnerability may include vulnerability and risk…
Q: In a school setting, how can a student database management system help?
A: Yes, a Students database Management system is required for a University because:
Q: Why do workers need spreadsheet skills now? Give us two instances of how your organisation uses…
A: Introduction Microsoft Excel is one of the most widely used spreadsheet applications, and it is an…
Step by step
Solved in 4 steps
- Define a collection “ArrayList” to store the students' names. Use a loop to take 5 students’ names from the user and store them in the collection. Add two student names to the collection and remove the last name in the list. Insert a student name in third place in the collection. Sort the names alphabetically. Ask the user to enter a student name and search for it in the collection and prints the result as “Found” or “Not Found”. Print the whole collection using the enhanced for loop. (java)3. Create an ArrayList of strings to store the names of celebrities or athletes. Add five names to the list. Process the list with a for loop and the get() method to display the names, one name per line. Pass the list to avoid method. Inside the method, Insert another name at index 2 and remove the name at index 4. Use a foreach loop to display the arraylist again, all names on one line separated by asterisks. After the method call in main, create an iterator for the arraylist and use it to display the list one more time. See Sample Output. SAMPLE OUTPUT Here is the list Lionel Messi Drake Adele Dwayne Johnson Beyonce Here is the new list * Lionel Messi * Drake * Taylor Swift * Adele * Beyonce Using an iterator, here is the list Lionel Messi Drake Taylor Swift Adele BeyonceWrite a class that maintains the top 10 scores for a game application, implementthe add and remove functions. use a singlylinked list instead of an array.
- In this assignment, you will compare the performance of ArrayList and LinkedList. More specifically, your program should measure the time to “get” and “insert” an element in an ArrayList and a LinkedList.You program should 1. Initializei. create an ArrayList of Integers and populate it with 100,000 random numbersii. create a LinkedList of Integers and populate it with 100,000 random numbers2. Measure and print the total time it takes to i. get 100,000 numbers at random positions from the ArrayList 3. Measure and print the total time it takes to i. get 100,000 numbers at random positions from the LinkedList 4. Measure and print the total time it takes to i. insert 100,000 numbers in the beginning of the ArrayList 5. Measure and print the total time it takes to i. insert 100,000 numbers in the beginning of the LinkedList 6. You must print the time in milliseconds (1 millisecond is 1/1000000 second).A sample run will be like this:Time for get in ArrayList(ms): 1Time for get in…Create an ArrayList of strings to store the names of celebrities or athletes. Add five names to the list. Process the list with a for loop and the get() method to display the names, one name per line. Pass the list to a void method. Inside the method, Insert another name at index 2 and remove the name at index 4. Use a foreach loop to display the arraylist again, all names on one line separated by asterisks. After the method call in main, create an iterator for the arraylist and use it to display the list one more time. See Sample Output. SAMPLE OUTPUT Here is the list Lionel Messi Drake Adele Dwayne Johnson Beyonce Here is the new list * Lionel Messi * Drake * Taylor Swift * Adele * Beyonce Using an iterator, here is the list Lionel Messi Drake Taylor Swift Adele Beyonce Textbook: Introduction to Java Programming and Data Structures, Comprehensive Version, Edition: 11th Author: Y. Daniel Liang Publisher: Pearson ISBN: 9780134670942Create an ArrayList of strings to store the names of celebrities or athletes. Add five names to the list. Process the list with a for loop and the get() method to display the names, one name per line. Pass the list to a void method. Inside the method, Insert another name at index 2 and remove the name at index 4. Use a foreach loop to display the arraylist again, all names on one line separated by asterisks. After the method call in main, create an iterator for the arraylist and use it to display the list one more time.
- Write a dynamic arraylist for food menu where user can add new menu into list using JAVA that also can be save into text file and view from text fileWrite a Java application CountryList. In the main method, do the following:1. Create an array list of Strings called countries.2. Add "Canada", "India", "Mexico", "Peru" in that order.3. Use the enhanced for loop to print all countries in the array list, one per line.4. Add "Spain" at index 15. Replace the element at index 2 with "Vietnam". You must use the set method.6. Replace the next to the last element with "Brazil". You must use the set method. You willlose one point if you use 3 in the set method. Do this in a manner that would replace thenext to the last element, no matter the size of the array list.7. Remove the object "Canada" Do not remove at an index. Your code should work if"Canada" was at a different location. There is a version of remove method that willremove a specific object.8. Get and print the first element followed by "***"9. Call method toString() on countries to print all elements on one line.10. Use the enhanced for loop to print all countries in the array list,…A readinglist is a doubly linked list in which each element of the list is a book. So, you must make sure that Books are linked with the previous prev and next element. A readinglist is unsorted by default or sorted (according to title) in different context. Please pay attention to the task description below. Refer to the relevance classes for more detail information. Implement the add_book_sorted method of the ReadingList class. Assume the readinglist is sorted by title, the add_book_sorted method takes an argument new_book (a book object), it adds the new_book to the readinglist such that the readinglist remain sorted by title. For example, if the readinglist contain the following 3 books: Title: Artificial Intelligence Applications Author: Cassie Ng Published Year: 2000 Title: Python 3 Author: Jack Chan Published Year: 2016 Title: Zoo Author: Cassie Chun Published Year: 2000 If we add another book (titled "Chinese History"; author "Qin Yuan"; and published year 1989) to the…
- This project assumes that you have completed Project 1. Place several Student objects into a list and shuffle it. Then run the sort method with this list and display all of the students' information. Print to the console the unsorted list first of all students followed by the sorted list of all students Note: The sorted list should output in the following format: Sorted list of students: Name: Namel Scores: 0 0 0 0 0 0 Name: Name2 Scores: 0 0 0 0 0 0 0 0 0 0 Name: Name3 Scores: 0 0 0 0 0 0 0 0 0 0 Name: Name4 Scores: 0 0 0 0 0 0 0 0 0 0 Name: Name5 Scores: 0 0 0 Hint: Use the print function with a Student object as an argument to print the Student object in the format specified above.This project assumes that you have completed Project 1. Place several Student objects into a list and shuffle it. Then run the sort method with this list and display all of the students’ information. Print to the console the unsorted list first of all students followed by the sorted list of all students Note: The sorted list should output in the following format: Sorted list of students: Name: Name1 Scores: 0 0 0 0 0 0 0 0 0 0 Name: Name2 Scores: 0 0 0 0 0 0 0 0 0 0 Name: Name3 Scores: 0 0 0 0 0 0 0 0 0 0 Name: Name4 Scores: 0 0 0 0 0 0 0 0 0 0 Name: Name5 Scores: 0 0 0 0 0 0 0 0 0 0 code: # import random to use random shuffle function. import random # import random to use random shuffle function. import random class Student(object): """Represents a student.""" def __init__(self, name, number): """All scores are initially 0.""" self.name = name self.scores = [] for count in range(number): self.scores.append(0) def…You are going to implement a program that creates an unsorted list by using a linked list implemented by yourself. NOT allowed to use LinkedList class or any other classes that offers list functions. It is REQUIRED to use an ItemType class and a NodeType struct to solve this homework. The “data.txt” file has three lines of data 100, 110, 120, 130, 140, 150, 160 100, 130, 160 1@0, 2@3, 3@END You need to 1. create an empty unsorted list 2. add the numbers from the first line to list using putItem() function. Then print all the current keys to command line in one line using printAll(). 3. delete the numbers given by the second line in the list by using deleteItem() function. Then print all the current keys to command line in one line using printAll().. 4. putItem () the numbers in the third line of the data file to the corresponding location in the list. For example, 1@0 means adding number 1 at position 0 of the list. Then print all the current keys to command line in one…