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, 22.06.2019 12:00, dani19cano
The following function returns a string of length n whose characters are all 'x'. give the order of growth (as a function of n) of the running time. recall that concatenating two strings in java takes time proportional to the sum of their lengths. public static string f(int n) { if (n == 0) return ""; if (n == 1) return "x"; return f(n/2) + f(n - n/2); } options: a) constant b) logarithmic c) linear d) linearithmic e)quadratic f)cubic g) exponential
Answers: 2
image
Computers and Technology, 22.06.2019 13:30, 21megoplin
In which phase does software coding and testing happen in the spiral model? the spiral model does not have a separate testing phase. both, software coding and testing occurs during the phase.
Answers: 3
image
Computers and Technology, 23.06.2019 18:00, taiyana74
Ramona enjoys her job because she is able to kids in an after school program. the work value ramona feels strongest about is a. leadership b. risk c. independence d. work with people select the best answer from the choices provided a b c d
Answers: 1
image
Computers and Technology, 23.06.2019 21:40, jeovontamarley
language consists of basic components, and they are called a. 3; mental images, concepts, and speech b. 2; language acquisition and linguistic relativity c. 3; heuristics, algorithms, and analogies d. 4; phonemes, morphemes, syntax, and semantics e. 2; words and grammar
Answers: 3
You know the right answer?
Serendipity booksellers software development projectâ part 13: a problem-solving exercise
1....

Questions in other subjects: