Implement a Menu-Driven program of ArrayList class using the above scenario and perform the following operations. a. Create an object of ArrayList class based on the scenario with explanations of the method used. b. Create a method that will allow inserting an element to ArrayList Class based on the scenario. The input field must be validated as necessary. C. Create a method to delete specific elements in the ArrayList with explanations of the method used.
Q: How do you react when you see complete strangers pleading for donations online?
A: Donations online: Donor box is a powerful fundraising tool that is simple to set up and attracts a…
Q: Jessica is interested in developing a new programming language, and she has some design objectives…
A: Given: An open-source language is a programming language that adheres to the open-source protocol's…
Q: 5.1.17. (-) Use Lemma 5.1.18 to prove that x (G) ≤ 4 for the graph G below.
A:
Q: Why is it necessary for a systems analyst to be able to translate? Which organizations are perhaps…
A: A systems analyst must translate technical knowledge: Into intelligible English for non-technical…
Q: Discuss in as little detail as possible the technology that is best appropriate. Recognize and…
A: Given: Any item, set of ideas, procedure, or practise may be considered an example of appropriate…
Q: You should make an attempt, preferably by using English that is organized, to describe processes…
A: Definition: Processes unrelated to systems analysis will be described in structured English. When…
Q: Computer science: Discuss why companies feel it is vital to compare agile and conventional methods…
A: Given: Emerging research suggests that the majority of companies operating in today's market are…
Q: How will advances in artificial intelligence influence the course of the future? What kinds of…
A: Artificial intelligent: Artificial intelligence allows robots to learn from the data they collect.…
Q: The implementation and maintenance of web applications may give rise to a variety of challenges.
A: Challenges rise while implementation and maintenance of web application.
Q: Assume that a 10 m high structure is observed from a distance of 50 m. What is the size of the…
A: Below is the answer to above question. I hope this will meet your requirement.
Q: Web servers that hold transaction information must be protected by public and private key encryption…
A: Private Key encryption is the encryption and decryption of the information is only taken care by the…
Q: Describe the overall structure of the TCP/IP protocol. Think about it in comparison to the ISO/OSI…
A: Introduction: Describe the overall structure of the TCP/IP protocol. Think about it in comparison to…
Q: Find at least three different firms on the internet that provide CASE tools that are either free or…
A: CASE: A CASE tool is a software package that helps with the design and implementation of information…
Q: If you want to get the most out of this example, you should probably start with a database that is…
A: Consider a database system: That uses snapshot isolation for an airline. Consider the following…
Q: Do you have any examples to back up your assertion that a relational database is unable to allow…
A: Definition: A relational database is a kind of database that stores and makes related data items…
Q: The implementation and maintenance of web applications may give rise to a variety of challenges.
A: Definition: Here are some of the things that went into setting up and maintaining the web…
Q: Which of these is/are the reason why function is important in programming? It eliminates repetitive…
A: A function can be defined as the chunk or the part of the code, which is being used repetitively…
Q: Give at least three examples of convenience advantages that a vector object has over an ordinary…
A: A vector object is defined as the smooth curves connected and created mathematically by points.…
Q: The software versions, releases, and baselines shown below are some instances each.
A: Inspection: about software versions, software release, and software basis Versions of software Every…
Q: In this section, a condensed summary of the two features that are often regarded as the most…
A: Operating System: A computer's operating system is software. An operating system is a piece of…
Q: Prim's MST technique may be used to a real-world weighted network.
A: Given: Prim's method (also known as Janke's a algorithm) is a greedy technique in computer science…
Q: Use R studio programming Create a function that convert base 10 to base 2 Take any five number and…
A: Please find the answer below :
Q: DESIGNING HANGMAN WITH FLOWCHART Can you help me with this please I'm really confused?
A:
Q: Explore the possibilities of using Structured English to describe processes that are beyond the…
A: It should be noted that: The following is a list of some of the benefits of using static analysis:…
Q: This is a possibility since modern computers have sufficient processing power. How did computers…
A: Given: Computers have been significant ever since they were first invented, but they are now…
Q: Question 3 Identify and correct errors in the following class declaration: class nifty { // data…
A: I have rectified the error in the given code.
Q: The more time you invest in utilizing social media, the more rewards you'll get as a result of your…
A: Introduction: A social networking service, also known as an SNS (occasionally referred to as a…
Q: Q3/ Write a program in c++ to get the length of a string enter by a user?
A: We will be using strlen function to get the length of string entered by user , we will store the…
Q: 5. A positive whole number n > 2 is prime if no number between 2 and √n (inclusive) evenly divides…
A: n = int(input("Enter a value for n: ")) is_prime = n > 1for i in range(2, round(n ** 0.5)+1):…
Q: Examine artificial intelligence's future possibilities in light of its history.
A: Start: AI is transforming the future of almost every sector and people on the world. Artificial…
Q: 3. Write algorithm and draw a flow chart to develop a simple calculator that perform addition,…
A: PROGRAM INTRODUCTION: Include the required header files. Start the definition of main function.…
Q: Could you offer a brief overview of the primary elements that go into the construction of the…
A: OS components include: Files, please! Process Management oversees processes. I/O management.…
Q: Investigate the ideas of procedural programming and modular programming.
A: Investigate the ideas of procedural programming and modular programming.
Q: What do you consider to be the most significant purpose that a firewall was developed to serve? At…
A: The computer firewall assists us in preventing unauthorized access to our computer system. The…
Q: The ____________ updates the first set of parameters and the second set of parameters for the second…
A: Answer to the given question The NDBD updates the first set of parameters and the second set of…
Q: ++i) { A. for (i = 0; i < 5n + 1; for (j = 0; j < 2*i + 1; ++j) sum += i + j; { } k
A: Here we can see the use of nested for loop. What is for loop? For loop is a programming language…
Q: What different kinds of AI are there? List the many types of artificial intelligence and provide…
A:
Q: When should the planning of a network upgrade take place, and how long should the update itself…
A: Definition: Because of technology developments, the company can now function faster and smarter than…
Q: Take into consideration the following ten hazards associated with managing IT projects:
A: Start: The following list of the most common project dangers that contemporary businesses may face…
Q: 4. Consider the following functions: def count_larger (1, n): count = 0 for i in range (len (1)): if…
A: First lets understand what are formal parameters and actual parameters: Formal parameters : are used…
Q: What encryption feature prevents data loss?
A: Data encryption works by securing transmitted digital data on the cloud and computer systems.
Q: Are there any benefits and drawbacks associated with the use of symmetric encryption methods? What…
A: Lets see the solution in the next steps
Q: The software versions, releases, and baselines shown below are some instances each.
A: Start: Software versions, releases, and baselines are all examples of software. From requirement…
Q: Write python code to print 4th power to all numbers in range 1..10 (^4)
A: Find the required code in python given as below and output :
Q: What is the best way to replace a string in a file with a new one?
A: To keep track of information when you are programming in any given programming language, you will…
Q: You may find it beneficial to utilize structured English when discussing processes that aren't…
A: Structured English: All logic is expressed in structured English using sequential structures,…
Q: The implementation and maintenance of web applications may give rise to a variety of challenges.
A: Intro: The following are the difficulties that must be addressed during the deployment and…
Q: What kind of an impact do various online platforms have on your studies?
A: Explanation: As a student, what part do the many different online platforms play in the topic that…
Q: 5. A positive whole number n > 2 is prime if no number between 2 and √n (inclusive) evenly divides…
A: Ans:) In this problem we need to create a program to verify a given number is prime number or not.…
Q: Which sorts of printers are eligible to have their own unique IP addresses?
A: Introduction: Because an IP address is a one-of-a-kind identifier, it enables computers to transmit…
Step by step
Solved in 2 steps
- The function remove of the class arrayList removes only the first occurrence of an element. Add the function removeAll to the class arrayList that would remove all occurrences of a given element. Also, write the definition of the function removeAll and a program to test this functionDefine 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…Part 1: You are required to build an application to assist in the conduct of Assessments. The class Assessment represent the notion of any kind of assessment including Quiz, Assignment and Examination. Please follow the given steps to implement the applications 1. Construct a class Assessment with the following attributes a. Id (int) b. Topic(String) c. MaxMarks(double) d. Date of conduct (doc) (GregorianCalendar) e. attempts ArrayList //an array list that will contain the Attempts objects 2. In order to complete the above class you will have to write a class Attempt with the following attributes. This class represents the attempts that students have made against this assessment. a. studentId(int) b. studentName(String) c. marksObtained(double) 3. Provide constructor in Attempt class with values for all attributes 4. Provide getters and setters for each 5. Provide a toString method that produces the following string Student = --id-- : name Marks Obtained : --marks— 6. Now complete the…
- Write the definitions of the member functions of the classes arrayListType and unorderedArrayListType that are not given in this chapter. The specific methods that need to be implemented are listed below. Implement the following methods in arrayListType.h: isEmpty isFull listSize maxListSize clearList Copy constructor Implement the following method in unorderedArrayListType.h insertAt Also, write a program (in main.cpp) to test your function.create a driver program, CarTestDriver that uses a Garage object to store Cars. The Garage object is an instantiation of a Garage class that contains “parking”, an array of Car types. You must use a Car[] not an ArrayList<Car> for the “parking” in the garage. I suggest setting up the Car class with a default constructor that generates random values to create each new Car object. The rules for driving the cars from the garage are: The size of the garage is specified by the user. The user may only use cars from the garage A Car is removed from the Garage when a user retrieves a Car from the Garage. The Car is returned to the Garage, after it is driven if it does not run out of fuel. The user interacts with the Car object after the Car object is retrieved from the garage. The program should not fail due to a user selection. A car may only be refueled when the user selects the Car for use, prior to being removed from the Garage The user may select to drive any car that is currently…Salesforce Assignment: You are working in company as a junior developer and the manger assign you a task to create the test class of trigger code of the following code will cover all the use case like insert, update, delete. The code is as follows: public class TriggerBasicAssignmentTriggerHelper ( // This method is used to update the vlaue of field C public static void getFiledvalue(List listofValues, Map mapofCoustomobject ){ for (Trigger_Basic_Assignments_ct :listofvalues){ if(mapofCoustomobject == null || t.Field_A_c != mapofCoustomobject.get(t.Id). Field_A_C || t.Field_8_c != mapofCoustomobject.get(t.I if(t.Operator_ '+') t.Field C_c = t.Field_A_c + t.Field_B_c; else if(t.Operator_c *') t. Field C_c = t.Field A_* t.Field_8_c; else if(t.Operator_c == /' && t.Field B_c != 0) t.Field C_c = t.Field A_c / t.Field_B_c; else t.Field C_c = t.Field_A_c - t.Field B_c; I need the test class only.
- Q8. Write a declaration of a private field named department that can hold an ArrayList. The elements of the ArrayList are of type Student. Write an assignment to the department variable to create an appropriate ArrayList object. Q9. (A) If a collection stores 20 objects, what value would be returned from a call to its size method? (B) Write a method call using get to return the fifth object stored in a collection called department. Q10. Write a method call to add the object held in the variable student1 to a collection department files.EclipseIDE - Java Programming assigment For your program: Create a data class named Automobile that implements the Comparable interface. Give the class data fields for make, model, year, and price. Then add a constructor, all getters, a toString method that shows all attribute values, and implement Comparable by using the year as the criterion for comparing instances. Write a program named TestAutos that creates an ArrayList of five or six Automobiles. Use a for loop to display the elements in the ArrayList. Sort the Arraylist of autos by year with Collections.sort(). Finally, use a foreach loop to display the ArrayList sorted by year.Make a shopping cart program that implements the ArrayList class. Make a class named Item.java that contains the following data members, item_name, quantity, and price. Create the appropriate constructors and methods to initialize, access, and manipulate the data members, also create a toString method to print the item name, quantity, and price. Create an ArrayList of Items in the Main.For the INPUTThe user will enter the item name, quantity, and price of each item. A 'Y' will add another item to the shopping cart, and 'N' will stop the input.For the OUTPUTThe program then lists the items in the shopping cart using the toString method in the Item class. Calculate for the subtotal and total of the items in the cart.Format your toString method to have a double tab, "\t\t", after the item name, single tab, "\t", after quantity and double tab, "\t\t", after price. EXAMPLEINPUTPencil215.25yYellow Paper150.00nOUTPUTPencil 2 15.25 30.50Yellow Paper 1 50.00…
- 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…C++ A robot is initially located at position (0; 0) in a grid [?5; 5] [?5; 5]. The robot can move randomly in any of the directions: up, down, left, right. The robot can only move one step at a time. For each move, print the direction of the move and the current position of the robot. If the robot makes a circle, which means it moves back to the original place, print "Back to the origin!" to the console and stop the program. If it reaches the boundary of the grid, print \Hit the boundary!" to the console and stop the program. A successful run of your code may look like:Down (0,-1)Down (0,-2)Up (0,-1)Left (-1,-1)Left (-2,-1)Up (-2,0)Left (-3,0)Left (-4,0)Left (-5,0)Hit the boundary! or Left (-1,0)Down (-1,-1)Right (0,-1)Up (0,0)Back to the origin! About: This program is to give you practice using the control ow, the random number generator, and output formatting. You may use <iomanip> to format your output. You may NOT use #include "stdafx.h".1- The FloatArray class stores a dynamic array of floats and its size. It has:- A parameterized constructor that takes the array size. - An add method that adds a float at the end of the array.- Overloading for the insertion operator << to write the array to afile (ofstream)- Overloading for the extraction operator >> to read the array elements from the file (ifstream) and add them to the array.- A destructor to deallocate the array2- The SortedArray inherits from FloatArray. It has:- A parameterized constructor that takes the array size. - An add method that adds a float at the right place in the arraysuch that the array remains sorted with every add. Don’t add to the array then sort but rather add in the right place.3- The FrontArray inherits from FloatArray. It has:- A parameterized constructor that takes the array size. - An add method that adds a float at the front of the array.4- The PositiveArray that inherits from SortedArray. It has:- A parameterized constructor…