Design a database for an airline. The database must keep track of customers and their reservations, flights and their status, seat assignments on individual flights, and the schedule and routing of...
Fill in the blanks below to complete the following Apache Spark program which computes the number of occurrences of each word in a file. For simplicity we assume that words only occur in lowercase,...
Does it make sense for FAME to use enterprise keys? If so, create the appropriate enterprise keys and revise the relational schema accordingly.
When using the UML to describe a single system, most designers would use __________ . a. A single type of diagram b. At least three types of diagrams c. Most of the available types of diagrams d. All...
You use a ________ diagram when you want to emphasize the files, database tables, documents, and other components used by a systems software. a. State machine b. Component c. Deployment d. Use case
Design a collection of database tables for an online store from which you intend to sell products you handcraft. The data you need to store includes the following attributes: Product number Product...
How does Apache Spark differ from Hadoop?
Why does an information gap still exist despite the surge in data in most firms?
Visit an organization that has implemented a database approach and interview individuals there about the security measures they take routinely. Evaluate each of the following at the organization: a....
At a top level, what are the main design variables in a multicore organization?
Listing 4.6 illustrates a problem created by following numeric input with line-oriented string input. How would replacing this: cin.getline(address,80); with this: cin >> address; affect the working...
Let the language L be accepted by the transition graph T and let L not contain the word ba. We want to build a new TG that accepts exactly L and the word ba. (i) One suggestion is to draw an edge...
Rewrite the Stock class, as described in Listings 10.7 and 10.8 in Chapter 10 so that it uses dynamically allocated memory directly instead of using string class objects to hold the stock names. Also...
Consider the class definitions of Programming Exercise 5 in Chapter 14,Reusing Code in C++. If you havent yet done that exercise, do so now.Then do the following: Write a program that uses standard...
Write a function with an old-style interface that has this prototype: int reduce(long ar[], int n); The actual arguments should be the name of an array and the number of elements in the array.The...
Modify the Vector class header and implementation files (Listings 11.13 and 11.14) so that the magnitude and angle are no longer stored as data components. Instead, they should be calculated on...
Redo Listing 7.7, modifying the three array-handling functions to each use two pointer parameters to represent a range. The fill_array() function, instead of returning the actual number of items...
Let L be some regular language in which all the words happen to have an even length. Let us de fine the new language Twist(L) to be the set of all the words of L twisted, where by twisted we mean the...
Do Programming Exercise 1 from Chapter 9 but replace the code shown there with an appropriate golf class declaration. Replace setgolf(golf &, const char*, int) with a constructor with the appropriate...
Many state lotteries use a variation of the simple lottery portrayed by Listing 7.4. In these variations you choose several numbers from one set and call them the field numbers. For example, you...
Here is part of a program that reads keyboard input into a vector of string objects, stores the string contents (not the objects) in a file, and then copies the file contents back into a vector of...
Compared to an array, a linked list features easier addition and removal of elements but is slower to sort.This raises a possibility: Perhaps it might be faster to copy a list to an array, sort the...
Consider the TooBig functor in Listing 16.15.What does the following code do, and what values get assigned to bo? bool bo = TooBig(10)(15); One functor (f100) is a declared object, and the second...
Modify Listing 15.11 so that the two exception types are classes derived from the logic_error class provided by the header file. Have each what() method report the function name and the nature of the...
Modify Listing 16.9 (vect3.cpp) as follows: Heres a sample run of the program in Listing 16.9: Enter book title (quit to quit): The Cat Who Can Teach You Weight Loss Enter book rating: 8 Enter book...
Define a QueueTp template.Test it by creating a queue of pointers-to-Worker (as defined in Listing 14.10) and using the queue in a program similar to that in Listing 14.12. Here is a sample run of...
Redo Listing 16.3 so that it gets it words from a file. One approach is to use a vector object instead of an array of string.Then you can use push_back() to copy how ever many words are in your data...
The Benevolent Order of Programmers maintains a collection of bottled port. To describe it, the BOP Portmaster has devised a Port class, as declared here: #include using namespace std; class Port {...
The body of a method is enclosed in __________. a. Curly braces { } b. Square brackets [] c. Parentheses () d. Quotation marks ""
Write a short C++ function to count the number of nodes in a circularly linked list.
Here are some class declarations: // emp.h -- header file for abstr_emp class and children #include #include class abstr_emp { private: std::string fname; // abstr_emp's first name std::string lname;...
Derive the circuits that implement the state tables in Figures 6.55 and 6.56. Compare the costs of these circuits. Present state S1 S2 S3 S4 S5 S6 S7 S8 S9 Next state DN = 00 01 10 S1 S3 S3 S2 S2 S5...
Add a function size() to our C++ implementation of a singly link list. Can you design this function so that it runs in O(1) time?
A Person class holds the first name and the last name of a person. In addition to its constructors, it has a Show() method that displays both names.A Gunslinger class derives virtually from the...
Describe how to implement a capacity-limited stack, which uses the functions of a capacity-limited deque to perform the functions of the stack ADT in ways that do not throw exceptions when we attempt...
If we implemented the stack S from the previous problem with an array, as described in this chapter, then what is the current value of the top member variable?
The Wine class has a string class object member (see Chapter 4) that holds the name of a wine and a Pair object (as discussed in this chapter) of valarray objects (as discussed in this chapter).The...
Give a complete pseudo-code description of the recursive merge-sort algorithm that takes an array as its input and output.
Modify Listing 8.14 so that it uses two template functions called SumArray() to return the sum of the array contents instead of displaying the contents. The program now should report the total number...
Modify Listing 11.15 so that it writes the successive locations of the random walker into a file. Label each position with the step number. Also have the program write the initial conditions (target...
Describe an algorithm for counting the number of left external nodes in a binary tree, using the Binary tree ADT.
Write a method that searches a numeric array for a specified value. The method should return the subscript of the element containing the value if it is found in the array. If the value is not found,...
A software company sells a package that retails for $99. Quantity discounts are given according to the following table: Write a program that asks the user to enter the number of packages purchased....
Write a program that creates a String Array List. Continually prompt the user for Strings to add to the list until the user enters a sentinel value. Display the Strings in a single line separated by...
a. Create a Score Exception class that extends Exception and whose constructor accepts a String parameter and passes it to the Exception class constructor. Save the file as ScoreException.java. b....
Java is architecturally _________________. a. Neutral b. Oriented c. Specific d. Abstract
Repeat Exercise R-14.7 for the adjacency list representation, as described in the chapter. Exercise R-14.7 Give pseudo-code for performing the operation insert edge(u,v,x) in O(1) time using the...
Processes and threads provide a powerful structuring tool for implementing programs that would be much more complex as simple sequential programs. An earlier construct that is instructive to examine...
Consider a simple thermostat that turns on a furnace when the temperature is at least 3 degrees below the setting, and turns off a furnace when the temperature is at least 3 degrees above the...
Write an essay on the relationship between evolution and one or more of autonomy, intelligence, rationality, and learning.
The resurgence of interest in AI in the 2010s is often attributed to deep learning. Explain what deep learning is, how it relates to AI as a whole, and where the core technical ideas actually...
Investigate the state of the art for domestic robots: what can be done (with what assumptions and restrictions on the environment) and what problems remain unsolved? Where is research most needed?
Find and analyze at least three sets of proposed principles for the governance of AI. What do the sets of principles have in common? How do they differ? How implementable are these principles?
Implement a performance-measuring environment simulator for the vacuum-cleaner world depicted in Figure 2.2 and specified on page 40. Your implementation should be modular so that the sensors,...
Define in your own words: (a) Intelligence, (b) Artificial intelligence, (c) Agent, (d) Rationality, (e) Logical reasoning.
Describe three different task environments in which the performance measure is easy to specify completely and correctly, and three in which it is not.
Section 19.6.5 (page 684) noted that the output of the logistic function could be interpreted as a probability p assigned by the model to the proposition that f(x) = 1; the probability that f(x) = 0...
Futoshiki is a Sudoku-like Japanese logic puzzle that is very simple, but can be quite challenging. You are given an n x n grid, and must place the numbers 1, . . . n in the grid such that every row...
Suppose we run value iteration in an MDP with only non-negative rewards (that is, R(s, a, s') 0 for any (s, a, s')). Let the values on the kth iteration be V k (s) and the optimal values be V (s)....
Consider an HMM with state variables {X i } and emission variables {Y i }. (i) [True or false] X i is always conditionally independent of Y i+1 given X i+1 . (ii) [True or false] There exists an HMM...
Transportation researchers are trying to improve traffic in the city but, in order to do that, they first need to estimate the location of each of the cars in the city. They need our help to model...
What is the purpose of risk management? Outline the risks you faced on the first day of college. Have any of these risks changed since then?
Think of an online retailer youve recently used or considered using for a purchase. Why is good design of that retailers interface important for the retailer? Visit the online retailer and evaluate...
Consider the following PCFG for simple verb phrases: 0.1 : V P Verb 0.2 : V P Copula Adjective 0.5 : V P Verb the Noun 0.2 : V P V P Adverb 0.5 : Verb is 0.5 : Verb shoots 0.8 : Copula is 0.2...
Which method of representing quantities involves discrete steps?
The IT manager at Pitt Fitness wants to secure the database using a method that includes processing logic to periodically change and synchronize with passwords stored on the database. Which of the...
Pitt Fitness is now routinely creating backups of their database. They store them on a server and have a number of backup files that need to be deleted. Which of the following files is the correct...
Which of the following data integrity constraints would ensure Pitt Fitness has a consistent method to record customer phone numbers? a. Format (Input Mask) b. Legal values c. Data type d. Validation...
The IT manager at Pitt Fitness is creating a backup of the company database. What is the best location for storing the backup? a. At the Downtown location b. Next to the current database for easy...
Suppose Pitt Fitness were using an enterprise-level DBMS when a thunderstorm caused a brief power loss to the database, stopping a class registration entry in midstream. When the power was fully...
Pitt Fitnesss IT person backs up the database every day at the end of business hours. After completing their evening classes, customers register for classes for the upcoming week. Assume that a...
Popular classes at Pitt Fitness fill up almost immediately. What database technique would work well to determine which people should be admitted into a popular class based on when they requested...
The new DBA at Pitt Fitness is working on catalog services in Microsoft Access. This employee has published an internal report on the database schema, but the managers receiving this report are...
GitHub and BitBucket are popular websites for . a. Hosting projects that use the Git language for version control b. Completing full-stack web app projects c. Posting technical questions and...
Which of the following changes to a database would most likely require the most rework to existing programs and queries? a. Adding a new field to a table b. Creating a new index c. Changing...
Which of the following is not a constraint on the primary key field for a table? a. There may be no null values. b. All values must be unique. c. All values must have a matching value in the foreign...
Valerie has just found a cookie on the ground. She is concerned that the cookie contains raisins, which she really dislikes but she still wants to eat the cookie. If she eats the cookie and it...
Pitt Fitness would like to analyze their options for an in-house database versus a cloud database-as-a-service. What are the benefits to moving their database to the cloud?
Which SQL statement would give user cyclone1 the ability to select, insert, update, or delete records from the Students table? a. GRANT SELECT, INSERT on STUDENTS to cyclone1 b. GRANT ALL on STUDENTS...
Which feature potentially helps you recover data in an Access database? a. Journaling b. Incremental backups c. Two-step locking d. Compact and repair
Data consistency means . a. Allowing two or more users to access the database at the same time b. Giving each user a consistent view of the data including changes c. Using properties such as the...
Recall that for a standard HMM the Elapse Time update and the Observation update are of the respective forms: P(X t | e 1:t1 ) = xt1 P(X t | x t1 )P(x t1 | e 1: t1 ) P(X t | e 1:t ) P(X t | e 1:t1...
Which of the following tables could be considered a composite entity in an ERM and a junction table in an E-R diagram? a. ClassInstructors b. Instructors c. Customers d. Classes
Which of the following tables could be considered a composite entity in an ERM and a junction table in an E-R diagram? a. Classes b. Instructors c. Reservations d. Customers
What is the relationship between the tables Classes and Customers? a. One to one b. One to many c. Many to many d. The tables arent related.
What is the relationship between the tables Instructors and Classes? a. One to one b. One to many c. Many to many d. The tables arent related.
What is the relationship between the tables Classes and Reservations? a. One to one b. One to many c. Many to many d. The tables arent related.
What field(s) in the Customers table would be the most appropriate for a CustomerName index? a. LastName b. LastName and FirstName c. LastName, FirstName, and BirthDate d. CustomerID
Suppose you are the architect being hired. What questions would you ask about the company with which youre interviewing, related to the areas listed in Section 25.2? Try to answer this question from...
For the table Customers (CustomerID, LastName, FirstName, StreetAddress, City, State, ZipCode, EmailAddress, PhoneNumber, BirthDate), which of the following is a secondary key? a. LastName, FirstName...
For the table Customers (CustomerID, LastName, FirstName, StreetAddress, City, State, ZipCode, EmailAddress, PhoneNumber, BirthDate), which field is a foreign key? a. LastName b. CustomerID c. There...
For the table Customers (CustomerID, LastName, FirstName, StreetAddress, City, State, ZipCode, EmailAddress, PhoneNumber, BirthDate), which field is the primary key field? a. LastName b. BirthDate c....
Western Digital, a developer of storage devices and solutions, has grown dramatically since it was established in 1970. Based in San Jose, California, they employ more than 61,000 with locations...
In 1919 Lionel Langley opened his first bakery store, which he named after his wife, Lilly. Initially he sold only breads, cakes, and flour to his customers. Through the years, the business expanded...
Which of the following is not a feature that Access uses to demonstrate and leverage the power of one-to-many relationships? a. Subdatasheets b. Lookup properties c. Automatically refreshing related...
Megan Simpson, manager of western regional sales at the Whitefield Company, requested that the IS department develop a sales force communication and tracking system that would enable her to better...
In the Relationships window of the JC Consulting database, which primary key field does not participate in a one-to-many relationship? a. ProjectLineItemID b. ProjectID c. TaskID d. All primary key...
Select two of the implementation size user stories you developed in Exercise 2. Develop a set of acceptance criteria for each of these user stories. Data from Exercises 2 Select one of the epic user...
Match each of the key terms above with the definition that best fits it. Integration testing ____ A testing technique in which participants examine program code for predictable language-specific...
Select one of the epic user stories you developed in Exercise 1 that you believe has high value to the organization. Break this user story into implementation size user stories. Data from Exercises...