Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

Quickly please

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

Sams Teach Yourself Beginning Databases In 24 Hours

Authors: Ryan Stephens, Ron Plew

1st Edition

067232492X, 978-0672324925

More Books

Students also viewed these Databases questions