Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a Python program to accomplish the following tasks: Create a class named CPU that includes the following: - three properties: cacheSize, numOfCores, and type
Write a Python program to accomplish the following tasks:
- Create a class named CPU that includes the following:
- three properties: cacheSize, numOfCores, and type.
- two methods:
- printAll() that prints all cpus information.
- increaseCashSize () that takes one argument called size. The method adds the value of size to the Cache size.
B. Create a class named NoteBook that includes the following:
- three properties:
- property named brand
- property named cost
- property named cpu: The value of the cpu should be set by default as a composition of the CPU class.
- two methods:
- printAll(): that prints all noteBooks information.
- getCost: that return the cost of the notebook
- Create an object of type CPU with cashSize =4, numOfCores =8, and type = Quad-core, and call printAll and increaseCashSize methods
- Create an object of type LapTop with cashSize =4, numOfCores =8, and type = Quad-core, cost=1100, and brand=Dell, and call printAll 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