Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a Python program to accomplish the following tasks: A. Create a class named RamMemory that includes the following: three properties: capacity, speed, and type.

image text in transcribed

Write a Python program to accomplish the following tasks: A. Create a class named RamMemory that includes the following: three properties: capacity, speed, and type. two methods: a) printInfo() that prints all ram's information. b) increaseCapacity () that takes one argument called cap. The method adds the value of cap to the capacity property. B. Create a class named LapTop that includes the following: - three properties: a) property named brand b) property named price c) property named ram: The value of the ram should be set by default as a composition of the RamMemory class. two methods: a) printInfo(): that prints all laptop's information. b) getBrand(): that return the brand of the laptop. C. Create an object of type RamMemory with capacity=16, speed =666, and type=SRAM, and call printInfo() and increaseCapacity () methods. D. Create an object of type Laptop with capacity=16, speed =666, type=SRAM, price=1500, and brand="HP, and call printInfo() and getBrand () method

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Principles Of Multimedia Database Systems

Authors: V.S. Subrahmanian

1st Edition

1558604669, 978-1558604667

More Books

Students also viewed these Databases questions

Question

1. Describe the power of nonverbal communication

Answered: 1 week ago