Write a class with a main() method. The main() method should declare and initialize four different ArrayLists, each containing at least four int values. The class should also contain a method named fiveEight. Given an ArrayList of ints, the fiveEight should return the int 30 if every element of the given ArrayList is either. a 5 or a 8; otherwise, it should return -9. There should be four calls to the allfiveEight method in the main() method.
Q: How can you discern between the numerous authentication alternatives and their merits and downsides…
A: This issue requires us to comprehend the various authentication techniques available for security…
Q: How would you describe a challenge-and-response authentication system such that we may better…
A: Challenge and response authentication is a set of protocols which are used to protect the services…
Q: What actions should be performed if there is a breach in a company's security?
A: In this question we have to discuss what all actions should be performed if there is a breach in…
Q: What are the most important differences between starting a data modelling project from scratch and…
A: Data Modelling Endeavours: Through the entities, connections, and data that are necessary for the…
Q: Explain how the capacity analysis reacts when a high number of processes are operating concurrently.
A: Image with Transcription Provide an explanation of how the capacity analysis responds when a large…
Q: What function do access restrictions play in the larger scheme of things in the twenty-first…
A: Hello student This is the detailed and specific theory which will be in next step Please do like
Q: As you can see in the next sentences, data modelling is of the highest importance.
A: Data Modelling: Data modelling is the technique of utilising words and symbols to describe the data…
Q: Explaining a challenge–response authentication system in your own terms is possible. What benefits…
A: System of authentication: Password-based authentication is often used in client-server systems.…
Q: "Why are authorisation lists so susceptible to unauthorised modification that they must be encrypted…
A: The answer is given in the below step
Q: Write a program using genetic algorithm for roulette wheel selection. in python
A: Question: Python code for Roulette wheel selection using genetic algorithm.
Q: Why is it of the utmost importance to guarantee that there are no data input mistakes while…
A: Data entry reevaluating has turned into an important part in smoothing out deals and showcasing data…
Q: Identify the relational keys for each table. List each relational key in a separate line. Identify…
A: Hello student
Q: What does the phrase "file handling" refer to, and why are its services necessary in the first…
A: "File Handling": File handling is the process of saving data in a C programmer in the form of…
Q: How precisely might mobile UI toolkits aid designers and developers trying to enhance the user…
A: Introduction: Adobe Photoshop is among the top 10 mobile app UI design tools. Microsoft Windows and…
Q: What do you believe occurs when you press a key on the keyboard while a software is writing a file…
A: A hardware interrupt is triggered whenever a user presses or releases a key on the keyboard, which…
Q: I am unsure of what you mean when you discuss the purposes of authentication. Determine what each…
A: The question has been answered in step2
Q: What is the conclusion on the File Integrity Monitoring Program?
A: FIM supports the security and maintenance of websites, servers, databases, and online applications.…
Q: Why do people see the Internet as the apex of information and communication technology? Is it…
A: Introduction: Communication technology is the use of technology to transport messages (information)…
Q: What is the issue statement, and what is the programme that checks file integrity used for…
A: statement: Today's world places a lot of importance on the data found in files. If this information…
Q: What role does contemporary technology play in the process of successful communication, and how is…
A: Introduction: The ability to communicate is the single most important factor in human life. A…
Q: In the case of a data security breach, what are the organization's procedures governing the sharing…
A: Answer: A data breach is a cyber attack in which sensitive, confidential or otherwise protected data…
Q: As you can see in the next sentences, data modelling is of the highest importance.
A: Data modeling is a method used to characterize and coordinate your business processes. It permits…
Q: Consider a situation that necessitates the handling of login credentials and make intelligent…
A: Passwords should be hashed To store sensitive user information, such as the user's password,…
Q: What degree of security do different authentication techniques provide?
A: Introduction Authentication is the process of figuring out if someone or something is honest or not.…
Q: What are the advantages and disadvantages of contemporary communication technologies? Explain this…
A: Introduction: Communication technology has the advantage of facilitating effective communication.…
Q: Explain how technological advancements have made it simpler for workers to interact inside…
A: Introduction: Internal communication refers to an organization's deliberate efforts to inform and…
Q: Please include examples for each of the three fundamental file management approaches.
A: Give examples for each of the three main file management strategies. Ordinary files, usually called…
Q: Describe and demonstrate the three fundamental file management techniques.
A: Introduction: File management is the process of overseeing a system that effectively manages…
Q: In the case of a data security breach, what are the organization's procedures governing the sharing…
A: statement: An outline is a thorough plan of action or comprehensive schedule of events. Every time…
Q: Regarding effective communication, what role does modern technology play, and how is it utilised?
A: Let's see how modern technology played an important role in communication.
Q: What role does contemporary technology play in the process of successful communication, and how is…
A: Answer: You can see the average elementary age child with their head buried in their smartphone,…
Q: What are the benefits and possible disadvantages of caching disc write operations?
A: In this question we need to explain advantages and disadvantages of caching disc write operations.
Q: What type of reaction does the capacity analysis get when many processes are occurring…
A: Introduction: The surface area of your disc, where your data is stored, is split into circular…
Q: What is the precise purpose of the canvas element in HTML5?
A: Canvas element in HTML 5 are used to draw graphics via scripting. They can be used to draw…
Q: Write the appropriate algorithm for each mathematical problem 1. X = (a+b) - c 2. Get the…
A: In this question we need to write algorithm for the mathematical problems. Algorithm:- An algorithm…
Q: How does information technology contribute to the day-to-day operations of organisations, especially…
A: The answer for the above mentioned question is given in the below steps for your reference.
Q: How does information technology influence the communication procedures of modern businesses?
A: The Acronym Stands For "Information Technology: Information technology, abbreviated as IT, refers to…
Q: What are the aims and goals of the File Integrity Monitoring programme
A: Answer:
Q: What can we do with the aid of authentication? Here, we will examine the pros and downsides of…
A: You've probably heard about the advantages of two-factor authentication. Requiring more than just a…
Q: What is the precise purpose of the canvas element in HTML5?
A: <canvas> element in HTML 5 is used to draw graphics on a web page.
Q: What criteria are necessary for monitoring the integrity of the files?
A: The FIM program identifies, analyses, and reports anomalous file modifications. Monitoring file…
Q: Walk me through the three most prevalent methods for organising my files and demonstrate how they…
A: Synchronization is the synchronisation of events in order for a system to work in harmony. The…
Q: The usage of digital communication has overtaken the use of both face-to-face and voice-to-voice…
A: Every company undertakes a specific project and develops it based on the criteria. The project…
Q: Conduct research on user authentication as a form of access control and compose a report on your…
A: Start: Security mechanisms are used to enforce the layers of assurance between a system's security…
Q: Create a fictitious situation involving login management and explain it in full. Determine different…
A: Introduction: Next, we'll explore popular authentication methods and show how to utilise them for…
Q: Programming Language: C++ A) Create a program which shows dynamic memory allocation of an array. B)…
A: A dynamic array's memory is allocated at runtime thus it's size can be modified, that's how it is…
Q: CS-related domains Are there two sorts of Internet services given by apps? Uniqueness separates…
A: The following is a list of the some of the most popular internet services: Communication Services…
Q: ubject Topic: Logic Formulation using Flowchart and Pseudocode Problem: Looping Create a program…
A: Introduction: Step 1: Start Step 2: declare variables int b, n; Step 3: assign initial values to…
Q: How many distinct methods exist to access files? What are the pros and downsides of using them?
A: Introduction: Basic file access method: File organization is simply arranging all of an employee's…
Q: What are the most common errors that might occur throughout the data modelling process?
A: Data modeling Data modeling is only the method for making or making the portrayal in a picturesque…
Step by step
Solved in 3 steps with 1 images
- Define a class called Book. This class should store attributes such as the title, ISBN number, author, edition, publisher, and year of publication. Provide get/set methods in this class to access these attributes. Define a class called Bookshelf, which contains the main method. This class should create a few book objects with distinct names and store them in an ArrayList. This class should then list the names of all books in the ArrayList. Enhance the program by providing a sort function, which will sort the books in ascending order of their year of publication. Create a few more Bookobjects with the same names but with different edition numbers, ISBNs, and years of publication. Add these new Book objects to the ArrayList, and display the book list sorted by book name; for duplicate books of the same name, sort the list by year of publication. (Hint: You will need to define a comparator class that takes two Book objects as parameters of the compareTo This method should do a two-step…Task 2: Write a static method which takes an ArrayList of Strings and an integer and changes the ArrayList destructively to remove all Strings whose length is less than the integer argument. So if the integer argument is 4 and the ArrayList is: tomato cheese chips fruit butter tea buns pie The output tomato cheese chips fruit butter is:JAVA PROGRAMMING Write a static method named sumOfNegativeNumbers. It must have one parameter, an int array, and an int return type. It should return the sum of the negative numbers in the array. If there are no negative numbers it should return 0. If the array has these values [-1, 2, 5, -3, 7] then it should return -4.
- 2. Write a class ArrayClass, where the main method asks the user to enter the four num bers. Create a method printArray that prints the array whenever required (use Acrav.toString method). Make the program run as shown in the Sample Run below. Green is user input. Use Attax.sort, Attach.bianrySearch. Attaveauals Sample Run List1, Enter four num bers: 2 33 2 List2, Enter four num bers: 6 25 4 List3, Enter four num bers: 52 46 Your original Listi: [2, 3, 3, 2] Your original List2: [6, 2, 5, 4] Your original List3: [5, 2, 4, 6] Sorted Listi is: [2, 2, 3, 3] Enter a number from the sorted List1 to search for: 3 Value 3 is in index 2 (or position 3) List that are the same when sorted: [2, 4, 5, 6]Rename the show method to people Override the show method in student and in the other class you created (this will be the polymorphic method) In main program, create an array of 3 objects of class people Instantiate each array position with a different object (people, student, other) With a loop, display all the objects in the array.Given a base Plant class and a derived Flower class, complete main() to create an ArrayList called myGarden. The ArrayList should be able to store objects that belong to the Plant class or the Flower class. Create a method called printArrayList(), that uses the printInfo() methods defined in the respective classes and prints each element in myGarden. The program should read plants or flowers from input (ending with -1), add each Plant or Flower to the myGarden ArrayList, and output each element in myGarden using the printInfo() method. Ex. If the input is: plant Spirea 10 flower Hydrangea 30 false lilac flower Rose 6 false white plant Mint 4 -1 the output is: Plant 1 Information: Plant name: Spirea Cost: 10 Plant 2 Information: Plant name: Hydrangea Cost: 30 Annual: false Color of flowers: lilac Plant 3 Information: Plant name: Rose Cost: 6 Annual: false Color of flowers: white Plant 4 Information: Plant name: Mint Cost: 4 import java.util.Scanner;import java.util.ArrayList;import…
- The Delicious class – iterative methods The Delicious class must:• Define a method called setDetails which has the following header: public void setDetails(String name, int price, boolean available) This must find in the ArrayList the Chicken with the given name, change itspricePerKilo to the given price parameter and set whether it is in stock or not. A value of true for the available parameter means the chicken is in stock and a value of false means it is sold out (not in stock). Note that there will only be at most one Chicken object of the given name stored in the ArrayList.• Define a method called removeChicken that takes a single String parameter representing a chicken’s name. This method must remove from the ArrayList the Chicken object (if any) with the given name. The method must return true if a cheese with the given name was found and removed, and false otherwise.The Delicious class – challenge method In the Delicious class complete the findClosestAvailable method: This…In C# using an array Implement the inventory manager class. This class must have methods that do the following: Add a new item to the inventory manager. Remove an item from the inventory manager. Re-stock an item in the inventory manager. Display the items in the inventory manager. Search for an item in the inventory manager by at least two criteria (name, price, quantity, etc.). Test the inventory manager class with a driver program or unit tests. This may be a console application.NOTE: The Array, ArrayList or List class may not be used Write a program that will create an invoice for a customer order based on their requests. Your program should prompt the user for their requested items based on a stock number then store the associated information in an array to be displayed in the invoice. 1. Define a Java class as described below. All variables should be declared as private and all methods as public. Save the class definition in a file with an appropriate filename. Class Name: Inventory Instance Variables: itemName - String price - double quantity - integer Instance Methods: A default constructor A constructor that accepts three arguments, one for each of the fields. getter methods for each of the class fields. toString() A method to display the fields of an instance of the class in to be displayed on the order sheet. Compile and debug the above code. 1. Then, create a class, TestInventory that contains a main() with static methods to create an invoice using…
- Java Programming Class Car Attributes (all private): vin: String (5 digits) make: String model: String year: int price: double Methods: Parameterized constructor for initializing a new Car instance Getters for all attributes toString method to display a Car's attributes Executable Class Create an array of at least ten Car objects. Be sure to use many with identical last years and different prices. Create an ArrayList from the array. Shuffle the ArrayList. Sort the ArrayList first by year and then by price. See page 790-791. Using the forEach method and a lambda expression, print all cars sorted as above. Create a LinkedList from the ArrayList. Create an iterator capable of cycling both forward and backward through the LinkedList. Iterate forward through the entire LinkedList but without generating any output. Then iterate backwards through the LinkedList to print the cars data.Write a Java Console application in which you initialize an arraylist with 10 String values. For example, 10 colour names, or fruit names, or veg names, or car names, etc. Display all the values in the list in a neat tabular format. Randomly select a value from the array. Now allow the user 3 chances to guess the value. After the first incorrect guess provide the user with a clue: the first letter of the randomly selected word. After the second incorrect guess provide the user with another clue: the number of letters in the word. Once the user correctly guesses the word, remove that word from the list. Display the number of items in the list. The user must have the option to play again.This program is going to maintain a list of customers’ names and bank account balances. 1. Create a class called CustomerList with a main method that instantiates an ArrayList of String objects called customerName. Invoke the add method to add the following names into the ArrayList: Cathy Ben Jorge Wanda Freddie 1. Print each name in the ArrayList using a for a loop. 2. Create another ArrayList object called customerBalance, to save users’ balance. What is the type of this ArrayList? double or Double? You just need to declare this ArrayList and leave it empty for now. 3. For each customer, print the name and ask the user to enter the initial balance for this customer. Save the initial balance into ArrayList customerBalance. Use a loop to get this done for all 5 customers. The program should print out this for the first customer: Example: Please enter the account balance for Cathy: (waiting for user’s input …) Code: for(int i=0; i<5;i++) { Print(“Please enter the account balance…