Consider the following python program and write the output str=computer networks print(str.find('k')) print(str.count('e')) print(len (str)) print(str.replace('computer',...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Consider the following python program and write the output str="computer networks" print(str.find('k')) print(str.count('e')) print(len (str)) print(str.replace('computer', 'data')) You are designing a program to process a list of Internet addresses representing numeric addresses of computers. Locally, computers are usually known by a nickname, as well. Numeric addresses for computers on the international network Internet are composed of four parts, separated by a space, of the form: x y z m Nickname where x y z m are positive integers and Nickname is the computer nickname (string). 1. Define a class called address_t with components for the four integers of an internet address and a fifth component in which to store an associated nickname. Define function members, with constructors, setters and getters. (address_t.h). 2. The program should implement function members. The default constructor should set the network address to (0 0 0 0 None). Define a function Compare To which takes 2 network addresses and based on the 2 first components (x, y), compares them for equality. If two computers are located on the same network then they share the same 2 components (address_t.cpp). 3. Your driver program should declare 4 objects of class address_t and read 4 computer network addresses and nicknames and store them in the 4 objects. (address_tDriver.cpp) 4. Your program should display a list of pairs of computers from the same locality -that is, each pair of computers with matching values for the first two components of the address. In the message, the computers should be identified by their nicknames Example Input: 111 22 3 44 555 66 7 88 111 22 5 66 222 33 5 77 Borneo Java Sumatra Jakarta Example Output message: Machine Borneo and Sumatra are on the same local network. Consider the following python program and write the output str="computer networks" print(str.find('k')) print(str.count('e')) print(len (str)) print(str.replace('computer', 'data')) You are designing a program to process a list of Internet addresses representing numeric addresses of computers. Locally, computers are usually known by a nickname, as well. Numeric addresses for computers on the international network Internet are composed of four parts, separated by a space, of the form: x y z m Nickname where x y z m are positive integers and Nickname is the computer nickname (string). 1. Define a class called address_t with components for the four integers of an internet address and a fifth component in which to store an associated nickname. Define function members, with constructors, setters and getters. (address_t.h). 2. The program should implement function members. The default constructor should set the network address to (0 0 0 0 None). Define a function Compare To which takes 2 network addresses and based on the 2 first components (x, y), compares them for equality. If two computers are located on the same network then they share the same 2 components (address_t.cpp). 3. Your driver program should declare 4 objects of class address_t and read 4 computer network addresses and nicknames and store them in the 4 objects. (address_tDriver.cpp) 4. Your program should display a list of pairs of computers from the same locality -that is, each pair of computers with matching values for the first two components of the address. In the message, the computers should be identified by their nicknames Example Input: 111 22 3 44 555 66 7 88 111 22 5 66 222 33 5 77 Borneo Java Sumatra Jakarta Example Output message: Machine Borneo and Sumatra are on the same local network.
Expert Answer:
Related Book For
Posted Date:
Students also viewed these computer network questions
-
answer the question clearly You are building a flight-control system for which a convincing safety case must be made. Would you assign the tasks of safety requirements engineering, test case...
-
what are some key motivational strategies that managers can employ to enhance employee performance and job satisfaction in the workplace.
-
can someone solve this Modern workstations typically have memory systems that incorporate two or three levels of caching. Explain why they are designed like this. [4 marks] In order to investigate...
-
Prove Theorem 9.7.1. Theorem 9.7.1 Principal Axes Theorem for ft3 Let ax2 + by2 + cz2 + 2dxy + 2exz + 2fyz + gx + hy + iz + j = 0 be the equation of a quadric Q, and let xTAx = ax2 + by2 + cz2 + 2dxy...
-
Use Table II on pages 926-928 to find each indefinite integral in Problems 1-14. (5 + 2x)(2 x)
-
An information security manager routinely monitored the Web surfing among her company's employees. She discovered that many employees were visiting the "sinful six" Web sites. She then prepared a...
-
Geography and the Foreign Exchange Market. Answer the following: a. What is the geographical location of the foreign exchange market? b. What are the two main types of trading systems for foreign...
-
On February 1, 2017, Razorback Corporation decides to transfer its available-for sale securities to the trading category. These securities had been purchased for $9,400 early in 2016 and had a fair...
-
on 7 below contains three underlined parts, one of w of the sentence where the problem is that results
-
Moreover, we should oppose school voucher programs because any government program that lacks accountability and oversight should be prohibited. It is clear school voucher programs would lack such...
-
Samuel is saving towards the purchase of hockey gear. Sept 1, 2018 - account 1 opened for $400 at 5% compound interest Sept 1, 2019 - account 2 opened for $500 at 6% compound interest Sept 1, 2020 -...
-
A Swiss manufacturing company that operates two manufacturing plants one in the United States and the other in India shows the following results (all figures are in U.S. dollars). Compute the...
-
Determine whether the following statement is true or false by using partial fraction decomposition. If false, show the correct decomposition on your dropbox portion. 3 #+2 2-1
-
Time left 0:43:10 QUESTION: As a new supervisor within your organization, you were recently invited to attend corporate orientation. At a certain point in the meeting, you held up your organization's...
-
Find the partial fraction decomposition for the following rational expression. - (363+68+6) (t+4)(t 1)(t2) t +4 Answer: A = B = and C = Using the partial fraction decomposition above, evaluate the...
-
Pink Chemical Inc. uses process costing system in its two producing departments. In department 2, inspection takes place at the 86% stage of completion, after which materials are added to good units....
-
Mercury Company has only one inventory pool. On December 31, 2021, Mercury adopted the dollar-value LIFO inventory method. The inventory on that date using the dollar-value LIFO method was $200,000....
-
In Exercises discuss the continuity of each function. f(x) -3 1 x - 4 y 3 2 -1 -2 -3+ 3 X
-
Example 11-1: What Additional Information Is Required? How would this example change if a CSTR were used instead of a PFR? Example 11-1 The first-order liquid-phase reaction A B is carried out in a...
-
The elementary gas-phase reaction 2A C is carried out in a packed-bed reactor. Pure A enters the reactor at a 450-K flow rate of 10 mol/s, and a concentration of 0.25 mol/dm 3 . The PBR contains 90...
-
Go to the LearnChemE screencast link for Chapter 9 (http://www.umich.edu/~elements/6e/09chap/learn-cheme-videos.html). 1. View one of the screencast 5- to 6-minute video (1) PSSH, (2) Cell Growth,...
-
Shakie Sports Company made 20,000 leather basketballs in a given year. Its total manufacturing costs were $170,000 variable and $70,000 fixed. Assume that no price changes will occur in the following...
-
Lynch, Barney, and Schwab is a stock brokerage firm that evaluates its employees on sales activity generated. Recently the firm also began evaluating its stockbrokers on the number of new accounts...
-
Use responsibility accounting to define an organizational subunit as a cost centre, expense centre, revenue centre, profit centre, or investment centre.
Study smarter with the SolutionInn App