Task - 6 Given the following class, write the code for the Sphere and the Cylinder class so that the following output is printed. class Shape3D: OUTPUT: Shape name: Sphere, Area Formula: 4 * pi *r pi = 3.14159 def _init_(self, name = 'Default', radius = 0): self._area = 0 self._name = name self._height = 'No need' self._radius = radius Radius: 5, Height: No need Area: 314.159 ====- ==============--== Shape name: Cylinder, Area Formula: 2 * r * (r + h) pi 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)
Q: Which of the following is a feature of Power Query?
A: Solution - In the given question, we have to find the correct answer among the given options.
Q: Q1// write a program in C++, to create a class for calculate the volume of two boxes using class and…
A: According to the Question below the Solution: Output:
Q: Write a C program to copy up to n characters from the string str1 to str2.
A: As per the requirement program is completed. Algorithm: Step 1: Write the main() method Step 2:…
Q: What is the default location for the ISO file when it is produced by default?
A: Introduction: ISO files is additionally known as ISO image. ISO images are utilized for…
Q: Please write in C++ Implement a program that uses quadratic probing in hashing and does NOT use the…
A: #include <iostream>#include <cstdlib>#define T_S 10using namespace std;enum EntryType {…
Q: Compare and contrast the main features of M2M and IoT.
A: Introduction: M2M and IoT do, without a doubt, have certain similarities. Both enable remote access…
Q: Information technology Explain how technology advancements have aided in the enhancement of…
A: Introduction: The link between communication and technology is highly valued by today's businesses.…
Q: computer science - What security flaws could occur while developing a plan of action and milestones?
A: Introduction: The POA&M (Plan of action and milestones) provides a rigorous and systematic…
Q: X. f(x)-2х-е Write the equatior using MATLAB
A: exp is the function used to find e-x and let the result be stored in variable f and the entire…
Q: • Define a void function Sleep) that takes a 2D array of type float Time[5][6] as parameter and…
A: We need to declare M,N globally. Code is in step 2.
Q: What is a real-world parameter's function?
A: IF a function takes arguments during its call then that is called a function parameter.
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: Transferring data contents from the local device (like mobile phone) to a remote server. a.…
A: Question Brief: In this question we need to find out the process of transferring data is called as.…
Q: Data base In each of the six DBLC stages, how is the data dictionary used?In each of the six DBLC…
A: Introduction: The data dictionary is one of the fundamental DBMS components that defines data…
Q: I don't understand r-squared for data why it is important
A: "R squared is a measure in statistical terms, in a regression model, which basically showcase the…
Q: Suppose a movie theater has 36 seats, laid out in a rectangular six rows by six seats. Let the seats…
A: Answer is given below-
Q: The Barber gives you an A sequence of N's length. Let X mean MEX for A sequence. The cook is…
A: Algorithm: Firstly we will take the value of number of test cases t Then we will call mainsolve…
Q: What is the typical lifespan of a system once it has been deployed using agile methodology?
A: The Agile life cycle: The Agile project life cycle is a set of steps where a customer goes into it…
Q: e FOUR (4) main layers of automata theory, and explain each layer briefly. b) Define what is a…
A: Automata Theory is a part of computer science that arrangements with planning dynamic selfpropelled…
Q: Create an interface MessageEncoder that has a single abstract method encode(plainText), where…
A: // MessageEncoder.java public interface MessageEncoder { // encode and returns the given plain…
Q: What Exactly Is an Application Program?
A: Introduction: PROGRAM A programme consists of a set of instructions.It is a minor component of…
Q: Write python code Q1: Write a function that reads all words from a file (.txt) (space separation)…
A: Given data, Write a function that reads all words from a file (.txt) (space separation) and returns…
Q: The chef gives you an A sequence of N's length. Let X mean MEX for A sequence. The cook is…
A: Input/Output Explanation: The initial part of code we will take the input that contains a single…
Q: SOOL Query: SOOL Stands for Salesforce Object Search Language. So, by using this you need to find…
A: SOSL: Salesforce Object Search Language (SOSL) is a Salesforce search language that is used to…
Q: Upon the method you chose, solve one of the below problems: i Mergesort the list…
A:
Q: A projectile is launched at an angle e and speed of u. The projectile travel time t, maximum travel…
A: - We have to code for the projectile. - We will use python here.
Q: What are the different datatypes that may be used in C?
A: Intro Whenever a variable is defined in C, it has to be associated with a certain data type. This…
Q: 6. Find the spanning tree for the following graph starting from A: A G D E F H J I a. Using…
A: Given: We have to find the spanning tree for the following graph staring from A.
Q: What exactly is dynamic memory, and how does it vary from ordinary memory?
A: Intro Computer Memory: Memories are used to store information on computers, and in computer…
Q: Explain why some memory management systems, such as base/bounds and paging, find asynchronous I/O…
A: Introduction: With base/bound and paging, asynchronous I/O is possible.
Q: ferring data contents from the remote source to the local device (like mobile phone)? a.…
A: Transferring data contents from the remote source to the local device (like mobile phone)?…
Q: What is an instantaneous description (ID) of a pushdown automaton (PDA)?
A: Answer the above question are as follows
Q: First create a Query "YourFirstName Customers without contact information" displaying Company Names…
A: Find the required query given as below :
Q: Provide a written statement of any problems you encountered during the normalization process and…
A: Entity relationship diagram (ERD), this is the most widely used technique for data modeling Data…
Q: Assume that the following method is within the KWLinkedList class, what does this method do? public…
A: Let us see the answer below,
Q: Show Static structures and external structures can be initialized. The member initializers must be…
A: The Answer is in given below steps
Q: 3. Equipment that uses RS 232 cables typically connects to a 9 pin port on a PC.The above statement…
A: Equipment that uses RS 232 cables typically connects to a 9 pin port on a PC.
Q: Try to plot the step reponse of a first order plant with PID controller & without PID Controller.…
A: Required: Try to plot the step response of a first-order plant with PID controller & without PID…
Q: Show that the 3-colorability problem of graphs can be reduced to the 3SAT problem in polynomial…
A: Boolean Satisfiability Problem(3SAT) The Boolean satisfiability problem, also known as 3SAT, is a…
Q: h better at data management than Microsoft Excel? Correct answer
A: Microsoft access: Microsoft Access is a database management system (DBMS) from Microsoft that…
Q: Please write python codes to smooth an image by using median filter and Bilateral filter separately.…
A: Here i am writing the code for both filter separately. You can use code and use any input image as…
Q: What are some of the challenges and concerns with connecting devices to the Internet of Things…
A: 1. Erroneous access controlAdministrations presented by an IoT gadget ought to just be open by the…
Q: Explain the GSM architecture and mention the roles for each components?
A: GSM network is an digital mobile telephony system which is being used all around the world for the…
Q: Please compute the difference series of the series below (-999 for not available): T1 T2 T3…
A: We need to compute the difference series of the series given.
Q: algorithms
A: According to the question, we have to find the values of n for which n < 50*log2n So, we have to…
Q: If you double-click on a CSV file in Windowa Explorer, it open automatically in Excel, how else can…
A: The aswer for the given questionis as follows.
Q: What were some of the vulnerabilities in data security and privacy that exposed the Veterans…
A: Introduction: The Department of Veterans Affairs (VA) was one of the first government organizations…
Q: What does the acronym CISSP stand for? Look for the ethical norms that CISSP holders must commit to…
A: According to the question The CISSP proves what it takes to the effectively design and implement or…
Q: What exactly is a poison packet attack, and how does it work? Give two examples of this type of…
A: Introduction: Poison packet assaults are the most prevalent kind of attack in which attackers…
Q: Part 1: Please answer the following questions about the fundamental of cryptography. Each question…
A: Below is the answer to above question. I hope this will be helpful for you..
Solve using Python3 and inheritance method
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 2 images
- #this is a python program #topic: OOP A class has been designed for this question. Solve the questions to get the desired result as shown in the output box. [You are not allowed to change the code below] class Wadiya(): def __init__(self): self.name = 'Aladeen' self.designation = 'President Prime Minister Admiral General' self.num_of_wife = 100 self.dictator = True #Write your code for subtask 1, 2, 3 and 4 here Output: Part 1: Name of President: Aladeen Designation: President Prime Minister Admiral General Number of wife: 100 Is he/she a dictator: True Part 2: Name of President: Donald Trump Designation: President Number of wife: 1 Is he/she a dictator: False Subtask: 1) Create an object named wadiya. 2) Use the object to print the values as shown in part 1 (Also print the sentence Part 1) 3) Use the same object to change and print the values in part 2 (Also print the sentence Part 2) 4) Did changing the instance variable values using the same object,…#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.
- Use 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 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 Keeper
- Complete method __init__ in the following class. (It's only missing an assignment to a radius instance variable.)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…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
- 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.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…#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},…