The sale policy of the company depends on many factors according to the following. • if item in stock more than 8 months and item profit is more than average profit of all items o yes - if customer reviews low quality • yes - sale 50% • no - if customer reviews medium quality o yes - sale 30% o no – sale 15% o no- if item profit more than 8% of the item price • Yes - if in stock more than 1 year o yes- sale 40% o no- not on sale • No - not on sale Write a C++ program that reads the information from "data.txt" input file into 5 arrays, then processes these arrays to produce three arrays, first array holds the items on sale, second array holds percentage of sale , and the third one holds the items without sale. Print these arrays on the screen
Q: Enter the hours worked by employee 1: 2 Enter the hours worked by employee 2: 3 Enter the hours…
A: I give the code in Python along with output and code screenshot
Q: f amortized analysis, the upper bound T(n) on the total cost of a sequence of n operations is…
A: n _______ method of amortized analysis, the upper bound T(n) on the total cost of a sequence of n…
Q: 4. Draw the Decision Table for the given scenario. In the XY Company LLC, all employee gets at least…
A: A decision table is an excellent tool to use in both testing and prerequisite administration.…
Q: The board of directors of a corporation believes it should compensate senior management for…
A: Introduction: The board of the directors' primary responsibility is to choose the company's CEO or…
Q: The following table shows the rate of commission that will be paid to the salesman according to the…
A: Assume that the user enters Name Salary SalesPerformance of the month The program is written in…
Q: Python Products manufactured the metal coat hanger. The project sales for the first quarter of the…
A: Based on python
Q: oyalty points are awarded by a company based on the amount a customer spend. Loyalty points can be…
A: The program is written in c
Q: ACME Consulting pays employees an annual bonus that is a percentage of the employee's salary. The…
A: Activate Developer menu in Ribbon. Insert Command Button from ActiveX Controls. Right click on…
Q: daily dema pain P the maximum daily demand for interior paint is 2 tons. Reddy M optimum (best)…
A: Given that, Raw material- exterior- 6,1 Raw materia- Interior- 4,2 Profit- 5,4 Availability- 24,6…
Q: QUESTION 15 Al Watan supermarket has hire-purchases scheme for locals and expats. The customers will…
A: Given condition: The customer must hold the present job for more than 5 years and reside in the…
Q: Returning the book to the library Students can borrow 10 books, and if a student borrows more than…
A: Condition: Cgpa>3.5, students can borrow up to 15 books. Cgpa<3.5, Students can borrow only up…
Q: FORMULA LIST Future Value (Single Cash Flow) [FV]: FVn = PV (1 + r)" or PV(1+) or PVeN Present Value…
A: Answer: Our instruction is answer the first three part from the first part and. I have given…
Q: Which one is not correct about the following rule: bread = milk [support 20%,confidence 30%] a) A…
A: b is not correct
Q: A company decided to give bonus to employee according to following criteria: Time period of Service…
A: As no programming language is mentioned, it is solved using C++
Q: Sun and Earth (S&E) is a company set up to conduct geological explorations of parcels of land in…
A: Here, we have to provide a solution for the above question.
Q: The board of directors of a firm believes that top management should be rewarded for their efforts…
A: Increased Bonus concerning Stock Prices: Company senior management can be provided with various…
Q: 5220,8340,FEMALE,70,468,12,127 h. Fit a model using `sex`, and `exper` as explanatory variables.…
A: solution of i) ======================================================================== in the given…
Q: A Company supplies a range of cosmetics products and gives discounts on orders as follows: For order…
A: Given: A Company supplies a range of cosmetics products and gives discounts on orders as follows:…
Q: Suppose the cover price of a book is $24.95, but bookstores get a 40% discount. Shipping costs $3…
A: Algorithm: Start Set totalUnits=60 Set perbookPrice=24.95 Compute: totalbookPrice=…
Q: Sun and Earth (S&E) is a company set up to conduct geological explorations of parcels of land in…
A: Answer: our instruction is answer the first three part from the first part and . I have given…
Q: Given below is a decision table where various attributes determine whether profit is up or down.
A: Consider the given data :
Q: 5. Draw a decision table for the following scenario. A private bank provides loan for its account…
A: Here we have given a decision table for the loan amount. you can find the solution in step 2.
Q: 18. 15% of the product sold by the company is returned. The company decides to recycle them to avoid…
A: Data means the information that is useful for us Company data is information that offers insight…
Q: Lesson: Bonds A 1,500-bond which will mature in 10 years and with a bond rate of 15% payable…
A: Answer :
Q: A manager wants to award prizes for 1", 2nd and 3d to his team members according to number of new…
A:
Q: ou purchased a house by investing R.O. 20000 and you sold that house for R.O. 35000 after one year.…
A: Required: You purchased a house by investing R.O. 20000 and you sold that house for R.O. 35000 after…
Q: The first cost of a certain piece of equipment is P 50,000. It will have an annual operating cost of…
A: first cost of a certain piece of equipment is P = 50000 annual operating cost of P = 20000 Salvage…
Q: (4). What approaches would your recommendations to increase the company overall utilization of staff…
A: Note: There are multiple questions are given in one question. According to the rule, you will get…
Q: Calculate the percentege gain and loss for bearish and bullish stock Mankel Eserds. What is the Code…
A: Introduction: With the relative strength index (RSI), you can determine if a stock or other asset is…
Q: The company is also __________ for new clients to increase sales. fluctuating prospecting purchasing…
A: The company is also __________ for new clients to increase sales. fluctuating prospecting purchasing…
Q: The following sales-related data is reported by a corporation. Calculate and produce only the net…
A: Introduction the question is about The following sales-related data is reported by a corporation.…
Q: Question 4 An electronics shop sells 6000 headphones in a year and the sales is relatively constant…
A:
Q: appropriate
A: Apply treatment plan to the following case: - The percentage of finding appropriate course is…
Q: A manufacturer of two products (Widgets and Gadgets) makes a profit of $170 for each widget sold and…
A: A manufacturer of two products(widgets and Gadgets)make a a profit of $170 for each widget sold and…
Q: Kevin bought a new moulding machine for $3,000. The machine deteriorates with age and requires to…
A: Answer: I have given answered in the handwritten format
Q: The questions are based on Figure 2 below: A в D Average purchases made (RM) 6,000 1 Name of…
A: a)State the formula in cell D2 =IF(AND(B2>=1,C2>=4000)," YES","NO") b) Which customer(s)…
Q: Reimbursement depends on three conditions: - whether deductible is already met, whether the patient…
A:
Q: UML Activity Diagram for plotting the unemployment rate include swimlanes.
A: Here is the uml diagram for plotting the unemployemeny rate include swimlanes
Q: The following questions are based on Figure 7 below: Current Account Balance RM 12,000 20,000 9,000…
A: The question based on the AND, OR functions in Excel that are helpful in real world problems like…
Q: Draw decision table for Bookstores that get trade discount of a. 15% for orders from libraries and…
A: A decision tree is a very specific type of probability tree that enables you to make a decision…
Q: An annual discount factor is a multiplier for each year based on the discount rate and year. Select…
A: Task - true/false for given statement.
Q: Using suitable examples, differentiate between risk appetite and residual risk. (8)
A: There is a difference between risk appetite and residual risk.
Q: Variable Cost ($) Fixed Cost Facility Product Product Product ($) Y Facility 1 Facility 2 8,000,000…
A: The Complete answer is given below with explanation.
Q: The rate at which an asset depreciates is proportional to its current value. If in 5 years the book…
A: The constant of proportionality k is given by k=y/x where y and x are two quantities that are…
Can you solve this problem
Step by step
Solved in 3 steps with 1 images
- HW7_3 Ball bearings are hardened through a process known as quenching-submersion of the heated ball bearing in oil or water in order to cool it rapidly. The data below represent the temperature of the ball at various points in the cooling process time (sec) 0 30 Temp (C) 800 457 269 79 46 60 150 240 Plot the data (as discrete points). In the same figure window, also plot a) interpolating polynomial, (use polyfit and polyval) b) piecewise cubic interpolation (not-a-knot) and c) piecewise cubic interpolation (shape-preserving) Include a legend for the three methods used: polynomial interpolation, not-a-knot, shape-preserving. Then looking at the plot, choose the method you believe to be the best and smoothest fit of all these to predict the temperature after 3 minutes of cooling. Print the result using fprintf.The file london_weather.csv contains weather data for the years 1979 to 2020. The first five lines of this file are: date,cloud_cover,sunshine,global_radiation,max_temp,mean_temp,min_temp,precipitation,pressure,snow_depth19790101,2,7,52,2.3,-4.1,-7.5,0.4,101900,919790102,6,1.7,27,1.6,-2.6,-7.5,0,102530,819790103,5,0,13,1.3,-2.8,-7.2,0,102050,419790104,8,0,13,-0.3,-2.6,-6.5,0,100840,2 Note, in particular, that the dates are given as eight-digit integers in the format YYYYMMDD. There appears to be some inconsistencies in this data, as there are rows for which the column max_temp contains an entry that is smaller than the corresponding entry in min_temp. Write a Python function wrong_temperature(year) that returns the number of days in a given year for which the column max_temp contains an entry that is smaller than the corresponding entry in the column min_temp.Write a program (call it chr21_gene_names.py) that asks the user to enter a gene symbol and then prints the description for that gene based on data from the chr21_genes.txt file. The program should give an error message if the entered symbol is not found in the table (the user should should not have to worry about case, i.e. it will be a case-insensitive search). The program should continue to ask the user for genes until "quit" or "exit" is given (case-insensitive). Make sure to prompt the user to enter the quit to end the program. Use Dictionaries to solve this problem.HINT: Feel free to use as Dictionary of Dictionaries, but it is not required. HINT: First read the entire text file into a Dictionary that maps the association between gene symbol and description. Once again, make sure to use a Dictionary. Remember to have these command line options: $ python3 chr21_gene_names.py -h usage: chr21_gene_names.py [-h] -i INFILE Open chr21_genes.txt, and ask user for a gene name optional…
- The Movie table has the following columns: ID - positive integer Title - variable-length string Genre - variable-length string RatingCode - variable-length string Year - integer Write ALTER statements to make the following modifications to the Movie table: Add a Producer column with VARCHAR data type (max 50 chars). Remove the Genre column. Change the Year column's name to ReleaseYear, and change the data type to SMALLINT.The following is a preview of the DataFrames df_1. Which of the following statement(s) are true? df_1 date temperature humidity 2018/01/01 70 85 2018/01/02 68 80 2018/01/03 71 80 df_1 is in long format because each row represents an observation and each column represents a variable. df_1 is in wide format, i.e, each row is 1 record of an observation and each column represents a feature about a record. A dataframe cannot be seen as a table.Q. Write a trigger that checks the length of a contract when a new contract is inserted into longtermcontract table. If this is the first contract between the pharmacy and pharmaceutical company, the length of the contract should not be more than 12 months. If the contract is more than 12 months, the trigger should alter the end date and reduce it to 12 months after the start date. * You have to use BEFORE INSERT ON* THE INSERT STATEMENT IN THE END OF THE GIVEN CODE MUST WORK. GIVEN CODE:-- Do not change the name of the triggerdelimiter //create trigger first_contracts_length_limitation -- do not modify or delete the following lines. Do not write anything after this line.insert into longtermcontract values('parapharmaceutical', '24 South St., Fabreville, QC H7P-E2H', '2020-02-01', '2021-04-01', '***'); SCRIPT:
- In java create an application to manage your data base information the database is already created in mysql tables, the tables are fill, So the user can use your database application user friendly Retrieve all data: Given a table name, retrieve all data from the table and present it to the user. Average: Given a table name and a column name, return the average of the column. Here the assumption is that the column type will be numeric (e.g., cost column). Insert: Given a table name, your program should show the column names of that table and ask the users to input new data to the table. In case of errors, your program should directly show the MySQL errors to the users. Assumption 1: Users will enter data according to the database constraints. Assumption 2: Users will input one record at a time. Delete: Given a table name, your program should show the column names of that table and ask the users to input data that they want to delete. Assumption 1: Users will enter data according to the…The file transactions.txt contains rows of transactions. Each transaction (row) consists of a start month,end month and name. Each of these three values is a String.In the following tasks you are asked to read and store the transactions from the file and determine if thereare any duplicate transactions. A transaction is a duplicate if all three values are the same as the threevalues of any other transaction.a. add code to your main method that reads the content of transactions.txt and stores itin a two-dimensional String array. The name of the String array is your choice. Note that you maynot assume that the number of rows in transactions.txt will always be the same. However, youmay assume that there will always be three String values on a single row. The first dimension of yourtwo-dimensional array must be resized dynamically each time a new record is read (Hint: we did thisin class with a single dimensional array and this is very, very similar). Your code will be evaluatedwith rows…Complete the move_dollar_to_the_left(coins_list, position_number, to_move) function. This function takes three parameters (the coins list, the position of the "$" symbol to be moved and the number of positions to move). Firstly, work out the new position for the "$" symbol being moved (always moving to the left). The function replaces the "$" symbol in the position given by the parameter, position_number, '$'] and the position number to with a "-" symbol, and moves a "$" symbol into the new position in the list. For example, if the coins list is ['$', '-', '$', '-', '$', move the coin from is 9 (the last position in the list) and the number of places to move is 3, the function should modify the list to: "['$', '$', '$', '-']. Note: • The position number is a number starting from 1, therefore referring to the "$" symbol in position 9 is referring to the "$" symbol at index 8 of the parameter list. • The function makes changes in place. (i.e. it changes the list that is passed to the…
- SQL A table Products have: a name (TEXT) a description (TEXT) a unit cost stored in cents (INTEGER) and of course we also add an id column to identify them. Separately, we'd like to track the number of items in stock for each product. To do so we'll have a store and an inventory table. Stores have just an id and a name. Then, our inventory table should combine stores and products, listing how much of each product each store has in stock. a product_id (INTEGER) a store_id (INTEGER) a quantity (INTEGER) in stock Now we can insert some stores, products and inventory into our database. There are 2 stores -- one called NY and one called NJ. There are 2 products we are concerned with. Their names are sneakers, costing $220 (remember this is dollars!) and boots costing $350. Use any description for each that you'd like. NY has 4 sneakers in stock and 3 boots. NJ has 5 sneakers in stock and no boots. Insert the above data into the tables you have created.Write a stored procedure called sp_apply_discount() that will apply percent discount to books in a subject. The stored procedure takes in 2 parameters, percentDiscount (DECIMAL(8,2)) and subject (VARCHAR(120)). Using these parameters, the stored procedure computes the discount for the book cost and stores it in the FINAL_PRICE field. For example, the following stored procedure call: call sp_apply_discount(0.15, 'Database');would compute 15% percent discount from the book cost in the Database subject category and store it in the FINAL_PRICE column as depicted in this image:This does not work: CREATE OR REPLACE TRIGGER trg_char_hours AFTER INSERT ON CHARTER FOR EACH ROW BEGIN UPDATE AIRCRAFT SET AC_TTAF = AC_TTAF + NEW.CHAR_HOURS_FLOWN, AC_TTEL = AC_TTEL + NEW.CHAR_HOURS_FLOWN, AC_TTER = AC_TTER + NEW.CHAR_HOURS_FLOWN WHERE AIRCRAFT.AC_NUMBER = NEW.AC_NUMBER; END; I get the following error: ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TRIGGER trg_char_hours AFTER INSERT ON CHARTER FOR EACH ROW BEGIN UPDATE AIRCRAF' at line 1 Here is the original question: Create a trigger named trg_char_hours that automatically updates the AIRCRAFT table when a new CHARTER row is added. Use the CHARTER table’s CHAR_HOURS_FLOWN to update the AIRCRAFT table’s AC_TTAF, AC_TTEL, and AC_TTER values. (Hint: use temp values, as the INSERT event does not accept the OLD keyword.)