[solved] – Question 75608
Write a C program that prompts the user to input two strings. The program must output the total
number of times the second string appears in the first string without using any string library
function except strlen(), gets(), puts(). Length of the second string must be greater
than 1. In the main function, input two strings and pass them to a function named
countSubstrings. The function should return how many times the second string occurs inside
the first string. Finally, print the result in the main function.
Expert Answer
[solved] – Question 75615
In the Distance class, as shown in the FRENGL and FRISQ examples in this chapter, create an overloaded * operator so that two distances can be multiplied together. Make it a friend function so that you can use such expressions as Wdist1 = 7.5 * dist2; You’ll need a one-argument constructor to convert floating-point values into Distance values. Write a main() program to test this operator in several ways.
Expert Answer
[solved] – Question 75635
A supertype entity Vehicle in the Division of Motor Vehicles’ database has the following attributes: VIN, Make, Model, Color, VehicleType.
VIN is the identifier and joins the Vehicle entity to these entities: Car, Truck, Bus and Bike
Because Car, Truck, Bus and Bike inherent the attributes mentioned above from Vehicle, they are called ___________________.
Supertype
Subtype
Strong
Associative
Expert Answer
[solved] – Question 75636
The process of defining a more general entity type from a set of more specialized entity types is called:
Specialization
Generalization
Normalization
Extrapolation
Expert Answer
[solved] – Question 75637
Select the correct statement about Relations in the Relational Data Model.
Having multiple attributes with the same provides redundancy.
There can be composite attributes.
Multiple relations with the same name provide redundancy.
There cannot be multivalued attributes.
Expert Answer
[solved] – Question 75638
When transforming a Conceptual Model Entity to a Relational Model Relation, each simple attribute maps to …
a composite attribute.
a column.
a relation.
a relationship.
Expert Answer
[solved] – Question 75639
When mapping a Conceptual Model to a Relational Model, a simple identifier maps to …
a composite attribute.
a column.
a simple attribute.
a simple key.
Expert Answer
[solved] – Question 75640
For a single column to be a primary key, what specific condition is required by the Relational Model?
Must include NULL
Must have unique values
Must have unique values not including NULL
Must be multivalued
Expert Answer
[solved] – Question 75641
Referential integrity refers to maintaining consistency of values about the same attribute across relations. For instance, in a database that has a State relation with a state_code column for the two-character state codes, there cannot be another relation referencing that State relation with state_code values other than the ones in the State relation.
What component of the Relational Model would enforce such referential integrity?
a Foreign Key
a Primary Key
a Relation
Index
Expert Answer
[solved] – Question 75642
When transforming an ERD of a Conceptual Model to a Relational Model, a many-to-many unary relationship is replaced by …
a primary key.
two relations.
one relation and one relationship.
a foreign key.
Expert Answer

