1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
tamaranim1 [39]
3 years ago
15

Write a program that reads a sequence of up to 20 pairs of employee names and IDs. Store the data in an object designed to store

a first name (string), last name (string), and an employee ID (integer). Assume each line of input will contain two strings followed by an integer value, each separated by a tab character. Then, after the input has been read in, print the list in an appropriate format to the screen.
Computers and Technology
1 answer:
sladkih [1.3K]3 years ago
7 0

Answer:

The code will be in Python3

you will have to enter the number of employee data and it will display all the data entered in the correct format.

Explanation:

class Solution:

   def __init__(self):

       self.firstName=""

       self.lastName=""

       self.employeeID=0

   def getData(self):

       self.firstName=input("please enter your first name: ")

       self.lastName=input("please enter your last name: ")

       self.employeeID=input("please enter your ID: ")

   def showData(self):

       p="{}\t{}\t{}".format(self.firstName,self.lastName,self.employeeID)

       return p

num=int(input("please enter the number of employee data you want to enter: "))

data=[]

for i in range(num):

   t1=Solution()

   t1.getData()

   data.append(t1.showData())

for i in data:

   print(i)

You might be interested in
Select the correct answer from each drop-down menu.
PIT_PIT [208]

Answer:

ㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤ

3 0
3 years ago
Read 2 more answers
Write a program that continually prompts the user for an integer input until input is entered that is less than 0. Each input th
professor190 [17]

Answer:

Following are the program in the C++ Programming Language:

#include <iostream>//header file

using namespace std;//namespane

//set main method

int main() {  

int a[100]; //set integer type array variable

int value, i = 0; //set integer variables

cout<<"Enter less than 0 to exit:"<<endl; //message for exit

cout<<"Enter the integer numbers:"<<endl; //message to enter numbers

do{ //set do while

cin>>value; //get input from the user

a[i++] = value; //append elements in array

}while(value>=0);

i--;  

cout<<"\nArray are:"<<endl;//message for array

for(int k = 0;k<i;k++){ //set for loop

cout<<a[k]<<" "; //print array

}

return 0;

}

<u>Output</u>:

Enter less than 0 to exit:

Enter the integer numbers:

1

2

3

4

5

-1

Array are:

1 2 3 4 5

Explanation:

Here, we set the integer data type main method "main()" and inside it:

  • we set integer type array variable with index value 100.
  • we set two integer type variable "value" and "i" initialize value 0.
  • we set the do-while loop in which we get the input from the user and and append in the array and pass condition if the value is greater then equal to 0.
  • Finally, set for loop and print the elements of an array.

 

7 0
3 years ago
What are minimum computer requirements for a software program?
Bumek [7]
<span><span>Operating system: Windows 2000/XP
</span><span>CPU: Pentium 4 1.5 GHz or Athlon XP 1500+ processor or higher
</span><span>Memory: 384 MB RAM</span></span>
8 0
4 years ago
What are the benefits of using an ordered list vs. an unordered list? What are the costs?
Rashid [163]

Answer:

The main benefit of the ordered list is that you can apply Binary Search( O( n log n) ) to search the elements. Instead of an unordered list, you need to go through the entire list to do the search( O(n) ).

The main cost of the ordered list is that every time you insert into a sorted list, you need to do comparisons to find where to place the element( O( n log n) ). But, every time you insert into an unsorted, you don't need to find where to place the element in the list ( O(1) ). Another cost for an ordered list is where you need to delete an element, you have an extra cost rearranging the list to maintain the order.

6 0
3 years ago
application that will perform a lot of overwrites and deletes of data and requires the latest information to be available anytim
o-na [289]

Answer:

RDS.

Explanation:

A corporation has implemented a software that conducts the number of information overwriting and deleting, which allows the newest details to be accessible whenever the information is examined. As a Software Engineer, they suggest RDS database technologies.

It is an AWS supported controlled SQL DB service that also reinforces the array type DB for the purpose to contain and maintain the information.

3 0
4 years ago
Other questions:
  • You just turned on a four port Ethernet switch (it hasn’t learned any addresses yet) and connected a host to each port. You send
    8·1 answer
  • Insert a row above the selected row (in between row 1 and row 2).
    15·2 answers
  • Allison’s computer is displaying a strange error message saying that Allison, who is an administrator, does not have access to a
    15·1 answer
  • What to do when you strip a screw
    10·2 answers
  • How have productivity programs improved the professional lives of people? (check all that apply)
    8·2 answers
  • A database administrator (DBA) must have a clear understanding of the fundamental business of an organization, be proficient in
    12·1 answer
  • A company that manufactures machine parts orders a new system that makes products at ten times the speed of the earlier machine.
    15·1 answer
  • Find the basic period and basic frequency of the function g(t)=8cos(10πt)+sin(15πt)
    9·1 answer
  • Explain the term game! And give me complete sentences. U can use ur opinion as well!
    11·1 answer
  • are you in active recovery from a substance use disorder (addiction)? active recovery is defined as being free from an alcohol o
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!