subject

Objective The objective of this project is to give you some experience working with DVD objects created from a user-defined DVD class and passing DVD objects to functions that manipulate them. The objects you will model in this project will be software DVDs. You will create several DVD objects and then load information into their instance variables. All of these DVD objects will then be passed to a global function that displays the instance variable values of each DVD object it receives. All of these DVD objects will then be passed to another global function that computes and displays the total cost as well as the average cost for the DVDs it receives. Finally, a function that receives a single DVD object will be called twice – once for each of the two DVD objects. This function will allow the user to interactively change user-selected data items in the single DVD object passed to this function.
This project represents a hybrid solution which incorporates both objects of a Python class as well as global, free-standing, C-like functions that process object(s) passed to them. Hybrid solutions such as this are actually the most common solutions found in practice since the world typically cannot be ENTIRELY modeled 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 variable value
getTitle(self): . . .
// Return self.__Title instance variable value
setType(self NewType): . . .
// Validate and change the self.__DVD_Type instance variable value
getCost(self): . . .
// Return the value in the self.__Cost instance variable value
loadInformation(self): . . .
// Interactively prompt-for, input, and set all instance variables
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 its instance variable values in a nicely-formatted list (or table).
Prototype:
def (DVD1, DVD2, DVD3): . . .
Pseudo code:
Retrieve and sum the individual costs of the DVD objects and display the total cost and then display the average cost
Prototype:
def ChangeDVD(A_DVD): . . .
Pseudo code:
Interactively change the instance variable value of the passed-in DVD object. For the current value of each instance variable be sure to FIRST display this value before asking your user whether he/she wants to change this value. If so, the prompt-for, input, validate(where necessary) and then save the new instance variable value.
The main() function will:
Declare several (at least three) individual DVD objects, e. g.,
DVD1 = DVD(, , ) // etc.
Call the global function, Display_DVD_Information(…), to display the contents of each of the DVD objects passed to this function. This will demonstrate that your DVD constructor works as you implemented it. Load each DVD object with information of your choice by calling member function, LoadInformation(), on each DVD object, e. g.,
DVD1.LoadInformation(); // etc.
Call the global function, Display_DVD_Information(…), again to display the contents of each of the DVD objects passed to this function after you have loaded each DVD object with user-selected values.
Next, call the global function, (…) to compute and display, 1) the total cost and then, 2) the average cost of the DVD objects passed to this function.
Call global function, ChangeDVD(…), for each of the first two DVD objects.
Call global function, Display_DVD_Information(…), again to see the changes just made to the first two DVDs.
Call global function, (…), again to see how the total and average costs have changed.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 05:30
The total revenues for a company are $150,223 and the total expenses were 125,766. if you are calculating the net income, which of these spreadsheets would you use? insert a spreadsheet with $150,223 in cell b2 and 125, 766 in cell b3. enter a formula =b2-b3. the formula should be showing in the formula bar. insert a spreadsheet with $150,223 in cell b2 and 125, 766 in cell b3. enter a formula =b2+b3. the formula should be showing in the formula bar. insert a spreadsheet with $150,223 in cell b2 and 125, 766 in cell b3. enter a formula =b2/b3. the formula should be showing in the formula bar. insert a spreadsheet with $150,223 in cell b2 and 125, 766 in cell b3. enter a formula =b2*b3. the formula should be showing in the formula bar.
Answers: 3
question
Computers and Technology, 22.06.2019 17:00
1. so if i wanted to build a linux server for web services(apache) with 1cpu and 2 gb of memory.-operating at 75% of memory capacity2. a windows server with 2 cpu/ 4gb memory- operating at 85% of memory capacity3. a storage server with 1 cpu/ 2gb memory- operating at 85% of memory capacityhow much memory do i have to add for each server.so that the utilization rate for both cpu and memory is at a baseline of 60%."the details for the cpu like its processor or the memory's speed isnt to be concerned" yeah i kept asking my teacher if he's even sure about the but the whole class seems to be confused and the project is due in 3 days..this is a virtualization project where i have to virtualize a typical server into an exsi hypervisor.
Answers: 2
question
Computers and Technology, 22.06.2019 18:00
Martha is a healer, a healthcare provider, and an experienced nurse. she wants to share her daily experiences, as well as her 12 years of work knowledge, with people who may be interested in health and healing. which mode of internet communication can martha use?
Answers: 3
question
Computers and Technology, 23.06.2019 00:30
Pl i need the answer now ! which one of the following is considered a peripheral? a software b mouse c usb connector d motherboard
Answers: 1
You know the right answer?
Objective The objective of this project is to give you some experience working with DVD objects cre...
Questions
question
Mathematics, 18.05.2021 22:00
question
English, 18.05.2021 22:00
Questions on the website: 13722363