You’ve been hired to work on a web site that maintains customer reviews of products. The main data is stored in the following ta
bles: Product(Product ID, Product Name, Description) Reviewer(Reviewer ID, Reviewer Name, City) Review(Reviewer ID, Product ID, Rating, Comment) The tables contain the following information: Product: unique product id (Product ID), product name (Product Name), and product description. All strings. • Reviewer: unique reviewer id (Reviewer ID), and reviewer name (Reviewer Name) and city, also all strings. • Review: One entry for each individual review giving the reviewer and product ids, an integer rating in the range 0‐5, and the reviewer comment, which is a string.
A) Write a SQL query that returns the number of reviewers in each distinct city. The results should list the city name and the number of reviewers in that city, and should be sorted alphabetically by city name.
B) Write a SQL query that returns the average of the reviews for each reviewer and names of the reviewers for all reviewers that have an average review (of all their reviews) of less than or equal to 2.
So, to help explain what a computer system or help gain an understanding, I am going to use a analogy. What I mean by that is how a computer system may be compared to a automobile.
An automobile is made up of a variety of pieces, including an engine, gearbox, axles, wheels, a battery, gears, and other electronics. The components are all interconnected within a frame and function as a whole to enable the car to travel down a road. There is also a driver. By interacting with or physically directing the steering wheel to do certain actions, such as driving straight ahead, turning left, or turning right, the driver controls the vehicle.
The computer system is like a car in that it merely consists of many pieces. The hardware consists of a CPU, memory cards, storage, and other electrical components. The hardware is arranged in a frame and interconnected so that the user may command the computer to do particular tasks. The user and the computer system must interface or communicate. The computer system features a keyboard and mouse instead of a steering wheel, which enables the user to interact with or direct the computer to do activities like opening a file, creating a document, or printing a page.
This comparison should help you understand what a computer system better.
In popular object oriented programming languages like C/C++, The implementation file (source file) of a class is used to hold the code implementaion of the method(s) of the class, this is helpful for seperating interface and method implementation. When this seperation exists, header files will be used to declare all the methods and fields of the class.
In this way, the implementaion file will hold the actual source code of the methods that are declared in the header file and will have a line to include its associated header file. A major advantage of seperating code in this way is the enhancement of better code organization and code re-use