subject

Serendipity booksellers software development projectâ part 13: a problem-solving exercise
1. convert the bookdata structure to a class. the program currently keeps data about books in a structure called bookdata. convert the structure declaration to a class declaration. the existing member variables should be made private.
2. convert functions to member functions. in chapter 11 you created the following functions for directly accessing or manipulating the member variables of the bookdata structure: settitle setisbn setauthor setpub setdateadded setqty setwholesale setretail isempty removebookbecause the structure is now a class, and the member variables are private, you will need to convert these functions to member functions of the bookdata class.
3. add new accessor functions for retrieving data from the bookdata class. because the bookdata member variables are now private, you will need to add member functions to retrieve their values. add the following functions to bookdata: gettitle: will be used to get the contents of the booktitle array. getisbn: will be used to get the contents of the isbn array. getauthor: will be used to get the contents of the author array. getpub: will be used to get the contents of the publisher array. getdateadded: will be used to get the contents of the dateadded array. getqty: will return the contents of the qtyonhand member. chapter 13 introduction to classesâ©2012 pearson education, inc. upper saddle river, nj. all rights reserved. setwholesale: will return the contents of the wholesale member. getretail: will return the contents of the retail member.4. convert the remainder of the program to use the class. now that bookdata is a class with private member variables, the addbook, lookupbook, deletebook, removebook, and cashier functions must be modified. instead of accessing the private member variables directly, these functions must use the classâs member functions you created in step 2.

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 19:30, davisparker5269
Write a function processpeople() that takes the name of a file as a parameter. each line of the file corresponds to information about a person. in particular a line contains either a name (in the form lastname, firstname with no spaces in it) or a name (lastname, firstname) and a year. the function will process the file, creating a person object for each line in the file. the function will print information about each line as it processes it, as well as appending the new person object into a list. make sure to use person methods to display information rather than recreating the work you did for the first problem. once the entire file has been processed, the function returns the list of person objects created from the file. if the file is empty, the function should return an empty list. if the input file cannot be opened, the function should print a message to that effect and then return an empty list. the following shows what would be displayed for two example files which have been provided in the link. the file none. txt does not exist. note that your function must work on an arbitrary file that consists of valid lines. you cannot assume anything about the file except that it contains lines that have the format described above.
Answers: 2
image
Computers and Technology, 22.06.2019 12:40, Rententen3845
How do i get the most points, without any effort?
Answers: 2
image
Computers and Technology, 23.06.2019 00:20, mmmmaaarriiieeee
The open systems interconnection (osi) reference model: defines standards for many aspects of computing and communications within a network. is a generic description for how computers use multiple layers of protocol rules to communicate across a network. defines standards for wireless local area network (wlan) communication protocols. details the advantages and disadvantages of various basic network cabling options.
Answers: 1
image
Computers and Technology, 24.06.2019 10:00, genyjoannerubiera
In which view can you see speaker notes?
Answers: 1
You know the right answer?
Serendipity booksellers software development projectâ part 13: a problem-solving exercise
1....

Questions in other subjects: