(Fall 2020) (Given 11/24/20 Homework #4 Due: 12/10/20) Following is a data description of a library: The library provides books to borrowers. Each book is described by title, edition, and year of publication, and is uniquely identified using the ISBN. Each borrower is described by his or her name and address and is uniquely identified using a borrower number. The library provides one or more copies of each book and each copy is uniquely identified using a copy number, status indicating if the book is | available for loan, and the allowable loan period for a given copy. A borrower may loan one or many books, and the date each book is loaned out and is returned is recorded. Loan number uniquely identifies each book loan. Implement the database using mySQL server. Use company sol files as templates:
Q: The value of BX after executing the following piece of code is : *
A: According to the question, we need to find the value of BX after executing the code: XOR AX, AX ADD…
Q: State whether the following are true or false. If the answer is false, explain why.b) Pointers of…
A: Given:- Pointers of different types may not be assigned to one another without a cast operation.
Q: State whether the following are true or false. If the answer is false, explain why.a) A pointer…
A: Answer: Explaination: Void pointer can be dereferenced, but only after type casting it, so if we are…
Q: st, and pointers shall be used in this program. Kindly use only SELECTION, ITERATION, INPUT, AND…
A: #include<iostream> #include<fstream> #include<windows.h> #include<string>…
Q: The following is the difference between void and NULL pointers: Use relevant examples to back up…
A: Answer: Difference between the void and NULL pointer using the examples we have seen with…
Q: How do you define a function? How do you invoke a function?
A: Define a function in C++ Defining a function in C++ is known as a function definition. it contains a…
Q: - Show the printout of the following code:
A: bool b = true;int i = b; cout << b << endl;cout << i << endl;
Q: What is printed by the following code segment?
A: The correct is ("cow?now?how?brown?") Option("D") Explanation If the break statement is located…
Q: Indicate whether the following statements are true or false: Pointers and references are the only…
A: Given: 'Indicate whether the following statements are true or false: Pointers and references are the…
Q: What is the output of following code.
A: Given: Integer s= 4. Integer d=s++; Then d is printed as output. Solution: The priority of post…
Q: I need to write the following code taking entera from the user.
A: The answer to thee following question:-
Q: What is the return type of function id ? a. int b. float c. bool d. dict
A: a) Int is the correct answer.
Q: The result of the following program is #include #include void main()
A: According to the question, we have to find the result of the given program. In step 2, we will…
Q: Convert the following function to one that uses recursion. void sign(int n) { while (n > 0) {…
A: Recursion: Repeated function call is known as recursion. Basically in recursion a function call…
Q: What is the purpose of the following statement?
A: A purpose statement, also known as a "position statement," is a sentence that outlines a company's…
Q: .- Write a void function definition for a function called update_cost. The function has two formal…
A: The program is written in Java. Please find the source code in step 2
Q: What is the output of the following code
A: Required: programming
Q: /* function definition to swap the values */ void swap(int x, int y) { int temp; return e;
A: /*Program to swap value of x nd y using swap function*/ #include<stdio.h> //swap function…
Q: What is expected to happen when the following code is executed?
A: So, we try to trace the code step by step:- Step 1:- We enter the for loop, take the value a=1.…
Q: Swap two numbers using functions.(no return value, with arguments passed)
A: Given: Swap two numbers using functions. (no return value, with arguments passed)
Q: Question 3: What will be the output of the following code? Explain your solution.
A: Q: Output of the given program
Q: Find the error in the following code
A: Please upvote. I am providing you the correct answer. You can never, in no context, change an…
Q: What are the values of i and j after executing the following code
A: The statements in loop gets executed only if condition specified evaluates to True
Q: 5- Write a group of statements that carry out the same action of upper and lower functions.
A: Your answer to write group of statement that carry same action of upper and lower function is given…
Q: is the output of the following code listing.
A: The method add(Element e) appends e to the end of the list. The method add(int index, Element e)…
Q: retermine if the following argument
A: 1. p ~p r ~r r=>~p p=>~r 0 1 0 1 1 1 0 1 1 0 1 1 1 0 0 1 1 1 1 0 1 0 0 0…
Q: :-Complete the following program by writing its functions and class:
A: Given Code: Main(){Stack A(10),B(20);A.push(62);B.push(17);int w,…
Q: Indicate whether the following statements are true or false:
A:
Q: What are the outputs of the following code?
A: Required: What are the outputs of the following code?
Q: 1) State whether the following declarations are valid or invalid. Give reasons for the invalid…
A: According to the guidelines i can answer only first 3 parts
Q: ch of the following statements is NOT correct?
A: The syntax of a function is void function_name(parameters) ; or data_type function_name(parameters)…
Q: Write 2 SELECT statements to exemplify EXISTS and NOT EXISTS statements.
A: select company_name from flight where exists( select * from flight_leg where…
Q: Question 1: Give the output from the following pieces of code: Code Output
A: Question given (1): Some piece of code given, what is the output of them. Solution (1):…
Q: What is the output of the following code? Find the output
A: Please find the answer below :
Q: 10-define the function aa(int x,int y) int aa(int x,int y) int aa() void (int x,int y)
A: Function syntax is Return_type function_name (parameter)
Q: What does the following code output?
A: Given code is- #include <iostream> using namespace std; int main(){ int y = -5, x = -8;…
Q: I need help with my program. When I run the program I input the yearly income and it skips to "Enter…
A: The program is correct there is only one problem data type. Data type means int, double, string,…
Q: "Indicate whether the following statements are true or false: Pointers and references are the only…
A: When you refer to a derived class object using a pointer or a reference to the base class, you can…
Q: State whether each of the following is true or false. If false, explain why e) All variables must be…
A: 1) In programming langauges like C, C++, JAVA all variable's must be given a type when they are…
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
- Hospital :ER Case Study A General Hospital consists of a number of specialized wards (such as Radiology, Oncology, etc) .Information about ward includes unique name, total numbers of current patients. Each ward hosts a number of patients, who were admitted by a consultant (doctors) employed by the Hospital. On admission, the date and time are kept. The personal details of every patient includes name, Medical Recode Number (MRN), set of phone and one address (city, street, code). A separate register is to be held to store the information of the tests undertaken. Each test has unique episode No. , category and the final result of test. Number of tests may be conducted for each patient. Doctors are specialists in a specific ward and may be leading consultants for a number of patients. Each patient is assigned to one leading consultant but may be examined by other doctors, if required. uHoliday Travel Vehicle (HTV) sells new recreational vehicles and travel trailers. When new vehicles arrive at HTV, a new vehicle record is created. Included in the new vehicle record are a vehicle serial number, name, model, year, manufacturer, and base cost. When a customer arrives at HTV, he or she works with a salesperson to negotiate a vehicle purchase. When a purchase has been agreed upon, a sales invoice is completed by the salesperson. The invoice summarizes the purchase, including full customer information, information on the trade-in vehicle (if any), the trade-in allowance, and information on the purchased vehicle. The invoice also summarizes the final negotiated price, plus any applicable taxes and license fees. If the customer requests dealer-installed options (simply options), they are listed on the invoice as well. A customer may decide to have no options added to the vehicle or may choose to add many options. Dealer-installed options are described by an option code,…Holiday Travel Vehicles sells new recreational vehicles and travel trailers. When new vehicles arrive at Holiday Travel Vehicles, a new vehicle record is created. Included in the new vehicle record are a vehicle serial number, name, model, year, manufacturer, and base cost. When a customer arrives at Holiday Travel Vehicles, he or she works with a salesperson to negotiate a vehicle purchase. When a purchase has been agreed upon, a sales invoice is completed by the salesperson. The invoice summarizes the purchase, including full customer information, information on the trade-in vehicle (if any), the trade-in allowance, and information on the purchased vehicle. If the customer requests dealer-installed options, they are listed on the invoice as well. Th e invoice also summarizes the final negotiated price, plus any applicable taxes and license fees. The transaction concludes with a customer signature on the sales invoice. Identify the classes described in the preceding scenario (you…
- Formatting Customer Names Build a function that displays a customer's name and location if applicableSuppose that you are building a Customer Relationship Management (CRM) system, and you want to display a user record in the following format: John Smith (California). However, if you don't have a location in your system, you just want to see "John Smith." Create a format_customer() function that takes two required positional arguments, first_ name and last_name, and one optional keyword argument, location. It should return a string in the required format. Create the customer.py file. Define the format_customer() function. Open a Python shell (Or Jupyter Notebook) and import your format_customer() function. Try running a few examples. The calls should look like this: from customer import format_customerformat_customer('John', 'Smith', location='California') and the output should look like this: John Smith (California) In [ ]:FOOTBALL-PLAYER(CodFP, Name,Surname, Address, CityOfBirth) TEAM(CodT, Name, Category,ConstitutionDate) AWARD(CodA, CodFP, DeliveryDate, DeliveryPlace, Type) PLAYER-TEAM(CodFP, CodT, StartingDate,EndingDate, NumPlayedMatches, NumGoals) Find name, category and constitution date of the teams in which have played (in any time) the players who received, in their career as a whole, the highest number of awards of type “Best goalkeeper”. SELECT distinct T.Name, T.Category, T.CostituitionDate FROM TEAM T, PLAYER-TEAM PT WHERE T.CodFP= PT.CodFP and PT.CodFP IN (SELECT CodFP FROM AWARD D WHERE A.Type = ‘Best goalkeeper’ GROUP BY CodFP HAVING COUNT(*) = SELECT MAX(AwardTot) FROM (SELECT count(*)as AwardTot AWARD A WHERE A.Type = ‘Best goalkeeper’ GROUP BY CodFP) AS TOTAWARDFP i have this solution but im struggling a lot to be…General Computer Accessory Company: In General Computer Accessory Company (GCAC), each product (described by product number (primary key (PK)), description, and cost) comprises at least one component and can comprise many components (described by component number (PK), description, and unit of measure), and each component is used to make zero to many products. GCAC keeps track of the quantities of products and components in the manufacturing process. In addition, a component can be used to make zero to many other components and a component can consist of zero to many other components. GCAC also keeps track of how many components go into making some other components. Draw an ER diagram using Draw.io Links to an external site.and insert the diagram (as an image file exported from the drawing tool; ensure that the image is a clean ER diagram that does not contain non-relevant details such as tool background and buttons) in a file (enter your full name and assignment number on the first…
- The Music Database The music database stores details of a personal music library, and could be used to manage your MP3, CD, or vinyl collection. Because this database is for a personal collection, it’s relatively simple and stores only the relationships between artists, albums, and tracks. The following is a list of requirements: i) The collection consists of albums; ii) An album is made by exactly one artist. There must be an artist and album; iii) An artist makes one or more albums (identifying relations); iv) An album contains one or more tracks; v) Artists, albums, and tracks each have a name; vi) Each track is on exactly one album. Vii) Each track has a time length, measured in seconds. The track may or may not be played and can be played as many times as required (non-identifying relations). When a track is played, the date and time the playback began (to the nearest second) should be recorded; this is used for reporting when a track was last played, as well as the number of…The Music Database The music database stores details of a personal music library, and could be used to manage your MP3, CD, or vinyl collection. Because this database is for a personal collection, it’s relatively simple and stores only the relationships between artists, albums, and tracks. The following is a list of requirements: i) The collection consists of albums; ii) An album is made by exactly one artist. There must be an artist and album; iii) An artist makes one or more albums (identifying relations); iv) An album contains one or more tracks; v) Artists, albums, and tracks each have a name; vi) Each track is on exactly one album. Vii) Each track has a time length, measured in seconds. The track may or may not be played and can be played as many times as required (non-identifying relations). When a track is played, the date and time the playback began (to the nearest second) should be recorded; this is used for reporting when a track was last played, as well as the number of…4. Movie Store System This is a system for selling and buying DVDs and videos of movies. There will be three types of users. First the regular customers, they can access the database of DVDs and videos with different types of search. Second there is a group of users that can post DVDs or/and videos to be sold. These users have access to add movies to the database, so that regular customers can search for these movies. When the customer has finished searching for a DVD and/or a video he/she can communicate a message to the seller in order to buy the product from him. The third class of user is the administrator; this user will be in charge of administrating the database and users. The administrator will be in charge of giving and revoking selling privileges to regular customers so that they are able to add videos and DVDs in the database. Use Visual Paradigm to answer the above question with following four UML diagrams: UML Diagram to be used: USE CASE (For Documentation), Class Diagram…
- in a shop ,there are 10 employee and 20 kinds of goods,goods id between 1-20 EMPLOYEE id first name last name gender 10001, 'Tom', 'Brown', 'F'10002, 'Elizabeth', 'Tremblay', 'F'10003, 'Gladys', 'Julie', 'F10004, 'John', 'Taylor', 'M10005, 'Amelia', 'Smith'10006, 'Logan', 'Katherine'10007, 'Leo', 'Brown'10007, 'Lem', 'Thompson'10009, 'Tom' 'Smith'10010, 'Emma', 'Campbell' ------------ and I want to add a name library in it ,like this how could i create a HTML file ,with will randomly create customers with these employee . there is a start button on the page . press "start "bottom ,and it will It will randomly match 10 items, customers, and goods, display goods id ,customername and gender ,employer name , id and gender . how to do such a page ?Database (Transaction Management) Each branch of the Jaja restaurant has a mainstay menu that is very popular with customers, so information on the availability of the number of servings is needed to be able to serve orders. Here are two transactions that are ordering a food menu at the same time. T1: Start the transaction at time t1, read 10 servings of food stock at t2. Because ordering one portion, the stock is reduced by 1 at t3. On t6, update the stock count, and commit to t7. T2: Transaction T2 starts a transaction on t2, reads the number of stocks in t3 as many as 10. At t4 orders 3 portions. On t5 it updates the stock to 7 and then on t6 commits it. As a result of the T1 and T2 transactions above, there was an error in the amount of food stocks. Make a solution with 2PL. What kinds of problems happened? Give a reason why choosing this type of problem! How much food is still available?Lili Company 1 (Use C programming language and struct)Lili has a company, so it has a lot of employees.However, many of Lili employees have changed, resigned, and retired, causing the databasethat Lili has not synchronized properly. For that reason, Lili asks for your help to helpher make a list of Lili employees.Each employee has 3 attributes:• Name (max 20 character)• Gender (Laki-laki / Perempuan)• Division (Management / Accounting / HRD)There are several things you can do on the Lili database :1. Add EmployeeIn the add employee feature, the new employee will be after the old employee (ifall positions are full). Because Lili does not like to have employees who have thesame name, if there are employees who have the same name, the employee will notbe accepted to work at Lili’s company. New employees will always fill the leftmostplaces in the database to get a large salary.2. Change PositionThe employee’s position determines the employee’s salary, if the employee is in thefirst…