3. (4 points) Write a program to read the DSN server list data from file DNSList.txt...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
3. (4 points) Write a program to read the DSN server list data from file DNSList.txt save data to the database file DNSList.sqlite using a database with the following schema to maintain the counts.. CREATE TABLE DNS (IP TEXT, Reliability INTEGER, Description TEXT) If the reliability of an IP <50, write "low" to description column, otherwise, write "Nornal" to description column. You can take the reliability of an IP at the end of IP address line. The program prints all rows of the table when sorted in descending order by reliability. The output should be as follows: DNS server list: IP 107.191.48.176 169.53.182.120 **** 213.184.225.37 109.228.14.251 212.83.168.230 82.127.173.1221 46.105.214.115 Reliability 99 99 Description Normal Normal 55 Normal 52 Normal 48 Low 32 Low 31 Low 3. (4 points) Write a program to read the DSN server list data from file DNSList.txt save data to the database file DNSList.sqlite using a database with the following schema to maintain the counts.. CREATE TABLE DNS (IP TEXT, Reliability INTEGER, Description TEXT) If the reliability of an IP <50, write "low" to description column, otherwise, write "Nornal" to description column. You can take the reliability of an IP at the end of IP address line. The program prints all rows of the table when sorted in descending order by reliability. The output should be as follows: DNS server list: IP 107.191.48.176 169.53.182.120 **** 213.184.225.37 109.228.14.251 212.83.168.230 82.127.173.1221 46.105.214.115 Reliability 99 99 Description Normal Normal 55 Normal 52 Normal 48 Low 32 Low 31 Low
Expert Answer:
Related Book For
Posted Date:
Students also viewed these programming questions
-
Alex's Tool and Dye Machine Co If we can't make it, you don't need it! HIGH-LOW METHOD Labor Cost Labor Hours May $ 5,410 585 June $ 4,900 595 July $ 5,570 690 August $ 5,570 680 September $ 5,590...
-
In the last chapter you added and modified some tables for Kelly's Boutique. She would now like you to create, run, and print some select, parameter, and action queries. Make the following changes...
-
Use the attached "words.txt" file to store the words along with their ranks in an AVL tree. Then provide the user the option to search for any word. If the word exists the program displays the rank...
-
9. What will the following code print on the console? int main() { } int num = 4; cout < < (num & 3 == 0 ? "first" : "second"); return 0; a. second b. first c. There is a syntax error d. It will...
-
(a) What is the uncertainty in the ball's horizontal momentum, in a direction perpendicular to that in which it is being thrown, if the student throwing the ball knows that it is located within a...
-
Researchers followed a random sample of 2315 middle-aged men from eastern Finland for up to 30 years. They recorded how often each man went to a sauna and whether or not he suffered sudden cardiac...
-
Table B. 25 contains the golf data on strokes gained. Use all possible regressions to build a model for these data. Perform a residual analysis on the final model and comment on model adequacy. SG:...
-
1. What forces for change are evident at the Oconomo plant? 2. What is the primary type of change neededchanging things or changing the people and culture? Can the Wisconsin plant be saved by...
-
Discuss the implications of the efficient market hypothesis on the effectiveness of technical and fundamental analysis in stock valuation.
-
According to the assigned case study, Lawn King must develop an S&OP plan that considers the costs of inventory, overtime, hiring, and layoff (beware of stock outs). If the plan results in back...
-
For the semicircular bar shown, determine the internal reactions (normal and shear forces, and bending moment) as functions of P, R, and 6. Plot the results as functions of 0. R 8 .. P
-
Generally accepted accounting principles encompass the conventions, rules, and procedures for determining acceptable accounting and financial reporting practices at a particular time. The GAAP is...
-
Continuing with the Juventus Pty Ltd example from Part 5: Assume that Juventus Pty Ltd quoted for jobs to install the Napoli oven using the following standard costs per Napoli oven: Standards Per...
-
Professor's Observation: One discussion post questioned accounting being developed in Italy over 500 years ago, as described in a video by Susan Crosson. The history of accounting started way before...
-
A property was bought and made for use in May 2022. The property was recorded but the depreciation was not. The useful life of the addition is 10 years with a residual value of 0, and the cost for...
-
How is an elevator meant to assist people with disabilities? Explain
-
The diagrams show three circuits consisting of concentriccircular arcs (either half or quartercircles of radii r, 2r, and 3r) and radial lengths. The circuitscarry the same current. Rankthem...
-
In Exercises 516, find the focus and directrix of the parabola with the given equation. Then graph the parabola. y 2 = 4x
-
In the special report "Mousetrap: The Most-Visited Shoe and Apparel E-tailers" (Footwear News, Vol. 58, No. 3, p. 18), we found the following data on the average time, in minutes, spent per user per...
-
A study by M. Chen et al. titled "Heat Stress Evaluation and Worker Fatigue in a Steel Plant" (American Industrial Hygiene Association, Vol. 64, pp. 352-359) assessed fatigue in steel-plant workers...
-
In the article "Distribution of Oxygen in Surface Sediments from Central Sagami Bay, Japan: In Situ Measurements by Microelectrodes and Planar Optodes" (Deep Sea Research Part I: Oceanographic...
-
Are there actually situations in which the use of one or more of the older sales technologies might be superior to something new? When and why would older approaches perhaps be a better choice in...
-
Consider any three of the newer types of sales technology presented in the chapter. For each, provide as many specific applications as you can think of that could enhance the buyerseller relationship...
-
Why would a salesperson be reluctant to adopt CRM? What can management do to help gain salesperson adoption and usage?
Study smarter with the SolutionInn App