Task - 6 Given the following class, write the code for the Sphere and the Cylinder class so that the following output is printed. | OUTPUT: Shape name: Sphere, Area Formula: 4 * pi * r class Shape3D: pi = 3.14159 def _init_(self, name = 'Default', radius = 0): self._area = 0 self._name = name self._height = 'No need' self._radius = radius *r Radius: 5, Height: No need Area: 314.159 ============== ============= Shape name: Cylinder, Area Formula: 2 * pi r * (r + h) def calc_surface_area(self): return 2 * Shape3D.pi * self._radius Radius: 5, Height: 10 Area: 471.2385 def _str_(self): return "Radius: "+str(self._radius) sph = Sphere('Sphere', 5) print('- sph.calc_surface_area() print(sph) print('======-: cyl = Cylinder('Cylinder', 5, 10) print('- cyl.calc_surface_area() print(cyl) ') ==== =========') ')
Q: PLEASE SIMPLIFY THIS BOOLEAN ALGEBRA AND MAKE LOGICAL DIAGRAM y = A'C' + B'C'D + BC'D' + A'BD +…
A: Given Boolean expression is y = A'C' + B'C'D + BC'D' + A'BD + ACD' It has total five input symbols…
Q: Implement the design of the Pikachu and Charmander classes that are derived from the Pokemon class…
A: Algorithm: Define the class Pokemon Create the class constructor Define the following methods…
Q: Understanding computer-related technology is essential for a systems architect. What is your…
A: Because making modifications to any aspect of a given architecture requires a strong comprehension…
Q: For example, what are some instances of admin modules in a software architecture document?'
A: Module. Modules are essentially anything that lives in your filesystem and exists during and after…
Q: What exactly is a bootable USB drive?
A: Justification: A bootable USB drive is a disc that may be used to start a computer and install an…
Q: hat is the difference between a top-down and a bottom formation security?
A: Lets see the solution.
Q: The following logic puzzle is taken from Raymond Smullyan's What is the Name of This Book? Formulate…
A: Solution:: Given that, there are three inhabitants are A,B&C. The Statements are A: I…
Q: What is the advantage of selecting the "Only Create Connection" option when importing data? a) Data…
A: The solution to the given problem is below.
Q: please make a pseudocode out of this source code: #include using namespace std; /* Solve a system…
A: Algorithms when written in general english language is known as Pseudo code.
Q: What is the difference between hashing passwords saved in a file and saving them in a password…
A: Introduction: In this question, we're asked to identify the probable differences between employing a…
Q: 5 2. 3
A: We need to write code in c++ for the given mathematical expression: inorder and pre-order and…
Q: When creating a media query, what sort of operation should a developer use to specify a condition?
A: Intro A media query computes to true when the media type (if specified) matches the device on which…
Q: What is the definition of application partitioning?
A: Introduction: Application partitioning is a word used to describe the process of developing…
Q: Compiling to bytecode rather than machine code has the advantage of saving time.
A: Intro Compiling bytecode Byte code is the intermediate code between the source code and machine…
Q: Describe the difference between an access network and an information network
A: An access network is a user network which connects subscribers to a particular service provider and…
Q: Explain the meaning of the word "software distribution." Explain why shared libraries are commonly…
A: Introduction: Distribution software is a type of application that has grown in popularity,…
Q: Discuss any five downsides of cloud computing that are frequently neglected.
A: Introduction: Cloud computing has the following drawbacks:
Q: What does the term "hardware architecture" mean?
A: Introduction: Simply defined, computer hardware refers to the actual components that enable a…
Q: b) Examine the factors to consider while selecting software. c) Discuss the advantages and…
A: Introduction: The following are important elements to consider while choosing a software package: A…
Q: Nome and dscvibe two (3) major youler tuncfiony. Rou lers are critical Components of Compuer…
A: Routing : Router is a networking device that actually forwards data packets between computer…
Q: List two drawbacks of a computer device that use physical isolation. List two drawbacks of a…
A: Introduction: two disadvantages of a computer device that uses physical isolation are :
Q: A. Smart home device eg.amazon alexa or google home B. Doorbell camera C. Smart lock Question: a.…
A:
Q: Why do certain Linux editions promote sudo while others allow you to log in as the root user? What…
A: Introduction: Puppy Linux, on the other hand, is by far the quickest of all Linux distributions.…
Q: In computer architecture, what is the Extended form of MSI?
A: Introduction: The MSI file format is a package file type for Windows installers. Its name is derived…
Q: What is the difference between hashing passwords stored in a file and saving them in a password…
A: Below is the answer to above question. I hope this will be helpful for you..
Q: Private Sub Form_Load() Text1.Text = "Programming in Visual Basic" Command1.Caption = "Display" %3D…
A: 28 gram ng in Visual Basic Program
Q: Briefly describe the use of implicit and explicit output in SAS programming. What is the purpose of…
A: the solution is as given below :
Q: What kind of systems lend themselves best to agile development?
A: Intro The agile technique is a product advancement strategy that is individual-centered…
Q: Pointers with Arrays and Function Please use C Language to code 1. Write a program that accepts the…
A: Input : Input array of 5 values for blood pressure. Output : Find the type of blood pressure.
Q: Describe and use the procedures for creating, viewing and managing disks, directories and files in…
A: Introduction Describe and use the procedures for creating, viewing and managing disks, directories…
Q: What is the best way to discuss the features of a monitor?
A: Introduction: Generally speaking, a monitor is an electrical visual computer display that consists…
Q: What is MVC and how does it work? How will you use MVC in the stock exchange industry as an example?…
A:
Q: In Java. Make a snake game, you can incorporate abstract classes, but not threads. Add a…
A: SnakeGame.java public class SnakeGame{ public static void main(String[] args) { new GameFrame();…
Q: Normally, how are the untrusted network, the firewall, and the trustworthy network connected?
A: Introduction: While the Internet or another portion of a public access network is frequently used as…
Q: Explain what a Card cage is: it is a structure in which circuit boards can be attached.
A: Given data : What role does the operating system play in support of middleware? Also, network and…
Q: What is the difference between hashing passwords stored in a file and saving them in a password…
A: Major difference between hashing and encryption is that Encryption is a two-way function where data…
Q: Problem 7.1 Give a vector containing N real-valued random numbers, write a py-file to calculate how…
A: #use numpy library #use random.uniform of numpy import numpyn=int(input())a =…
Q: Which of the following is true about Interface? Select one: O a. It is use to model multiple…
A: Answer:- d. All of these Explanation:- Interfaces has following property in java:- It is used to…
Q: What is the difference between hashing passwords stored in a file and saving them in a password…
A: Introduction: We are requested in this question to explain the possible differences between hashing…
Q: What are the principles of programming language and how do you describe implementing subprograms in…
A: programming language: Orthogonality or simplicity, available control structures, data types and data…
Q: 1. Biden's Cybersecurity Executive Order was released in May 2021, what is it? Explain how Section 2…
A: WHAT IS Cyber Security? Cyber security is basically a process of protecting (securing) computers,…
Q: When it comes to computer organization and architecture, abstraction is a concept that is vividly…
A: Start: What does the word "abstraction" mean in terms of computer architecture and organization? We…
Q: One of the major tasks of operating system is to maintain the recently accessed files. There are…
A: We need to find which data structure is used to keep the index of the file in a sequence they are…
Q: What are the most recent security measures for LANs? Give four instances, each accompanied by an…
A: Intro The most common method for protecting a Local Area Network is to place a firewall resource…
Q: tion security begins and ends for an organization? What are the earliest and latest points, under an…
A: Information security, at times abbreviated to InfoSec, is the act of safeguarding information by…
Q: What are the most recent Internet of Things (IoT) threats?
A: Ans : The most recent threats for the Internet of things is Botnets that are a series of internet…
Q: Explain how writing CUDA kernel code to have thread blocks wait for the execution of other thread…
A: Explain how writing CUDA kernel code to have thread blocks wait for the execution of other thread…
Q: ow does it work? How will you use MVC in the stock exchange industry as an example? Any assumptions…
A: Stock Markets and the MVC pattern In this, we will implement a simple example of the MVC…
Q: Explain the concepts of data warehousing and data mining.
A: Introduction: Data warehousing is the process of storing data pertaining to a company's business…
Q: Write a python program that takes the total sales of the product as input and prints the…
A: We need to use if else to solve this problem
solve Using Python 3 and inheritance method. ***DO NOT GIVE THE WRONG ANSWER**** ***DO NOT CHANGE THE CODE****
Step by step
Solved in 2 steps with 1 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…#Python IDLE: #Below is my Pizza class ,how would I write the function described in the attached image,based on this class? # The Pizza class should have two attributes(data items): class Pizza: # The Pizza class should have the following methods/operators): # __init__ - # constructs a Pizza of a given size (defaults to ‘M’) # and with a given set of toppings (defaults to empty set). def __init__(self, size='M', toppings=set()): self.size = size self.toppings = toppings # setSize – set pizza size to one of ‘S’,’M’or ‘L’ def setSize(self, size): self.size = size # getSize – returns size def getSize(self): return self.size # addTopping – adds a topping to the pizza, no duplicates, i.e., adding ‘pepperoni’ twice only adds it once def addTopping(self, topping): self.toppings.add(topping) # removeTopping – removes a topping from the pizza def removeTopping(self, topping):…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. Input Validation: Do not accept negative numbers for monthly rainfall figures.
- #this is a python program #topic: OOP Design the Player class so that the code gives the expected output. [You are not allowed to change the code below] # Write Your Class Code Here player1 = Player() player1.name = "Ronaldo" player1.jersy_number = 9 player1.position = "Striker" print("Name of the Player:", player1.name) print("Jersey Number of player:", player1.jersy_number) print("Position of player:", player1.position) print(“===========================”) player2 = Player() player2.name = "Neuer" player2.jersy_number = 1 player2.position = "Goal Keeper" print("Name of the player:", player2.name) print("Jersey Number of player:", player2.jersy_number) print("Position of player:", player2.position) Output: Name of the Player: Ronaldo Jersy Number of player: 9 Position of player: Striker =========================== Name of the player: Neuer Jersy Number of player: 1 Position of player: Goal KeeperUse Python Programming Language Write code that defines a class named Animal: Add an attribute for the animal name. Add an eat() method for Animal that prints ``Munch munch.'' A make_noise() method for Animal that prints ``Grrr says [animal name].'' Add a constructor for the Animal class that prints ``An animal has been born.'' A class named Cat: Make Animal the parent. A make_noise() method for Cat that prints ``Meow says [animal name].'' A constructor for Cat that prints ``A cat has been born.'' Modify the constructor so it calls the parent constructor as well. A class named Dog: Make Animal the parent. A make_noise() method for Dog that prints ``Bark says [animal name].'' A constructor for Dog that prints ``A dog has been born.'' Modify the constructor so it calls the parent constructor as well. Create a test program that will: Code that creates a cat, two dogs, and an animal. Sets the name for each animal. Code that calls eat() and make_noise() for each animal. (Don't…Case Problem 1 - In previous chapters, you developed classes that work with catering event information for Carly’s Catering. Now modify the Event and EventDemo classes as follows: Modify the Event class to include an integer field that holds an event type. Add a final String array that holds names of the types of events that Carly’s caters—wedding, baptism, birthday, corporate, and other. Include get and set methods for the integer event type field. If the argument passed to the method that sets the event type is larger than the size of the array of String event types, then set the integer to the element number occupied by other. Include a get method that returns an event’s String event type based on the numeric event type. To keep the EventDemo class simple, remove all the statements that compare event sizes and that display the invitation Strings. Modify the EventDemo class so that instead of creating three single Event objects, it uses an array of three Event objects. Get data for…
- This program should be written in Java: Hamburger Joint: 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 attributes except 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 no parameters that adds cheese to the burger and increases the price by 75 cents superSizeIt - this method has no parameters and adds a patty to the burger and increases the price by 1.50 addToppings - this method would present the user with at least five toppings (your choice) stored in an array of String objects. If the user indicates the wants…Complete method __init__ in the following class. (It's only missing an assignment to a radius instance variable.)Language is Java Write a Clothing class with the following attributes: color (e.g., "blue", "green", "orange") displayName (e.g., "Doctor Who hoodie", "slacks") price (e.g., 19.99, 7) Include only one constructor. It should have parameters for each of the attributes and set their values. Additionally, include getters and setters for each of the attributes. Add a driver, name it Purchases, and create 2 Clothing objects. Finally, print out some information about both objects (i.e., print the information from some or all of the getters). For example, if you created a Clothing object whose color was blue, whose display name was work trousers, for a price of 27.99, you could use the getters to print something like this:These work trousers are blue and cost $27.99.Don't hardcode the print statement for full credit, you must use the getters
- solve in python Street ClassStep 1:• Create a class to store information about a street:• Instance variables should include:• the street name• the length of the street (in km)• the number of cars that travel the street per day• the condition of the street (“poor”, “fair”, or “good”).• Write a constructor (__init__), that takes four arguments corresponding tothe instance variables and creates one Street instance. Street ClassStep 2:• Add additional methods:• __str__• Should return a string with the Street information neatly-formatted, as in:Elm is 4.10 km long, sees 3000 cars per day, and is in poor condition.• compare:• This method should compare one Street to another, with the Street the method is calledon being compared to a second Street passed to a parameter.• Return True or False, indicating whether the first street needs repairs more urgently thanthe second.• Streets in “poor” condition need repairs more urgently than streets in “fair” condition, whichneed repairs more…Part I Create an Item class that has madeOf and quality properties. Write proper constructor and other methods required for the class. Part II Create a Bag class that inherits from Item class. Bag varies on prices depending on its quality. Write proper constructor and other methods required for the class. Part III • Create a Store class that has array of Bags. Write proper constructor and other methods required for the class. • Write a method that calculates the total price of Silk Bags in the Store. Note: Do not compress your files, submit only java files.#this is a python program #topic: OOP Write the DemonSlayer class so that the code gives the expected output. [You are not allowed to change the code below] # Write your Class Code here tanjiro = DemonSlayer("Tanjiro", "Water Breathing", 10, 10) print('Name:',tanjiro.name) print('Fighting Style:',tanjiro.style) print(f'Knows {tanjiro.number_of_technique} technique(s) and has killed {tanjiro.kill} demon(s)') print('===================') zenitsu = DemonSlayer("Zenitsu", "Thunder Breathing", 1, 4) print('Name:',zenitsu.name) print('Fighting Style:',zenitsu.style) print(f'Knows {zenitsu.number_of_technique} technique(s) and has killed {zenitsu.kill} demon(s)') print('===================') inosuke = DemonSlayer("Inosuke", "Beast Breathing", 5, 7) print('Name:',inosuke.name) print('Fighting Style:',inosuke.style) print(f'Knows {inosuke.number_of_technique} technique(s) and has killed {inosuke.kill} demon(s)') print('===================') print(f'{tanjiro.name},…