create two derived classes ""videodevice"" and ""diskdevice"" that both inherit from ""device""

Answers

Answer 1

Create two derived classes "VideoDevice" and "DiskDevice" that both inherit from the "Device" class.

Here are the step-by-step instructions:
1. Define the base class "Device":
```python
class Device:
   def __init__(self, model, brand):
       self.model = model
       self.brand = brand

   def get_info(self):
       return f"Device model: {self.model}, brand: {self.brand}"
```
2. Create the first derived class "VideoDevice" that inherits from "Device":
```python
class VideoDevice(Device):
   def __init__(self, model, brand, resolution):
       super().__init__(model, brand)
       self.resolution = resolution

   def get_video_info(self):
       return f"{self.get_info()}, resolution: {self.resolution}"
```
3. Create the second derived class "DiskDevice" that inherits from "Device":
```python
class DiskDevice(Device):
   def __init__(self, model, brand, capacity):
       super().__init__(model, brand)
       self.capacity = capacity

   def get_disk_info(self):
       return f"{self.get_info()}, capacity: {self.capacity} GB"
```
These are the two derived classes, VideoDevice and DiskDevice, inheriting from the base class Device. The VideoDevice class has an additional attribute 'resolution', and the DiskDevice class has an additional attribute 'capacity'. Both classes have their respective methods to retrieve information about the objects.

To know more about python visit:

https://brainly.com/question/30427047

#SPJ11


Related Questions

Match the definition with the keyword it represents

1. Extra funds set aside beyond those necessary to cover operating expenses

2. Basic reasoning for an organization’s existence

3. Interfering in someone’s life for the purpose of saving him or her from risky behavior that could lead to death


A. philosophy or mission statement

B. intervention

C. prudent reserve

Answers

Answer:

1. C

2. A

3. B

Explanation:

1. Prudent reserve: these are extra funds set aside beyond those necessary to cover operating expenses. The main reason for having a prudent reserve is to provide funds to take care of any emergency or unforeseen expenses.

2. Philosophy or mission statement: Basic reasoning for an organization’s existence. This is the fundamental building block on which an organization is founded on and as such it sets the direction for the organization.

3. Intervention: Interfering in someone’s life for the purpose of saving him or her from risky behavior that could lead to death. An intervention typically comes from a superior or guardian and it could be in various forms such as cash, advice, mentorship, admonition, prayers or protection.

Answer:

The person above me is right.

Explanation:

What function does a resource manager in an IDE perform?

A. It's an interface for viewing and organizing files.
B. It's an interface for integrating text and multimedia into a website.
C. It's an environment for tracing and fixing the errors in the source code.
D. It's an environment for running and testing the source code.
E. It's an interface for creating and editing the source code.

Answers

Answer:

I would say D) Its an enviroment for running and testing the source code.

Explanation:

An integrated development environment (IDE) is a software suite that consolidates basic tools required to write and test software.

Developers use numerous tools throughout software code creation, building and testing. Development tools often include text editors, code libraries, compilers and test platforms. Without an IDE, a developer must select, deploy, integrate and manage all of these tools separately. An IDE brings many of those development-related tools together as a single framework, application or service. The integrated toolset is designed to simplify software development and can identify and minimize coding mistakes and typos.

Some IDEs are open source, while others are commercial offerings. An IDE can be a standalone application or it can be part of a larger package.

Answer:

D. It's an environment for running and testing the source code.

Explanation: plato 2023

What are Layers in computer class 7. no scams please​

Answers

Answer:

It means and organisation programming into separate functional components that interact in some sequential and hierarchical way, with each layer usually having an interface only to the layer above it and the layer below it.

Help!!
What’s the inputs and outputs of a printer
And what’s the inputs and outputs of a digital assistant/ Alexa??

Answers

Answer:

Input of printer - text

Output of Printer - text printed on paper

Input & output of digital Alexa - Voice/sound

Explanation:

Input for a printer is the text data entered into any of the file formats that can be printed.

Output of a printer is the text printed on a piece of paper.

Input of a digital assistant is in the form of voice

Output of a digital assistant in the form of sound

What is one thing that makes a website a good website?

Answers

Make sure that your website's name and domain reflect the topic of the site. Bottom Line: Most high-traffic websites have a clear purpose and operate in a particular niche. Make sure that the purpose of your website is clear to visitors and try to stay on topic as much as possible.

How would you describe
"analogous color harmony" to a six year old?

Answers

Answer:

Analogous colours are groups of three colours that are next to each other on the colour wheel, and a tertiary. ... An analogous color scheme creates a rich, monochromatic look. It is best used with either warm or cool colors, creating a look that has a certain temperature as well as proper color harmony.

Explanation:

[4]
) Describe what is involved in the clearing of bank cheques which the bank has collected in the
course of the day.


Plz any answer need it quickly help me if you know

Answers

Answer:

The clearing process begins with the deposit of a cheque in a bank. ... The cheque is passed for payment if the funds are available and the banker is satisfied about the genuineness of the instrument. The cheques that are unpaid are returned to the presenting bank through another clearing called the Return Clearing.

hopes this helps you?????????

Explanation:

Which of the following is an event handler?

scanning a credit card when you shop

displaying a message

clicking a mouse button

moving a mouse

Answers

That which accurately describes an event handler is this:

B. Displaying a message

What is an event handler?

An event handler refers to a system that can be used to verify the input by a user. An event handler can also be used to see the browsing actions and other histories executed by a user.

Displaying a message fits in as an example of an event handler because it is through this means that one can see the input and user actions that were done some time ago. An event handler is a very vital necessity in programming activities. So, option B fits the meaning of an event handler.

Learn more about an event handler here:

https://brainly.com/question/20169706

#SPJ1

Answer:

Displaying a message

Explanation:

Which type of data is shown below?
apple, 0.85
banana, 0.90
peach, 1.50

multiple choice:
structured
unstructured
abstract
integer

THANK PLZ HELP

Answers

Answer:

structured

Explanation:

3. Windows that are viewed as Web pages have
sections. **

Answers

Answer:

when the when the when the add the when are you is id god his gay for your top off jack dafe cafe read line green red whats the answer

Explanation:

5. What is the significance of the EXIT DO and EXIT FOR statements?​

Answers

Answer:

Exit Do transfers control to the statement following the Loop statement. When used within nested Do...Loop statements, EXIT DO transfers control to the loop that is one nested level above the loop where it occurs.

When used within nested For loops, EXIT FOR transfers control to the loop that is one nested level above the loop where it occurs.

Explanation:

I HOPE it can help....

How do you interpret and analyze photographs? What method comes most
naturally to you when interpreting and analyzing photographic works? Identify and
discuss the methods and strategies that you use to interpret and analyze
photographs.

Answers

Answer:

You interpret and analyze photographs by observing detail.

Explanation:

what are the advantages of knowing demographics over psychographics and vice versa?

Answers

It's been said that demographics help you understand who buys your product or service, while psychographics helps you understand why they buy. Another way to put it is that demographics are things that can be observed from the outside, such as age and race, while psychographics are internal attributes or attitudes.

Sans serif typeface is a good choice for
a. printed documents
b.document headings
c. document text
d. document content

Answers

Answer: A Sans-serif font is a good choice for headings and small text where clarity and readability are paramount. A Serif font is good to use on larger blocks of printed text like on a flyer.

Explanation:

Write a program to allow user to perform any of these list operation given in a menu. The menu is: a) Append an element b) Insert an element c) Modify an existing element d) Delete an existing element with a given value e) Sort the list in descending order f) Display the list.

Answers

Answer:

c

Explanation:

Shawn has connected his laptop to a projector and chosen to duplicate his screen to the projector. Which statement is true in this situation regarding the Presenter view?

It will be used by default.
It will not be used by default but can be selected.
It cannot be used.
It must be used.

Answers

Answer:

B. It will not be used by default but can be selected.

Explanation:

PowerPoint application can be defined as a software application or program designed and developed by Microsoft, to avail users the ability to create various slides containing textual and multimedia informations that can be used during a presentation.

Some of the features available on Microsoft PowerPoint are narrations, transition effects, custom slideshows, animation effects, formatting options etc.

Basically, the views that are available on the Microsoft PowerPoint application includes;

1. Slide Sorter.

2. Notes Page.

3. Reading Pane.

4. Presenter view.

Presenter view avails the user an ability to use two monitors to display his or her presentation. Thus, one of the monitors displays the notes-free presentation to your audience while the other monitor lets you view the presentation with notes that you have added to the slides, as well as the navigation and presentation tools.

In this scenario, Shawn has connected his laptop to a projector and chosen to duplicate his screen to the projector. Hence, the statement which is true in this situation regarding the Presenter view is that it will not be used by default but can be selected by the user.

What are the factors that affect self-confidence?

Answers

Answer:

The factors that affect self confidence are not having enough faith in yourself and letting what others say about you put you down

Explanation:

Plz mark brainlest it will help me so much

Which area of government regulations do the Fair Credit and Reporting Act
(FCRA) and the Gramm-Leach-Bliley Act (GLB) relate to?
A. Advertising
B. Health and safety
C. Privacy and security
D. Employment and labor

Answers

Answer:   C. Privacy and security

Explanation:  100% correct

in your own words, explain the FNAF timeline

Answers

Answer:

see shawty problem is, I havent had that phase yet, my cousin would be able to answer this tho

Answer:

God it would take me over a week to type my timeline out-

What is the difference between the casual and consultative conversation? Why is it important for a person to know the difference between the two?​

Answers

Answer:

The answer is below

Explanation:

Casual conversation is a form of conversation that occurs between friends and families. There are no specific rules or manner in which the participants speak to each other. It is otherwise known as Informal Conversation.

Consultative conversation on the other hand is a form of conversation that occurs between people who have a close relationship but not actual friends or families.

For example, people involved in this type of conversation are the likes of Doctors and Patients, Counsellors and Students, etc. It is often considered a Semi-formal conversation.

The reason a person needs to know the difference between the two styles of conversation is for individuals to know how to present and conduct themselves appropriately during the conversation.

Wiliam would like to sort a list of items after the data is already entered
Which method is NOT an available sort option?
number
date
text
symbol

Answers

Answer symbol

Explanation:

Symbol is not an available sort option.

1
Select the correct answer from each drop-down menu.
Correctly identify the following software design concepts.
The following are some commonly used software design concepts:
-structural partitioning
-control hierarchy
-Modularity
-Abstraction
refers to the concept that software architecture has the ability to divide into modules and that each
module can be examined independently.
-Refinement
-Modularity
-Abstraction
-Control hierarchy
is a process that elaborates on each design component until it reaches the coding details.
-Software procedure
-Structural partitioning
-Data Structure
allows designers to split a program structure horizontally and vertically.
-Software architecture
-Structural partitioning
-Modularity
-Data Structure
represents logical relationships between individual data elements.

Answers

Answer:

1. Modularity.

2. Refinement.

3. Structural partitioning.

4. Data Structure.

Explanation:

A software development life cycle (SDLC) can be defined as a strategic process or methodology that defines the key steps or stages for creating and implementing high quality software applications. There are six (6) main stages in the creation of a software and these are;

1. Planning.

2. Analysis.

3. Design.

4. Development (coding).

5. Deployment.

6. Maintenance.

One of the most important steps in the software development life cycle (SDLC) is design. It is the third step of SDLC and comes immediately after the analysis stage.

Basically, method design is the stage where the software developer describes the features, architecture and functions of the proposed solution in accordance with a standard. Some of the models or techniques used in the design of a software are;

Modularity: refers to the concept that software architecture has the ability to divide into modules and that eachmodule can be examined independently. Refinement: is a process that elaborates on each design component until it reaches the coding details.Structural partitioning: allows designers to split a program structure horizontally and vertically.Data Structure: represents logical relationships between individual data elements.

In your own words, describe innovation.

Answers

Answer:

Something that revolutionizes a product

Explanation:

Innovation typically means completely change something that makes everyone wow. A example of this would be a car, the innovational car would have fridge in the back seat. (No current cars have this)

Hope this helps and make sure to thank me!

'Using more formatting options improves a document.' Do you agree with this statement? Why or why not

Answers

Answer:

Yes, I agree with the given statement: 'Using more formatting options improves a document.'

Explanation:

Formatting improves the readability of documents for end users.

Formatting features like aligning text vertically and horizontally, changing margin and line spacing change the layout of page in the document that makes a document look more presentable.

So, yes, I agree with the given statement: 'Using more formatting options improves a document.'

Manipulating Images: Which aspect helps you to change the luminescence of your image?

Answers

Answer:

the aspect that help you change the luminescence of your image is iframe

What is the difference, if any, between a social media strategist and a social media specialist?

A. They are very similar occupations, except that social media specialists tend to have more training.

B. A social media strategist determines how an organization will maintain a social media presence, and the specialist creates the content.

C. There is no difference—these are the same job with slightly different titles.

D. A social media specialist determines how an organization will maintain a social media presence, and the strategist creates the content.

Thank you!

Answers

The answer is D you welcome :D

A social media strategist is an expert who is involved in determining the presence of an organization over the social media; whereas, a specialist is involved in creating the content for social media.

What is social media?

The use of computer networks and internet for the purpose of sharing and expressing one's views with the connections over such platform is known as a social media.

A social media strategist, for an organization, will be involved in maintenance of the social media activeness of the organization; whereas, the content for such presence is in the hands of a specialist.

Hence, option B holds true regarding the roles of handling social media of an organization.

Learn more about social media here:

https://brainly.com/question/18958181

#SPJ2

5. Which part regulates the amount of light that passes up toward the eyepiece?
A. stage
C. diaphragm
B.eyepiece
D. revolving nosepiece
the tot​

Answers

Answer:

C. diaphragm

Explanation:

Microscope is very important instrument in biology and use to magnify the specimen or other biological objects.

Eyepiece, stage, diaphragm and  revolving nosepiece are some of the important part of the microscope with different functions. such as Eyepiece carry the Ocular lens that helps to look the specimen, stage allows light to pass through, diaphragm regulates the amount of light reaches the eyepiece, and revolving nosepiece are use to change magnification.

So, Diaphragm controls the light that passes up toward the eyepiece and help in viewing the specimen. Diaphragm is located below the stage and above the condenser.

Hence, the correct answer is "C. diaphragm".

Answer:

C. Diaphragm is the answer.

Explanation:

#Bonjour

this site isn't letting me add my ans and wut should I do?

Answers

You can probably refresh or log out or something.

Please help

Measure the thickness of a razor blade using a vernier caliper and screw gauge. What is the lowest count of these instruments? Which measuring
Instrument is more accurate? You can take multiple blades and stack them together, then measure thickness, and find out the average thickness.

Answers

Answer:

Is this question related to computers and technology?

47. Which of these examples demonstrates good netiquette?
Typing a comment on a video detailing how boring and poorly made it is.

A-Sending an email without a salutation or a signature.

B-Posting a blog article about how stuck-up your peers are.

C-Being straightforward and truthful in all electronic communications.

Answers

Answer:

typing it, on a video detailing how boring and poorly made it is

Explanation:

this is an example of good netiquette because they are criticizing the video game and what good netiquette is is making a comment relevant to the original message. the original message being the video game

Other Questions
The best predictor of your success in the physical activity professions is probably the level of commitment you make in preparing yourself to be the most knowledgeable and highly skilled practitioner possible. Who is responsible for managing existing products through the stages of the life cycle? Pentagon ABCDE and pentagon ABCDE are shown on the coordinate plane below:Which two transformations are applied to pentagon ABCDE to create ABCDE? The 90% confidence interval for the mean one week amusing time in new york city is 5.22 less than mean less than 5.98 minutes construct a 95% confidence interval based on the same data which interval provides more information Simulation tools, environments and frameworks for UAVs and multi-UAV-based systems performance analysis (version 2.0) Whose email address may the agent enter into the applicant information section of LEAN enrollment application A _____ theorist is not interested in broad traits but instead looks at how more specific factors, such as beliefs, relate to behavior and performance. quilzet During the procedure, several wases with cold methanol were done. why was it important to use cold methanol? (In nitration of methyl benzoate) You are training to compete in a 10-kilometer race, and you know the circular running trail atyour park is one mile long. How many times will you need to run this trail in order to run 10kilometers? (round to the nearest whole number) 1 Kilometer=0.62. y demonstrates sensitivity to the needs of the diverse academic, socioeconomic, cultural, disability and ethnic backgrounds of community The liquid portion of the blood that consists of about 55% of the total volume of blood is referred to as ________. stem cells leukocytes plasma platelets A particular company's net sales, in billions, from 2008 to 2018 can be modeled by the expression t2 10t 68, where t is the number of years since the end of 2008. what does the constant term of the expression represent in terms of the context? A(n) ________ is a set of one or more computer programs that serves as an intermediary between the user and the DBMS. Ruth has frequent pain in her joints and back? what type of pain is she suffering from? A 3 kg toy car rests at the top of a 0.45 meter ramp. what is its gravitational potential energy? Questions on a statistics exam are considered good questions provided the questions discriminate between students who havestudied for the exam and those who have not studied. Suppose that on a particular statistics exam the students were separatedinto two gnpups, Group 1 that studied and Group 2 that had not studied. Data was collected and a 95% confidence interval forthe difference in the proportion of those passing the exam from Group 1 that studied and the proportion of those passing theexam from Group 2 that had not studied. The confidence interval turned out to be (0.005, 0.125). Select the best answer.Let P, = the proportion of Group 1 students that passed the examLet Py = the proportion of Group 2 students that passed the examThe data fails to show with 95% confidence that these questions discriminated between those who studied and those who didnot study. We are 95% confident that those who studied had a higher passing rate than those who did not study.We are 95% confident that those who studied had a lower passing rate than those who did not study.None of the above In which two ways did the new deal programs impact the structure of the united states? How can i explain to children what the length of 2000 feet looks like to children 5. Why did the Puritans want to establish a "city on a hill"?O to attract people of all faiths to MassachusettsOto make their city into a center of tradeO to show how the Church of England ought to beOto protect themselves from the Native Americans What your thoughts on christian leadership? what does it mean to you? what should it mean?