Objective Objective Project Give Experience Working Dvd Objects Created User Defined Dvd C Q43799120
Objective
The objective of this project is to give you some experienceworking with DVD objects created from a user-defined DVD class andpassing DVD objects to functions that manipulate them. The objectsyou will model in this project will be software DVDs. You willcreate several DVD objects and then load information into theirinstance variables. All of these DVD objects will then be passed toa global function that displays the instance variable values ofeach DVD object it receives. All of these DVD objects will then bepassed to another global function that computes and displays thetotal cost as well as the average cost for the DVDs it receives.Finally, a function that receives a single DVD object will becalled twice – once for each of the two DVD objects. This functionwill allow the user to interactively change user-selected dataitems in the single DVD object passed to this function.
This project represents a hybrid solution which incorporatesboth objects of a Python class as well as global, free-standing,C-like functions that process object(s) passed to them. Hybridsolutions such as this are actually the most common solutions foundin practice since the world typically cannot be ENTIRELYmodeled as objects!
Specifications (minimum)
The DVD class contains the following instance variables:
self.__Title;
// The Name of the DVD
self.__DVDType;
// The Type of DVD
self.__Cost;
// The Cost of the DVD
The ONLY recognized (i.e., legal) software DVD types are,“Game”, “Word”, “Compiler”, “Spreadsheet”, “Dbase”, and“Presentation” (AND, no others!).
The DVD class contains (at a minimum) the following methods:
__init__(self, InTitle, InDVDType, InCost): . . .
// Constructor – initialize instance variables
// with (validated) parameter values
setTitle(selfNewTitle): . . .
// Change the self.__Title instance variable value
setType(self NewType): . . .
// Validate and change the self.__DVD_Type instance variablevalue
getTitle(self): . . .
// Return self.__Title instance variable value
setType(self NewType): . . .
// Validate and change the self.__DVD_Type instance variablevalue
getCost(self): . . .
// Return the value in the self.__Cost instance variablevalue
loadInformation(self): . . .
// Interactively prompt-for, input, and set all instancevariables
listValidDVDtypes(self): . . .
// Support method that displays list of valid DVD types
The global functions are as follows:
- Prototype:
- def Display_DVD_Information(DVD1, DVD2,DVD3): . . .
- Pseudo code:
- For each DVD object parameter, retrieve and display itsinstance variable values in a nicely-formatted list (ortable).
- Pseudo code:
- def Display_DVD_Information(DVD1, DVD2,DVD3): . . .
- Prototype:
- def DisplayTotalAndAverageCosts(DVD1, DVD2,DVD3): . . .
- Pseudo code:
- Retrieve and sum the individual costs of the DVD objects anddisplay the total cost and then display the average cost
- Pseudo code:
- def DisplayTotalAndAverageCosts(DVD1, DVD2,DVD3): . . .
- Prototype:
- def ChangeDVD(A_DVD): . . .
- Pseudo code:
- Interactively change the instance variable value of thepassed-in DVD object. For the current value of each instancevariable be sure to FIRST display this value before asking youruser whether he/she wants to change this value. If so, theprompt-for, input, validate(where necessary) and then save the newinstance variable value.
- The main() function will:
- Declare several (at least three) individual DVD objects,e.g.,
- DVD1 = DVD(<someTitle>, <someDVDType>,<someCost>) // etc.
- Pseudo code:
- def ChangeDVD(A_DVD): . . .
- Call the global function,Display_DVD_Information(…), to display thecontents of each of the DVD objects passed to this function. Thiswill demonstrate that your DVD constructor works as youimplemented it. Load each DVD object with information of yourchoice by calling member function, LoadInformation(), on each DVDobject, e.g.,
DVD1.LoadInformation();// etc.
- Call the global function,Display_DVD_Information(…), again to display thecontents of each of the DVD objects passed to this function afteryou have loaded each DVD object with user-selected values.
- Next, call the global function,DisplayTotalAndAverageCosts(…) to compute anddisplay, 1) the total cost and then, 2) the average cost of the DVDobjects passed to this function.
- Call global function, ChangeDVD(…), for eachof the first two DVD objects.
- Call global function,Display_DVD_Information(…), again to see thechanges just made to the first two DVDs.
- Call global function,DisplayTotalAndAverageCosts(…), again to see howthe total and average costs have changed.
Deliverable(s)
Your deliverable should be a Word document with screenshotsshowing the source code and running results. If the source code istoo long, you may insert your source code files as Packages intothe Word document. You may also login to the class by using abrowser in the AWS, and upload your source code directly. Submit acover sheet with the hardcopy of your work.
Expert Answer
Answer to Objective The objective of this project is to give you some experience working with DVD objects created from a user-defi…
OR