Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 1: C or C++ The year is 1996 and you are working at a small start up company called Amazon.com, which is primarily in

Question 1: C or C++

The year is 1996 and you are working at a small start up company called Amazon.com, which is primarily in the business of selling books. Design a set of structures in C or C++ to capture information about books.

Three primary structures you should have are Books, Authors, and Publishers, as well as various supporting structures (one example would be struct date).

... look at the structures calling structures credit card example in Week 3 notes and/or the suggested answer on midterm that I provided on our exam. I would suggest that you don't worry about character string sizes ... just use the C++ model

string name; // easy, don't have to worry about size instead of: char name [50]; /* why worry about size with C, use C++ string instead */

... as for book information, if you look in most books, you'll see a copyright page with just about all the information you will need ... also, why not just got to Amazon.com itself and see what information it displays on a given book. How would that information best be stored within a structures. Think of basic structures you would need to build other structures ... date is a good example. For other fields, what is the best type: float, int, character, string, bool, ...

Question 2: HTML

Develop an HTML form that could be used to enter your book information (Books, Authors, and Publishers) into our fictional book database system. Similar to what you did on the midterm. For questions 1-3, feel free to start with the HTML/JavaScript template provided on the midterm.

... use the template provided on the midterm. Expand upon it!

What field information would you enter into a system? Have your form use more then just character text fields ... radio buttons, pick lists, and other elements make your form easier to use and you don't need to do lots of JavaScript checks.

What fields would be mandatory ... which could be left blank? How would a user know what fields are mandatory? Really look at how I graded you midterm and the comments I provided.

Question 3: JavaScript

Add JavaScript processing similar to what you did on midterm to make sure that the information is correctly verified before being sent to the Amazon.com book database.

... you don't need to be too tricky here ... just provide the basic checks to see if a field that should be added is mandatory if desired. Also, use the isNaN function to verify if field value is a number if applicable. Other than that, no need to add any other checks. The template on the midterm provides you with the basic JavaScript checks to get started ... just expand upon it (don't try to create your own template from scratch unless you had prior knowledge before taking this class). Not all fields need to be mandatory ... especially if you make many of then pick lists, radio buttons, and other fields that don't need to be validated (Hint, Hint).

Question 4: XML

Use the Amazon.com web site to query Books that had made the New York Times Best Seller's list. Go to http://www.amazon.com and then Enter Books in the Search where there is a pick list for "All Departments" ... than click the GO button. Once you get there, you will see a link for "NY Times Bestsellers" near the top of the page. Enter information in XML about any five 5 books based on your design in question 1.

... this one is easy ... pick 5 books from the web site above and add XML to capture that information ... just like you did on the midterm.

Question 5: C#

Write a C# program to create a Queue of books for a customer based on the 5 books you found in Question 4. Remove two items from your queue and add three other books from the NY Times BestSeller's list (Hint: Keep it

simple, reuse your C# homework). Now implement a stack (see lecture notes) with your NY Times books as a starting point, add two new items to your stack of books, and then remove three items of your choice. To get full credit, implement as one C# program. Nearly full credit will be granted if you answer it correctly as two C# programs.

... remember our C# homework ... and lecture notes, just about every you need is in them. Just use the queue and stack examples in the notes to get started. I used movies ... but as your homework showed, you can make them handle just about any item. Put the items in the same single class to get full credit.

Question 6: Perl

Use the information about the five books you selected from Question 4 to create a Perl program that will store this information in a Hash of Hashes. Additionally, use at least five or more important attributes (book title, author, ...) about your book to store, and print them out in a nice table like report. If you wish, you could add the XML processing to create the output you will need for Question 4 right in this program.

... use your Perl homework assignment as a guide, you did basically the same thing for your "Teams". Also, review your Perl lecture notes.

Question 8: C++ or Java or Ruby Class (your choice)

Write a class for books based on your design of question 1. Consider information on publisher and authors as well. Create one constructor to create a book object and define getter functions as needed. To make this question

reasonable, you can limit the total of "getter" functions to five (5).

... Just like you did on the midterm but with Books instead of a license ... remember that you have authors and publishers to worry about as well as books. Here is my best HINT to get you started, read through your C++ lecture notes, especially one of those notes :) Keep it simple, don't get too concerned with Structures ... think "string" as a type for many of the class data members. Also, just provide 5 getter functions ... don't go crazy.

Question 9: Design

What methods or actions would you perform on you book data? For example, a useful function would be to Update the Price of a book. List Ten other methods/actions that one would find useful with our Book Class. Think about it in terms of a book, an author, and a publisher.

... no code is needed here, just list out 10 items ... such as "Update the Book Price" ... provide 9 more.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Marketing The Ultimate Marketing Tool

Authors: Edward L. Nash

1st Edition

0070460639, 978-0070460638

More Books

Students also viewed these Databases questions