Master Computers and Technology with Fun Quizzes & Brain Teasers!

Practical. CIT125. Instructions PART ONE - Database & Table Creation Estimated Time to Complete: 20 minutes 20% 1. Create a new database. Name it as Quiz3_your_name. 2. Import an Excel spreadsheet called Members located on the Blackboard in Quiz3 folder into the database and call the new table Members_your_name. (4%) 3. Modify the table Members_your_name as following: (2% each) 1) Choose an appropriate data types and field sizes for each field. 2) Descriptions are optional. 3) Set a primary key using the correct field in this table. 4) Assign a default value of C to the Member Type field. 5) Update the table so the values for the number of employees may not be less than 50. 6) The expiration date may not be later than 12/31/2020. 7) Only G, S, B, and C are acceptable values for member type. 8) Default state is IL. PART TWO - Form & Report Creation Estimated Time to Complete: 10 minutes 10% 1. Create a Form based on the members table. Name it Your_Name Members_Data_Entry. (5% ) 2. Create a report showing, in this order: Member ID, Company, City, and State. It is a justified report, in formal style, printed landscape. Title the report Your_Name_Members_Listing. (5%) PART THREE - QUERIES Estimated Time to Complete: 50 minutes 70% (10% each) General Instructions: Read the directions carefully. Save each query as instructed. Use the Members table for all queries. Copy-and-Paste each query in the SQL view into a MS Word document called Quiz3_Your_Name_SQL. 1. The Director needs a membership list. Show all fields in a list of companies within member type. Save as Your Name Query 1. 2. The Director needs to know the average number of employees and the fewest number of employees for each membership type. Save as Your Name Query 2. 3. The Director needs to update a list of the members whose membership will expire on 3/31/2020 or sooner to the expiration date of 12/31/2020. Save as Your Name Query 3. 4. The director is sending a special bonus to the best clients. The best clients have membership type of G; however, the director will only send this bonus to companies who have more than 200 employees. Show the name, address, city, state, and zip of the companies that qualify. Save as Your Name Query 4. 5. The director is considering to open another branch to serve clients in Ashland and Angola. Create a new table called NewClients with the records from Ashland and Angola by running the Make-Table query. Save the query as Your Name Query 5. 6. The Director needs to know the total number of employees for all member cities. Save as Your Name Query 6. 7. Create a parameter query to see a member information by insert the member ID. Similar to this: Enter Parameter Value ? Enter please the Member ID OK Cancel 8. Submit the Quiz3_your_name database and the Quiz3_Your_Name_SQL document to the Blackboard in Quiz 3 Submission Button.
Create the candidateRows() function. The purpose of this function is to write individual table rows for each candidate, showing the candidates name, party affiliation, vote total, and vote percentage. The candidateRows() function has two parameters named raceNum and totalVotes. Place the commands in the following steps within this function.Declare a local variable named rowHTML that will contain the HTML code for the table row. Set the initial value of this variable to an empty text string.Create a for loop in which the counter variablej goes from 0 to 2 in steps of 1 unit. Within the for loop do the following:Declare a variable named candidateName that retrieves the name of the current candidate and the current race. (Hint : Retrieve the candidate name from the multidimensional candidate array using the reference, candidate[raceNum][j].)Declare a variable named candidateParty that retrieves the party affiliation of the current candidate in the current race from the multidimensional party array.Declare a variable named candidateVotes that retrieves the votes cast for the current candidate in the current race from the multidimensional votes array.Declare a variable named candidatePercent equal to the value returned by the calcPercent() function, calculating the percentage of votes received by the current candidate in the loop. Use candidateVotes as the first parameter value and totalVotes as the second parameter value.Add the following HTML code to the value of the rowHTML variable name ( party ) votes ( percent )where name is the value of candidateName, party is the value of candidateParty, votes is the value of candidateVotes, and percent is the value of candidatePercent. Apply the toLocaleString() method to votes in order to display the vote total with a thousands separator. Apply the toFixed(1) method to percent in order to display percentage values to 1 decimal place.Return the value of the rowHTML variable.This is what I have so far-"use strict";/*New Perspectives on HTML5 and CSS3, 7th EditionTutorial 10Case Problem 4Author:Date:Filename: vw_results.jsFunctions:The calcSum() function is a callback function used tocalculte the total value from items within an arrayThe calcPercent(value, sum) function calculates the percentage givena value and a sumThe createBar(partyType, percent) function writes a differenttable data table based on the candidates party affilication.*/var reportHTML = "" + raceTitle + "";for(var i=0; ireportHTML += "";reportHTML += "" + race[i] + "";reportHTML="CandidateVotes";reportHTML += candidateRows(i, totalVotes);reportHTML += "";var totalVotes = 0;votes[i].forEach(calcSum);}document.getElementsByTagName("section")[0].innerHTML = reportHTML;function candidateRows(raceNum, totalVotes) {var rowHTML = "";for (var j = 0; j