1. A polynomial can be represented as a linked list, where each node called a polyNode contains the coefficient and the exponent of a term of the polynomial. For example, the polynomial 4x³ + 3x²-5 would be represented as the linked list: 43 I 3 L -50 - 5xo 2 7. 4x3 3x² Write a Polynomial class that has methods for creating a polynomial, reading and writing a polynomial, and adding a pair of polymomials. In order to add 2 polynomials, traverse both lists. If a particular exponent value is present in either one, it should also be present in the resulting polynomial unless its coefficient is zero.
Q: Define bounded summation and explain its significance in algorithm analysis.
A: Bounded summation is a concept used in algorithm analysis to describe the behavior and complexity of…
Q: Would you say that the Internet fosters or impedes social activity? Explain your position. What is…
A: The Internet has revolutionized the way we interact, communicate, and engage with others. It has…
Q: What kind of data transfer speeds can be reached with an Ethernet-based local area network?
A: An Ethernet-based local area network ( LAN ) is a network infrastructure that uses…
Q: Let's think of a situation in which the CIA's "holy trinity" of secret, trust, and paying attention…
A: In the realm of intelligence and security agencies, the Central Intelligence Agency (CIA) holds a…
Q: Why would you utilise OLAP?
A: OLAP or online analytical processing is a powerful technology used for data analysis and reporting…
Q: Locate a JavaScript function and explain in your own words what it does and when you might use it in…
A: A JavaScript function is a reusable block of code that performs a specific task or calculation. It…
Q: Why is it expensive and dangerous to switch from old systems to new ones?
A: Migration from old system to new ones is needed to uphold an organization's competitiveness. But, it…
Q: In a diagram, what icon is used to show the state of a selection structure?
A: In computer science, selection structures are essential programming constructs used to make…
Q: What information does a process on one host use to identify another?
A: When a process on one host needs to identify a process running on another host, it typically does so…
Q: How can I best monitor information requests?
A: Monitor information request is a request which is done to achieve a desired result according to the…
Q: Which of the following would be the variable result value, after the following set of statements?…
A: first is initialised as 1, First is initialised as 100, second is initialised as 5, Second is…
Q: How does data mining affect a person's right to privacy and safety?
A: Data mining refers to the process of extracting meaningful patterns , insights , and…
Q: c. Code will not compile d. None of the above
A: In step 2, I have provided solution for Q1-----------In step 3, I have provided solution for…
Q: What data would your company dashboard display?
A: A company dashboard typically displays key performance indicators (KPIs) and Important metrics that…
Q: OLAP: what is it and how can it help?
A: Online Analytical Processing, or OLAP, exists a category of software tools that allow operators to…
Q: How is the balanced scorecard essential to maximising ROI?
A: The balanced scorecard is a strategic management framework that provides organizations with a…
Q: Explain the DBA's technical duties, including service design and implementation.
A: As a database administrator DBA has various technical duties related to the design and…
Q: Write a loop that reads positive integers from standard input and that terminates when it reads an…
A: here is the Java program to read positive integers from standard input and print out the sum of all…
Q: You are given a class that contains synchronised method A and conventional method B. Can two threads…
A: The question asks about the behavior of a class that contains a synchronized method A and a…
Q: What are the problems with putting internet trade into place?
A: Internet trade or e-commerce has revolutionized the way trade operates. It provide business with a…
Q: What are the problems with putting internet trade into place?
A: Implementing Internet trade also known as e-commerce can present several challenges. Some of the…
Q: Chapter 4 methods can be used to do math calculations and models of engineering and science…
A: Software on a computer can certainly solve math questions and generate formulas. There are various…
Q: Software Engineering: Project Description: Sentiment Analysis System for Images, In this project,…
A: A Sentiment Analysis System is a software application or system that utilizes natural language…
Q: 1-Derive the truth table for the following Logic Gates combination: ABCD
A: For the given circuit, we will first solve the circuit. We have A,B,C and D as input so we will have…
Q: What is better about elliptic curve cryptography (ECC) than RSA?Do digital signatures provide…
A: Elliptic Curve Cryptography (ECC) and RSA (Rivest-Shamir-Adleman) are both widely used cryptographic…
Q: Prove that the number of comparisons necessary for a binary search in a table of size N is exactly…
A: In computer science, binary search is a technique to search for elements from a specific collection…
Q: Laws regulate information security, whereas ethics give moral advice. Privacy Your response?
A: Both laws and ethics are important in the context of protecting the information and privacy of data,…
Q: Output: Number of 2 in the sequence 5 Number of 4 in the seque
A: The provided code uses the collections module to import the deque class and demonstrates the use of…
Q: What does the database management system driver actually do?
A: A Database management system (DBMS) driver is a crucial component in managing and Utilizing…
Q: Create a C++ application that will exhibit concurrency concepts. Your application should create two…
A: Algorithm:Start the main function.Create two thread objects, t1, and t2, corresponding to the…
Q: PointSource utilised IBM's rational test workbench tool to construct the FIMC app, allowing…
A: IBM Rational Test Workbench is an included suite that allow engineers to do various type of testing,…
Q: How do the home agent and the foreign agent work together to handle Mobile IP hosts?
A: What is Mobile IP hosts: Mobile IP hosts refer to devices or hosts in a network that can move…
Q: Decrypt "FYDQAIRR" if it is known to have been encrypted with the affine cipher and c→M and k→C are…
A: The Affine cipher is a type of substitution cipher that involves both multiplication and addition…
Q: How does testing with a list of things to do work? Use the real-world example to help you map it to…
A: Testing with a list of things to do is a systematic approach used to evaluate the performance,…
Q: ich security mechani
A: Data security is a critical aspect of computer science and information technology. It refers to the…
Q: Instead of just saying that deep access is better than shallow access because it is faster, explain…
A: Deep access is better than shallow access from the point of view of a software writer because it is…
Q: Find a place to do business in the Malaysian market right now?
A: With a diverse and growing economy, Malaysia offers numerous opportunities for businesses to thrive.…
Q: Make student acceptable usage fair. Include mobile phone, social media, and internet usage…
A: In today's digital age, students have become increasingly reliant on technology for various aspects…
Q: Explain how mainframe computers and midrange servers should be positioned and provide an example of…
A: Positioning of mainframe computers and midrange servers and provide examples of each.
Q: Why didn't Target have a Chief Information Security Officer before their data breach?
A: Why didn't Target have a Chief Information Security Officer before their data breach answer in below…
Q: Which device transmits data from the source network device to the target network device based on its…
A: Device responsible for transmitting data from the source network device to the target network device…
Q: What are some ways computer forensics can keep scope and scope creep from getting out of hand?
A: 1) Computer forensics is a branch of forensic science that involves the investigation, analysis, and…
Q: Are current internet precautions sufficient to protect under-16s? If not, what can governments do?
A: Current internet precautions vary across different countries and platforms, but generally speaking,…
Q: How can you figure out how well an ArrayList works?
A: To determine how well an ArrayList works, you can consider several performance aspects, including…
Q: Consider the following class definitions: public class Thing { public void string_method(String…
A: Here is your solution -
Q: PROJECT - D Prepare a userform where the input fields are O Book Name (text) O Book Author (text) O…
A: I can provide you with a code example in Python that demonstrates how you can implement the…
Q: I have a code (class Server). I need help to fix error in another class. These are 2 seperated…
A: The error you're encountering is occurring because the pickle.loads() function is expecting a…
Q: Distributed lock services in big data and cloud computing?
A: What is big data and cloud computing: Big data refers to extremely large and complex datasets that…
Q: Why would your company pick high-availability DHCP? What's best? Any drawbacks? What makes it…
A: High availability DHCP dynamic host configuration protocol is a solution that ensures uninterrupted…
Q: Information security administration's importance?
A: What is Information Security: Information security refers to the practice of protecting information…
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 5 images
- use java to write code and please use treeset as mentioned in the question Create a class Customer with below attributes: int - id String - name String - dob double - salary String - email int - age Make all the attributes private.Create corresponding getters and setters. Create a constructor which takes all parameters in the above sequence. The constructor should set the value of attributes to parameter values inside the constructor. Create a class CustomerDemo with main method Create a static method sortCustomerOnId in the CustomerDemo class. This method has to take a list of Customer objects and return a TreeSet of Customer objects sorted based on id. Call the above method from the main methodThis assignment requires one project with two classes. Class Employee Class Employee- I will attach the code for this: //Import the required packages. import java.text.DecimalFormat; import java.text.NumberFormat; //Define the employee class. class Employee { //Define the data members. private String id, lastName, firstName; private int salary; //Create the constructor. public Employee(String id, String lastName, String firstName, int salary) { this.id = id; this.lastName = lastName; this.firstName = firstName; this.salary = salary; } //Define the getter methods. public String getId() { return id; } public String getLastName() { return lastName; } public String getFirstName() { return firstName; } public int getSalary() { return salary; } //Define the method to return the employee details. @Override public String toString() { //Use number format and decimal format //to format the salary…3. The interface Range is defined below:public interface Range{ void setLimits(int x, int y); int getNumber();} Implementations of Range should exhibit the following behaviour:• The setLimits method should store its parameter values somewhere to serve as the lower and upper limits of the range appropriately.• A call to getValue should return an integer that is always greater than or equal to the lower limit and less than or equal to the upper limit.The class RandomInteger is an implementation of the interface Range. It also has the following features:• It has two fields of int type, low and high, to record the lower and upper limits of the range, respectively.• It has single constructor method that takes two integers and stores them in the appropriate fields. Note: You should make use of the setLimits method.• A call to the method getNumber should return a random number that is always within the range, i.e. greater than or equal to the lower limit and less than or equal to the upper…
- Write a class named Employee which implements Comparable Interface with name and salary as data field. Add a constructor with argument name and salary. Add getter and Setter for name and salary. Add CompareTo() method for the data Name. Write a class named Manager which inherits the Employee class. Add an instance variable, named department, of type String. Add a constructor in the subclass class with arguments name, salary, department and a toString() method that prints the manager’s name, department, and salary [Hint: Add a toString( ) method in the super class as well] Create 3 objects of Manager with following arguments 1. (Zayed, 500), 2. ( Ahmed, 700) 3. ( Faisal, 600) Create an Array object Add the above 3 objects into an Array object and Sort by Name and Display Create an object Employee class with argument (Zayed, 500, IT) Display the 1. Name 2. Salary 3. Department by using tostring() method.1. Create a class Employee with parameters name, id, designation, and basicSalary. Use appropriate datatypes and access specifiers. Use default constructor to create objects of employee. Write methods toset and get the values of parameters of employee. Write methods to find total salary of employee andto display the complete details of employee along with total salary. Create another class TestEmployeewhich creates array of n number of employees, uses appropriate set methods to set the values ofparameters of every employee. Display the details of each employee. (Total salary = basic salary + 80%of basic salary)Write a class named Employee which implements Comparable Interface with name and salary as data fields Add a constructor with argument name and salary. Add getter and Setter for name and salary. Add CompareTo() method for the data Salary. Write a class named Manager which inherits the Employee class. Add an instance variable, named department, of type String. Add a constructor in the subclass class with arguments name, salary, department and a toString() method that prints the manager’s name, department, and salary [Hint: Add a toString( ) method in the super class as well] Create 3 objects of Manager with following arguments 1. (Zayed, 500), 2. ( Ahmed, 700) 3. ( Faisal, 600) Add the above 3 objects into an ArrayLIst object and Sort by Salary and Display. Create an object Employee class with (Zayed, 500,IT) and display the 1. Name 2. Salary 3. Department by using tostring() method.
- 1. Create a Student class that implements the Person interface. As well as storing the students name and email, also store their course grade (e.g A, B, C) in a member variable. The grade should be accessible via a getGrade method. For the implementation of getDescription return a message along the lines of “A C grade student”, substituting the students actual grade.2. Create a Lecturer class that implements the Person interface. This class should also store the subject that the lecturer teaches. Add a getSubject method, and implement getDescription so that it returns a suitable message, e.g. “Teaches Biology”.3. Create a third class, Employee that implements the interface. This should also store the name of the department the Employee works in (available via getDepartment). Again, getDescription should return a suitable message.1). Develop a class named Department with two data members: name and size. The name cantake values such as "Finance", "Human Resources". size is for how many people work in thedepartment; You should provide all constructors, all get/set methods, and the toString method;2). Develop a class called Company which should have at least four data members: name,address, totalNumberOfEmployees, and departments (of type Department; an array). The relationbetween Company and Department is composition. The total number of employees is the sum ofthe sizes of all departments. You should provide all constructors, especially the constructor thatreceives departments as an initial value, all get/set methods, and the toString method;3). Create three departments: "Finance", "Human Resources", "IT". Test all constructors, andget/set methods, toString method; take screenshots;4). Create a company object with the above departments: "Finance", "Human Resources", "IT".Test all constructors, and get/set…1) Change the visibility of the variables and constructor in the Employee class to be more secure 2) Add an Admin class with the following features: a) The Admin class is a child of the Employee class b) Admin objects have an instance string password variable c) The Admin class has a 4 parameter constructor. One parameter sets the string, the other three parameters are used as arguments for a parent constructor call. d) Admin objects have an instance getInformation() method with a void return and an Employee object parameter. The method will request the calling Admin’s password and check user input. If input matches the password, the method will display the information of the Employee parameter Please use ***C Sharp** Language to answer the code
- - Creates a class Teacher with two attributes: name and specialty. a. Add a constructor able to create a Teacher; b. Add the methods getName and getSpeciality; c. Add the method display able to display the attributesWrite a java program in which Animal:Create a class Animal and Add a protected data member named id of integer type.• Add get/set methods for id data member in Animal class with public access. Also provide default constructor this should initialize id to 0.• Also provide parameterized constructor and toString method.• Add an abstract method tellAboutSelf method to Animal class with public access• Add another abstract method speak method to Animal class.Reptile, Bird, MammalNext create the three child classes which extends form Animal class.• Add a default constructor to each of the above created class. The constructor should initialize the id data member id, Reptile, Bird and Mammal, to 1, 2 and 3 respectively also it display a message “(class Name)’s default constructor”. E.g. for Bird it says “Bird’s default constructor”.• Add a parameterized constructor to each of the above created class. The constructor should initialize the id data member, Reptile, Bird and Mammal, to the…Create an abstract NewspaperSubscription class with fields for the subscriber name, address, and rate. Include get and set methods for the name field and get methods for the address and subscription rate; the setAddress() method is abstract. Create two subclasses named PhysicalNewspaperSubscription and OnlineNewspaperSubscription. The parameter for the setAddress() method of the PhysicalNewspaperSubscription class must contain at least one digit; otherwise, an error message is displayed and the subscription rate is set to 0. If the address is valid, the subscription rate is assigned $15. The parameter for the setAddress() method of the OnlineNewspaperSubscription class must contain an at sign (@) or an error message is displayed. If the address is valid, the subscription rate is assigned $9. Finally, write an application that declares several objects of both subscription subtypes and displays their data fields