SophiaPretty

(5)

$14/per page/Negotiable

About SophiaPretty

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Accounting,Algebra See all
Accounting,Algebra,Applied Sciences,Architecture and Design,Art & Design,Biology,Business & Finance,Calculus,Chemistry,Communications,Computer Science,Economics,Engineering,English,Environmental science,Essay writing Hide all
Teaching Since: Jul 2017
Last Sign in: 304 Weeks Ago, 2 Days Ago
Questions Answered: 15833
Tutorials Posted: 15827

Education

  • MBA,PHD, Juris Doctor
    Strayer,Devery,Harvard University
    Mar-1995 - Mar-2002

Experience

  • Manager Planning
    WalMart
    Mar-2001 - Feb-2009

Category > Computer Science Posted 12 Dec 2017 My Price 7.00

Create attribute (class variable), totalInventory = 0.

USE PYTHON 3 ONLY

1. Create a class Inventory.

 

2. Create attribute (class variable), totalInventory = 0.

 

4. Create an __init__ method has the following default values for name, price, quantity:

“Unknown”, 0.0, and 0.  Create instance variables for name, price, and quantity, and total (Hint: use self.total = 0).

Create the following attributes (instance variables) for the class:

 

        String name # holds string data

        price # holds floating point data

        quantity # holds integer data

        total  # holds floating point data

 

5. Create a method named value_stock that will calculate the total as the quantity*price

 

6. Create a method __str__ that returns a string that displays the name and total.

 

7. Instantiate an object flash_drive_8gb with “USB Flash Drive”, 12.99, and 40.

 

8. Call the value_stock method for the flash_drive_8gb object.

 

9.  Print the flash_drive_8gb object

Answers

(5)
Status NEW Posted 12 Dec 2017 07:12 AM My Price 7.00

-----------  ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly

Not Rated(0)