Computers and Technology
Computers and Technology, 20.09.2020 16:01, tina7659

Now that your tables are designed and created, it's time to start writing the code you will use to interface with them. First, let's start by reviewing the DAO - Data Access Objects - provided in the starter kit to deal with Books. We see that the BookDAO. java file is just an interface, which is implemented by the BookDAOImpl class. In the DAOUtilities class, we have a method that will instantiate and return a new instance of BookDAOImpl for us... but it returns it inside a BookDAO interface reference. Why is that?
Well, recall that an interface is capable of calling its own declared methods against a subclass reference that has those methods defined. You should also recall that just like any polymorphic reference, you can use a single superclass reference for multiple types of subclass objects. In this way, we save ourselves some time and protect our application in the face of future upgrades.
Consider a situation in which the PubHub application is undergoing another update - this time, to add a VIP tagging system. VIP users can have a separate tagging system, but their database interactions are otherwise exactly the same as a standard user. In this case, we might still use the same TagDAO interface to implement with our VipTagDAOImpl class. Then, no change is required in the code which calls the tagging database methods. We can use the same TagDAO interface reference to manipulate both a TagDAOImpl object and and VipTagDAOImpl object.
Your final task this week, is simply to chart out what kind of SQL queries your tagging system might need to run. From there, create a DAO interface which declares the methods that will call those queries. You won't need to implement them yet, that's a task for the next dive.
You will need, at minimum:.
1. A method to add a tag to a book, given the tag name and a reference to a book (either a Book reference variable or just an ISBN-13)
2. A method to remove a tag from a book, given the tag name and a reference to a book (either a Book reference variable or just an ISBN-13)
3. A method to retrieve all tags that have been added to a given book
4. A method to retrieve all books that have a given tag. Hint: This will require either a SQL JOIN statement or a nested query.

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 17:30, cesargarcia17671
Type the correct answer in the box. spell all words correctly. under which key category do the page up and page down keys fall? page up and page down keys fall under the keys category.
Answers: 3
image
Computers and Technology, 23.06.2019 02:50, CrusaderLord
Define a class named movie. include private fields for the title, year, and name of the director. include three public functions withprototypes void movie: : settitle(cstring); , voidmovie: : setyear(int); , void movie: : setdirector(string); . includeanother function that displays all the information about a movie. write a main() function that declares a movie object namedmyfavoritemovie. set and display the object's fields. this is what i have but know its wrong since it will notcompile: #include#includeusing namespace std; //class declarationclass movie{private: string movietitle ; string movieyear; string directorname; public: void settitle(string title); void setyear(string year); void setdirector(string director); void displayinfo(); }; //class implementationvoid movie: : settitle(string title){ movietitle = title; cout< < "what is the title of themovie? "< > temp; myfavoritemovie. settitle(temp); cout< < "enter movie year"< > temp; myfavoritemovie. setyear(temp); cout< < "enter director'sname"< > temp; myfavoritemovie. setdirector(temp); //display all the data myfavoritemovie. displayinfo(); system("pause"); return 0; this code is not entirely mine someone on cramster edited my firstcode but then i try manipulating the new code and i still get acompile error message : \documents\visual studio 2008\projects\movie\movie\movie. cpp(46) : error c2679: binary '< < ' : no operator found which takes aright-hand operand of type 'std: : string' (or there is no acceptableconversion)c: \program files (x86)\microsoft visual studio9.0\vc\include\ostream(653): could be'std: : basic_ostream< _elem,_traits> & std: : operator< < > (std: : basic_ostream< _elem,_traits> & ,const char *)w
Answers: 1
image
Computers and Technology, 23.06.2019 10:00, lamanihill
Now, open this passage to read about fafsa requirements. describe the information you will need to provide in order to complete a fafsa. list at least three of the required documents you must include.
Answers: 3
image
Computers and Technology, 24.06.2019 02:30, talia43
Assume a class window with accessor method getwidth that accepts no parameters and returns an integer. assume further an array of 3 window elements named winarr, has been declared and initialized. write a sequence of statements that prints out the width of the widest window in the array.
Answers: 2
Do you know the correct answer?
Now that your tables are designed and created, it's time to start writing the code you will use to i...

Questions in other subjects:

Konu
Mathematics, 22.10.2019 09:00
Konu
Mathematics, 22.10.2019 09:00