Answered step by step
Verified Expert Solution
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.
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started