following class. Complete the statement inside every mutator and accessor based on the following criteria: setAcceleration ()– to increase the value of kmh by ten everytime it is invoked. setDeceleration () – to decrease the value of kmh by five everytime it is invoked. setBrake ()– to set the kmh to zero everytime it is invoked. getkmh ( ) – to return the value of kmh everytime it is invoked. public class YourNameCar private double kmh; public YourNameCar () kmh - 0; } public void setAcceleration () //complete your code here public void setDeceleration () //complete your code here } public void setBrake () //complete your code here public double getKmh () //complete your code here
Q: What Is a Liquid Crystal Display (LCD) and How Do I Use One?
A: The answer is given below.
Q: Write a C++ program to print the text "C++ Programming." in the output along with the quotes.…
A: Code: #include <iostream> using namespace std; int main(){ //printing the required text…
Q: What are the reasons for and against using Boolean expressions only in Java control statements…
A: Boolean Expressions: A logical statement that is either TRUE or FALSE is referred to as a Boolean…
Q: e of the data
A: A data violation is a digital assault that has access to and discloses sensitive, secret or…
Q: The ability to construct classes with more specific characteristics that share the properties and…
A: Intro The ability to construct classes with more specific characteristics that share the…
Q: On digital signals, error detection and repair operations are not possible. Choose one: Is it true…
A: False It is possible by cycle codes
Q: From the perspective of application developers and consumers, compare the three cloud computing…
A: Please upvote I am providing you the correct answer below. Please please please.
Q: owing set of processes, the length of the CPU burst time given in milliseconds:
A: Solution - In the given questions, we have to select the correct answer.
Q: This extensive overview of DNS processes includes both iterated and non-iterated requests,…
A: Introduction: This extensive overview of DNS processes includes both iterated and non-iterated…
Q: Why are health-care websites important? What are the differences between telesurgery and…
A: World Wide Web: The World Wide Web is abbreviated as the Web. The word is widely used on the…
Q: In today's emerging nations, wireless networks are critical. In certain regions, wireless technology…
A: Users can talk to each other even when they are moving: because wireless networks don't need wires…
Q: You have to work on B+ trees and provide me an intuitive discussion on B+ tree insert, update and…
A: The answer is as follows.
Q: What draws certain people to the world of cybercrime
A: Cybercrime, likewise is also called PC crime, the utilization of a PC as an instrument to additional…
Q: Google responds to our inquiry with millions of relevant webpages in a single millisecond?
A: Millisecond: A millisecond (MS) is a thousandth of a second. A human eye blinks between 100 to 400…
Q: Buffers are used to minimise access latency between various levels of the memory hierarchy. List the…
A: Introduction: A designated memory section within a program for storing the data being processed.…
Q: Question 10 When sorting query output, you use the key words 'sort by'. Question 10 options:…
A: The given question is false.
Q: It's important to know precisely what a semaphore is and what the various types are. Give some…
A: Intro Semaphore is a technology that allows processes: to coordinate their actions and solve…
Q: L3 = {a, ɛ}. ges defined over La is 3
A:
Q: What actions must a business take to notify the public and/or customers in the event of a data…
A: Introduction: When information is stolen from a system without the owner's knowledge or agreement,…
Q: o the supply chai
A: Center processes, often known as "main" processes, are the actions that an association must execute…
Q: Distinguish between indexed file space allocation, linked space allocation, and contiguous disk…
A: Introduction: By using a procedure known as file space allocation, physical storage space for data…
Q: 1.) What is a deadlock? Explain and you may use common examples. How does it affect and what can be…
A: We can only answer the first question. Please post the 2nd question separately. Given: 1.) What is a…
Q: Describe the second chance approach for page replacement within the framework of an LRU…
A: Introduction Algorithm: All piece reference values are set to False (Let it be the size of the…
Q: When developing a programme, each language has a set of rules that must be properly observed. What…
A: Programming Languages: Despite the fact that there are several programming languages for software…
Q: What is the name of the port in a modern PC (or server) that connects it to a LAN network? NIC O DAC…
A: The port in a modern PC or server that connects it to a LAN network is:
Q: How has OLED display progressed since its original idea in 1987? What OLED display types and specs…
A: The Answer start from step-2.
Q: There are many distinct kinds of interaction diagrams, each of which focuses on a particular…
A: Introduction: INTERACTION In UML, DIAGRAM is used to establish: A relationship between items. It has…
Q: How does Intrusion Detection Software function?
A: Introduction :- Because it identifies and responds to hostile behavior, a network intrusion…
Q: What does the RAND study say exactly? What was the holdup? RAND Report R-609 sought to answer this…
A: Introduction:
Q: Bv The DNS is examined in detail, including requests that are iterated and those that aren't,…
A: DNS: DNS is the Internet's phone book, which is why it's so crucial. Humans utilize domain names…
Q: y officer in pla
A: As we've learned, security should presently not be a secondary issue while executing it," Al…
Q: Explain how each of the eight cost estimating strategies may be paired with different heuristic…
A: Given: A database management system (DBMS) is software that stores and retrieves user data while…
Q: What is the name of the port in a modern PC (or server) that connects it to a LAN network? O NIC O…
A: Option: NIC DAC PCI port SATA port USB port
Q: Differentiate between internal and external fragmentation. What effect may they have on memory…
A: Memory Utilization: CPU utilization is determined by how much processing or work the software…
Q: Sample Input Ut: Depicted below are sample outputs when the program is executed (the items in bold…
A: Here, I have prepared the JAVA code and Flowchart as required, Please appreciate and Upvote. Code:…
Q: Define the various network categories and provide at least one example from each: Personal Area…
A: “Since you have posted a question with multiple sub-parts, we will solve the first three sub-parts…
Q: JoinDate JoinDate Gender Degree PriCode SpiCode SPL has STAFF as a staffid title. Place Exp Sname…
A: In total, there are the following sorts of attributes: Multivalued vs. single-valued…
Q: Provide me with the Matlab code to swap the second and third rows of the matrix given below, m = 987…
A: Write a MATLAB program to swap the second and third rows of the matrix given below, m = 9 8 7…
Q: Write the first three columns of an fstab entry that will mount the partition ext4 partition…
A: Yоur Linux system's filesystem tаble, аkа fstаb, is а соnfigurаtiоn tаble designed tо…
Q: How many of the following assertions are false? Pick one: a. A function must be defined and…
A: Java is a language for programming. It houses several libraries (package). It may be used to…
Q: DNS records, authoritative DNS servers, and root DNS servers, all must be distinguished in…
A: DNS Servers: Cloud flare has placed a greater emphasis on the foundations. Cloud flare is the…
Q: There are certain actions that occur over the lifecycle of a system that are critical to the success…
A: This is the first improvement strategy we shall examine (SDLC). For large programming projects…
Q: Remove all errors from the C++ program given below asap. #include using namespace std; int main(){…
A: #include <bits/stdc++.h>using namespace std;int main(){ int sum_0 = 0, sum_n = 20, i=0;…
Q: 149. Write a C# Sharp program to create a new list from a given list of integers removing those…
A: using System;// import Collections and Genericusing System.Collections.Generic;// creating a Driver…
Q: Why isn't the existence of a tail pointer sufficient to delete the list's final node in (1) time?
A: Every insertion and deletion requires manipulation: To remove a node, just browse the linked list…
Q: Do condition variables have any function? Exactly what is the purpose of a monitor? What do…
A: Introduction: Condition variables: Method data is loaded in software in page-sized chunks. The CPU…
Q: When a process is terminated, identify the procedure that is responsible for creating free memory…
A: Fragmentation: When fragments are allocated, some space is saved; nevertheless, after the procedure…
Q: Please tell briefly how Android and iOS QA advocates enable the automation of items in e-commerce…
A: Introduction: Please tell briefly how Android and iOS QA advocates enable the automation of items in…
Q: Why does Pinterest consider Google as a major competitor? What is the rationale behind Pinterest's…
A: Introduction: Pinterest's initial goal of sharing has been overtaken by a concentration on search,…
Q: What factors contributed to the advancement of computer security into its current state?
A: Introduction: Computer security, often known as cybersecurity, refers to the safeguarding of…
OOPs
In today's technology-driven world, computer programming skills are in high demand. The object-oriented programming (OOP) approach is very much useful while designing and maintaining software programs. Object-oriented programming (OOP) is a basic programming paradigm that almost every developer has used at some stage in their career.
Constructor
The easiest way to think of a constructor in object-oriented programming (OOP) languages is:
Step by step
Solved in 2 steps with 1 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 methodCreate a classstudent which includes parameters roll_no, name and address and consider as super class.Then create sub class test with parameters marl1, mark2, mark3 and mark4. Then create another sub class result with parameters total_marks, percentage and grade. Apply multi level inheritance. Here Student class is the super class for test class and test class is super class of resultclass. Implement a java application in which obtain the details roll_no, name, address, marl1, mark2, mark3 and mark4 from user side andthen print total_marks, percentage and grade.StudentàtestàresultNOTE: Don't Copy from the Chegg, Use this method for a given question 3 LockADT – Show the interface and all abstract methods LockDataStructureClass – Show the following methods: default constructor, overloaded constructor, copy constructor, setX, setY, setZ, alter (change the lock’s combination to the numbers passed) turn (use for loops to show the dial turning), close (locks the lock), attempt (tries to unlock the lock – calls turn( ), inquire (locked or unlocked), current (returns the number the dial is pointing to), toString LockClientDemoClass – You should have a Lock object instantiated and a menu method that displays: 1: set lock combination 2: close lock 3: check status 4: attempt to open lock 5: check what the dial is currently pointing at 6: exit the program Example of turning the lock: First number (17): 0 39 38 37 … 0 39 38 …17 Second number (26): 17 18 19 ... 38 39 0 1 2 … 17 18 19 20 21 22 23 24 25 26 Third number (9): 26 25 24 23 …. 12 11 10 9 (go directly to the…
- Python:Please read the following. The Game class The Game class brings together an instance of the GameBoard class, a list of Player objects who are playing the game, and an integer variable “n” indicating how many tokens must be aligned to win (as in the name “Connect N”). The game class has a constructor and two additional methods. The most complicated of these, play, is provided for you and should not be modified. However, you must implement the constructor and the add_player method. __init__(self,n,height,width) The Game constructor needs to initialize three instance variables. The first, self.n, simply holds the integer value “n” provided as a parameter. The second, self.board, should be a new instance of the GameBoard class (described below), built using the provided height and width as dimensions. The third, self.players, should be an initially empty list. add_player(self,name,symbol) The add_player method is provided a name string and a symbol string. These two values should be…Urgent Quick Question Write an equals method for the StepsFitnessTracker class that tests whether the one object is equal to another object that is passed as an argument (Object otherObject). The Object superclass provides an equals method that tests if two object references are equal. Your new equals method should override the Object equals method, and should test the following: • Return true if the current (this) object, and otherObject are identical references (hint: you can use the == operator for this). • Returns false if otherObject is null. • Returns false if the current (this) object and otherObject have different classes (hint: you can use the getClass() method provided by the Object superclass, see the Java 8 API documentation for details). • Casts otherObject to a StepsFitnessTracker, and tests for equality of each instance variable1 , if the instance variables are the same the method should return true. Now write an equals method for the DistanceFitnessTracker and…Urgent Quick Question Write an equals method for the StepsFitnessTracker class that tests whether the one object is equal to another object that is passed as an argument (Object otherObject). The Object superclass provides an equals method that tests if two object references are equal. Your new equals method should override the Object equals method, and should test the following: • Return true if the current (this) object, and otherObject are identical references (hint: you can use the == operator for this). • Returns false if otherObject is null. • Returns false if the current (this) object and otherObject have different classes (hint: you can use the getClass() method provided by the Object superclass, see the Java 8 API documentation for details). • Casts otherObject to a StepsFitnessTracker, and tests for equality of each instance variable1 , if the instance variables are the same the method should return true. 1 To test for equality of each instance variable, you might want to…
- Python Code please Point of Sale Write a program that will manage the point of sale in a store. Build the ItemToPurchase class with the following: Attributes item_name (string) item_price (int) item_quantity (int) Default constructor Initializes item's name = "none", item's price = 0, item's quantity = 0 Method print_item_cost() Example of print_item_cost() output:Bottled Water 10 @ $1 = $10 Extend the ItemToPurchase class to contain a new attribute. item_description (string) - Set to "none" in default constructor Implement the following method for the ItemToPurchase class. print_item_description() - Prints item_description attribute for an ItemToPurchase object. Has an ItemToPurchase parameter. Example of print_item_description() output:Bottled Water: Deer Park, 12 oz. Build the ShoppingCart class with the following data attributes and related methods. Note: Some can be method stubs (empty methods) initially, to be completed in later steps. Parameterized constructor…Design FullTimeEmployee class and PartTimeEmployee class which inherit Employee class so that the following code provides the expected output.[addFullTimeEmployee() and addPartTimeEmployee() methods should work any number of parameters assuming that the parameter number will be an even number and greater than 1]class Employee: total_employee = 0 def __init__(self, name, work_hour): self.name = name self.work_hour = work_hour def __str__(self): s = “Department: ”+self.name+", Work hours: "+str(self.work_hour) return s# Write your codes here.# Do not change the following lines of code.p1 = FullTimeEmployee(“Finance”, 40 )print("=================================")p1.addFullTimeEmployee(“Bob”, 12, “Carol”, 18, “Mike”, 15)print("=================================")print(p1)print("=================================")p2 = PartTimeEmployee(“Others”, 25)print("=================================")p2.addPartTimeEmployee(“David”, 12, “Simon”,…Complete the Login class implementation. For the class method check_credentials(), you will need toaccept two arguments - login and passwd. Do not forget about the self argument. This class method will set two local variables simlogin = "Test" and simpass = "test1234".These variables will simulate the correct login and password for the credential check process. The method will receive the login and password from the user and check it with Test and test1234. If the user sent the correct credentials output: Successful login! If the user sent the correct login name but the wrong password output: Login name is correct, incorrect password! If the user sent an incorrect login name but the correct password output: Login name is incorrect, password accepted! If the user sent both incorrect login name and password output: Unsuccessful login attempt! The class method will return a boolean success variable as True if the login was successful. Using if __name__ == "__main__" to control the flow of…
- complete the Login class implementation. For the class method check_credentials(), you will need toaccept two arguments - login and passwd. Do not forget about the self argument. This class method will set two local variables simlogin = "Test" and simpass = "test1234".These variables will simulate the correct login and password for the credential check process. The method will receive the login and password from the user and check it with Test and test1234. If the user sent the correct credentials output: Successful login! If the user sent the correct login name but the wrong password output: Login name is correct, incorrect password! If the user sent an incorrect login name but the correct password output: Login name is incorrect, password accepted! If the user sent both incorrect login name and password output: Unsuccessful login attempt! The class method will return a boolean success variable as True if the login was successful. Using if __name__ == "__main__" to control the flow of…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.A. Create a BankAccount class. We want to be able to create a new bank account, make deposits and withdrawals, and check the balance. Each bank account created should receive a unique account id, numbered sequentially 1001, 1002, 1003, and so on. We should be able to change the name on the account. We should also be able to retrieve the account id and the name on the account. Provide a constructor that takes a name for the account as a parameter. Remember that a constructor has the same name as the class. The constructor should initialize all of the instance variables. What does the class need to remember? Those are the instance variables. There should be three. Provide the following methods: public double getID() gets the account id of this BankAccount public double getBalance() gets the balance of this BankAccount public String getName() gets the name of this BankAccount public void setName(String newName) sets a new name for this BankAccount public void deposit(double…