A corpora tion has six divisions, each respons ible for sales to differen t geograph ic loca tions. Design a Di vSal es class that keeps sales data for a division, with the following members: • An array with four elements for holding four quarters of sales figures for the division. • A private stat ic variable for holding the tota l corporate sales for all divisions for the entire year. • A member function that takes four arguments, each assumed to be the sales for a quarte r. The value of the arguments should be copied into the array that holds the sales data . The total of the four argumen ts shou ld be added to the static variable that holds the tota l yearly corpora te sales. • A function that takes an integer argument within the range of Oto 3. The argument is to be used as a subscript into the division quarterly sales array . The function should return the value of the array element with that subscript. Write a program that creates an array of six Di vSal es objects. The program should ask the user to enter the sales for four quarte rs for each division. After the data is entered, the program should display a table showing the division sales for each quarter. The program should then display the total corporate sales for the year.

Respuesta :

toxci

An information system performs three sets of services:It provides for data collection, storage, and retrieval.It facilitates the transformation of data into information.It provides the tools and conditions to manage both data and information.Basically, a database is a fact (data) repository that serves an information system.  If the database is designed poorly, one can hardly expect that the data/information transformation will be successful, nor is it reasonable to expect efficient and capable management of data and information.The transformation of data into information is accomplished through application programs. It is impossible to produce good information from poor data; and, no matter how sophisticated the  application programs are,it is impossible to use good application programs to overcome the effects of bad database design.In short: Good database design is the foundation of asuccessfulinformation system.Database design must yield a database that:Does not fall prey to uncontrolled data duplication, thus preventing data anomalies and the attendant lack of data integrity.Is efficient in its provision of data access.Serves the needs of the information system.The last point deserves emphasis: even the best-designed database lacks value if it fails to meet information system objectives. In short, good database designers must pay close attention to the information system requirements.Systems  design  and  database  design  are  usually  tightly intertwined and are often performed in parallel. Therefore,  database  and  systems  designers  must  cooperate  and  coordinate  to  yield  the  best  possible information system.What is the relationship between the SDLC and the DBLC?The SDLC traces the history (life cycle) of an information system. The DBLC traces the history (life cycle) of a database system. Since we know that thedatabase serves the information system, it is not surprising that the two life cycles conform to the same basic phases.

 

Chapter 9 Database Design298Suggestion: Use Figure 9.13 as the basis for a discussion of the parallel activities.What basic database design strategies exist, and how are such strategies executed?Suggestion: Use Figure 9.14 as the basis for this discussion.There are two basic approaches to database design: top-down and bottom-up.Top-downdesign begins by identifying the different entity types and the definition of each entity's attributes.In other words, top-down design:starts by defining the required data sets and thendefines the data elements for each of those data sets.Bottom-updesign:first defines the required attributes and thengroups the attributes to form entities.Although  the  two  methodologies  tend  to  be  complementary,  database  designers  who  deal  with  small databases  with  relatively  few  entities,  attributes,  and  transactions  tend  to  emphasize  the    bottom-up approach. Database designers who deal with large, complex databases usually find that a primarily top-down design approach is more appropriate.In spite of the frequent arguments concerning the best design approach, perhaps the top-down vs. bottom-up distinction is quite artificial. The text's note is worth repeating:NOTEEven if a generallytop-down approach is selected, the normalization process that revisesexisting table structures is (inevitably) a bottom-up technique. E-R models constitute a top-down process even if the selection of attributes and entities may be described as bottom-up. Since both the E-R model and normalization techniques form the basis for most designs, the top-down vs. bottom-up debate may be based on a distinction without a difference.