Below is code that defines a Quadrilateral class (a shape with four sides), which has four floating point instance variables that correspond to the four side lengths: import math class Quadrilateral: definit__(self, ab,c,d): self.a = a self.b = b self.c = c self.d = d def perimeter (self): return self.a + self.b + self.c + self.d def area (self): print("Not enough information") def_lt__(self, other): return self.perimeter () < other.perimeter ()
Q: Have you ever witnessed someone being the target of online bullying or harassment? So, what did you…
A: On Facebook, I saw one of my friends being bullied. Every time he publishes something—a joke, a…
Q: Is it the hardware or the software if you don't hear a disk spin and no lights come on when you turn…
A: It's hardware or software, if you don't spin and no light come on when you turn on your computer…
Q: If 4 is stored in cell A1, 2 is stored in cell B1 and 6 is stored in cell C1; which one of the…
A: As, given in the question, values are:- A1 = 4 B1 = 2 C1 = 6 Then, Option a. ”=A1+(C1/B1)” = 4 + (…
Q: When people talk about "parallel processing," what do they really mean?
A: Clinical supervision skills include parallel processing. This aids learning. If you can't process…
Q: We aren't qualified to discuss the inner workings of computer operating systems and the processes…
A: Response: An operating system (OS) is a piece of software that links a user to the hardware of a…
Q: What do scientists studying Al want to accomplish? Give two examples from each of the categories it…
A: INTRODUCTION: Artificial intelligence, or AI, machines (typically computers) attempting to mimic…
Q: There is a distinction between embedded systems and regular PCs. Embedded devices, in contrast to…
A: This question seeks clarification on the key differences between embedded systems and more…
Q: What distinct features of the Internet and the World Wide Web (WWW) distinguish them from one…
A: When compared to one another, this question explains how to the World Wide Web differs from the…
Q: Multiprocessor system identification necessitates an understanding of how such systems function.
A: GIVEN: To recognise multiprocessor systems, they must first be comprehended.
Q: You run a super wing-ding diagnostic tool on your PC, and the results show that your hard drive,…
A: Due to this: You run a super wing-ding diagnostic software on your computer, and it informs you that…
Q: Do two-pass assemblers and compilers have similar worries? Imagine the compilers produce object…
A: Are the same factors applicable to compilers as they are to two-pass assemblers? a. Assume that…
Q: When planning a high-performance open hash table, keep the following in mind:
A: Tableau hashWhen data is hashed, a hash table is used to represent it as an array where each item…
Q: Consider an online holiday booking system. The users can register to book a holiday package. Which…
A: Explanation:- When there are two objects and some information is sent from first object to second…
Q: ll digits input must be a p
A: Dear Student, As no programming language is mentioned, I am assuming it to be Java.
Q: Consider an online holiday booking system. The users can register and log in to book a holiday…
A: So this question is from design pattern and from factory pattern so answer is given below:-
Q: 1) Allocating memory is faster with an implicit free list than with an explicit free list. True or…
A: 1) Allocating memory is faster with an implicit free list than with an explicit free list. Answer:…
Q: The complete bipartite graph Km, n is the simple undirected graph with m + n vertices split into two…
A: Introduction: A bipartite graph, also known as a bigraph, is a collection of graph vertices divided…
Q: Give a specific reason why the following set R does not define an equivalence relation on the set…
A: Equivalence relation is relation which is symmetric, reflexive and transitive.
Q: Consider an online holiday booking system. The users can register to book a holiday package. Which…
A: Given that, There is a Online holiday booking system in which the users can register to book a…
Q: by using the table in the query attached: Show the name, contact number and email address of the…
A: Demo data has been used to solve the query The SQL query is given below with output screenshot
Q: What does the term "cardinality" refer to in an ERD? 1.The information is stored in relation to a…
A: Introduction: This query is from a publication in computer science called Database Management…
Q: Identify the key distinctions between PC OS development and mainframe OS development
A: In essence, they are both operating systems. The hardware and methods of use make up the bulk of the…
Q: Just like regular tape recorders, computer systems have cassette drives that are used to store and…
A: Introduction A standard tape recorder used to save or load computer information is known as a…
Q: Define a main() to play the game as described. All memory must be released before the program exits.…
A: #include <stdio.h> #include <stdlib.h> #include <time.h> #define CARDS 52…
Q: Find out what makes a compiler and an interpreter different from an assembler.
A: Introduction Compiler: High level programmes are translated into machine codes via a compiler, which…
Q: Question 9 nag .Write a program in C# that prompts the user to enter any string phrase and…
A: Step-1: StartStep-2: Print "Enter String"Step-3: Declare varible "str" and take input from the user…
Q: How might one possibly check if a laptop's OS has been compromised?
A: A ransomware message appears. You've been hit with a bogus anti-virus alert. Unwanted browser…
Q: An is the name for the type of server used in two-tier architectures to provide clients with data…
A: The client always occupies space on the first layer of a two-tier architecture.
Q: Consider an online holiday booking system. The users can register to book a holiday package.…
A: We are given a multiple choice question related to inheritance. Given, an online holiday booking…
Q: The device that prints out images is colloquially known as a "plotter." Why?
A: A plotter is a component of the computer technology, similar to a printer, used to print vector…
Q: Do pixel-based coordinates make it more difficult to design graphical user interfaces?
A: The majority of items are controlled by sticks because flat-screen displays are uncomfortable on…
Q: is the decimal value of this 32-bit two’s complement number? 1111 1111 1111 1111 1111 1111
A: Let's See the solution.
Q: ssor(estimators = [ ('ridge_regression', Ridge(random_state=42)), ('sgdregressor',…
A: Hypertune these parameters by using grid search: stack_rgs = StackingRegressor(estimators = […
Q: Explain the issues that arise in wireless networking when one station is obscured and another is…
A: Introduction: Wireless networking is a network in which data is sent from one host to another…
Q: Live backups of physical hard drives may be created using RAID, although this can reduce the usable…
A: I, RAID RAID : In order to increase speed, provide data redundancy, or both, RAID, which stands for…
Q: Is there a particular function of WiFi that contributes to the development of computing?
A: Wi-Fi technology can connect computers, tablets, and mobile phones to the internet. A wireless…
Q: If the word to code with Huffman is ABRACADABRA, what would the huffman tree look like? Write the…
A: Here in this question we have asked If the word to code with Huffman is ABRACADABRA, what would the…
Q: What are the two primary categories of services provided by Internet applications? What sets each of…
A: Describe two distinct categories of services that may be accessed by Internet users via the use of…
Q: Here are some of the most important functions an OS serves:
A: Given The essential duties of an operating system include the following:
Q: There are two main justifications for using layered protocols, and both are persuasive. There must…
A: Introduction: What are the two strongest justifications for using layered protocols? Modifications…
Q: I'm curious as to the two most popular wireless technologies.
A: Introduction: Without the use of cables or wires, wireless technology enables communication between…
Q: Define the term "distributed systems" for me. In what ways might the design of distributed systems…
A: Here is all the information you need about Distributed Systems and the different types of it.…
Q: What is game theory, and why is it relevant to the field of artificial intelligence?
A: Please find the answer below :
Q: Consider an online holiday booking system. The users can register to book a holiday package. Which…
A: When a wrapper is required to hide the complexity of the core object from the client, the proxy…
Q: When sending and receiving emails online, what are the key distinctions between the SMTP, POP, and…
A: Introduction: SMTP sends messages from the sender's email client to the receiver's email server. POP…
Q: You've just been gifted a shiny new monitor by your uncle. You are unable to connect the monitor…
A: LED and liquid crystal displays are the two fundamental types of displays. These identical screens…
Q: How would I write a p adds an amount to ex
A: #include <iostream>#include <vector>using namespace std; int main(){…
Q: The following case studies illustrate how a security framework could be useful during the planning…
A: An organisational setting's rules and procedures for establishing and administering information…
Q: What is the error in the following statement? String two words = "one two"; a.) Single quotes…
A: Variables rule: Variables are not started with digits. Variable does not contain symbols except…
Q: Can "Internet" and "World Wide Web" be used interchangeably, or are there differences between the…
A: Internet: Internet is used to link several computer networks at once. Since the internet is a public…
Step by step
Solved in 4 steps with 2 images
- JAVA PROGRAMMING Write two java files for this assignment: Circle.java, and Main.java. The Circle.java file will create an actual class. The Circle class: MEMBER VARIABLE double radius double x double y Eight methods: Six of the methods are simple: getter’s and setter’s for x, y, and radius. There should also be a getArea method that returns the area (derived from the radius) A doesOverlap method. This method should accept a Circle as an argument, and return true if this circle overlaps the circle that the method was invoked on. [Note: two circles overlap if the sum of their radius' is greater than or equal to the distance between their centers.] void setX(double value) double getX() void setY(double value) double getY() void setRadius(double value) double getRadius() double getArea() boolean doesOverlap(Circle otherCircle) second class will be the typical replit Main class, with its static main method .It should contain code that tests the Circle class. submit code that…Implement the following classes: Polygon numSide: int /* constructor */ /* accessor-mutator */ + area (): double + perimeter (): double Triangle sideA: double sideB: double sidec: double /* constructor */ /* accessor-mutator */ + area () : double + perimeter (): double Create an object for Triangle class and invoke area and perimeter method. Input Format Take triangle sides (sideA,sideB,sideC) as input from user. Constraints For Triangle, sideB+sideC > sideAJava - Access Specifiers Create a class named Circle that has attributes radius, area, and circumference and make the attributes private. Make a public method that sets the radius and a method that prints all attributes. Ask the user input for radius. Note: Use the PI from the math functions Inputs A line containing an integer 10 Sample Output Radius: 20 Area: 1256.64 Circumference: 125.66
- In Python, #Create a basket class, which has a class/static attribute pricelist (string/float dictionary - you can hardcode this) #The constructor should set the name to the name passed as a parameter and initialise the contents (empty) #You should provide an addItem method taking product,quantity which adds this to the contents #and a getQuantity method taking a product, which returns the relevant quantityJava Program The assignment requires two classes. Put all classes in the same package. Class Employee Attributes (all private): id: String lastName: String firstName: String salary: int Methods: Parameterized constructor for initializing a new Employee instance Getters for all attributes toString method to display an Employee's attributes (See output of executable below) Executable Class Create an array of at least eight Employee objects. Be sure to use many with identical last names, but don't order them by name in the array. Create an ArrayList from the array. Sort the ArrayList first by last name and then by first name. Using the forEach method and a lambda expression, print all employees alphabetically sorted by name. Create a LinkedList from the ArrayList. Create an iterator capable of cycling both forward and backward through the LinkedList. Iterate forward through the LinkedList without generating any output. Then iterate backwards through the LinkedList to print…Using java Hamburger ClassWrite a Hamburger class with the following six attributes:• bun - the type of bun the burger will be on• patties - the number of patties on the burger• cheese - whether or not the burger will have cheese• price - the price of the burger• toppings - an array of five toppings; it will need to start empty Write getters/setters for all attributesexcept the toppings array.Your constructor should create a single on white with no cheese and no toppings with a price of $2.99.Your class should include the following methods in this order, please: addCheese - this method has noparameters that adds cheese to the burger and increases the price by 75 centssuperSizeIt - this method has no parameters and adds a patty to the burger and increases the price by 1.50addToppings - this method would present the user with at least five toppings (your choice) stored in an array of Stringobjects. If the user indicates the wants the item, store the String in the toppings array. There…
- Computer Science You are required to develop a small chatting application where two or more friends can communicate each other through messages. Create a class Message which has Date d, and message (string). Provide getters/setters, constructors, toString. Create a class Friend having String name, String contact, email and ArrayList of Messages provide getters/setters, constructors, toString addMessage(Message m) method which will add new message to the list. Provide following options to the user using JFrame. Login which will help user login to the application. View Friends (Display List of All Friends) View Messages ( This should display all message of a Friend) Send message (This should ask for friend name and message match the friend name and write that message to the array list).Create a RightTriangle class given the following design: RightTriangle variables: base, height methods: 2 constructors, 1 that set default values and another that accepts to parameters. setBase - changes the base. Requires one parameter for base. setHeight - changes the height. Requires one parameter for height. getBase - returns the triangle base. getHeight - returns the triangle height. area - returns the area of the triangle (1/2bh) given the current base and heightJAVAclass: Main.java, Quadratic.java, TestQuadratic.java Create a class called Quadratic for representing a one-variable quadratic expression of the form: ax2 + bx + c a,b and c here are the coefficients. The class should contain the following methods: * A constructor that accepts values for a, b, and c. * public double getA() * public double getB() * public double getC() * public double evaluate (int x) * will return the value of the expression at point x * public double discriminant() - that will return (b2 - 4ac) * public boolean isImaginaryRoots() - roots are imaginary if (b2 - 4ac) < 0 * public boolean isRealRoots() - roots are real if (b2 - 4ac) >= 0 // these methods can only be invoked if the roots are not imaginary * public float firstRoot() * public float secondRoot() * public boolean isPerfectSquare(); // If the first and second roots are equal * Try to override the toString methods * Write a sample main program that will work as shown below. Example output:…
- JAVA PROGRAM Chapter 7. PC #1. Rainfall Class Write a RainFall class that stores the total rainfall for each of 12 months into an array of doubles. The program should have methods that return the following: • the total rainfall for the year • the average monthly rainfall • the month with the most rain • the month with the least rain Demonstrate the class in a complete program. Main class name: RainFall (no package name) NOTE, THE MAIN CLASS NAME needs to be Rainfall as mentioned above AND IT HAS TO PASS ALL THE TEST CASES WHEN I UPLOAD IT TO HYPERGRADE. THANK YOU Enter the rainfall amount for month 1:\n1.2ENTEREnter the rainfall amount for month 2:\n2.3ENTEREnter the rainfall amount for month 3:\n3.4ENTEREnter the rainfall amount for month 4:\n5.1ENTEREnter the rainfall amount for month 5:\n1.7ENTEREnter the rainfall amount for month 6:\n6.5ENTEREnter the rainfall amount for month 7:\n2.5ENTEREnter the rainfall amount for month 8:\n3.3ENTEREnter the…Assignment:The BankAccount class models an account of a customer. A BankAccount has the followinginstance variables: A unique account id sequentially assigned when the Bank Account is created. A balance which represents the amount of money in the account A date created which is the date on which the account is created.The following methods are defined in the BankAccount class: Withdraw – subtract money from the balance Deposit – add money to the balance Inquiry on:o Balanceo Account ido Date createdCreate an Employee class. Attributes(must be private): Employee has a name and basic_salary Methods:Employee(string, float); //ConstructorAllowances are computed as: float getHouseRent(); //House rent is 45% of the basic pay. float getMedicalAllowance(); //Medical Allowance is 5% of the basic pay. float getConveyanceAllowance(); //Conveyance allowance is 10% of the basic payfloat getGrossPay(); //Salary including rent and allowances{You can implement additional function/s if needed} Then Create an Organization class. Organization has 10 Employees (Hint: You will need an array of pointers to Employee class) Organization can calculate the total amount to be paid to all employees Organization can print the details(name & salary) of all employees Note: Use main,header and functions.cpp to write code.