subject

Write a class named employee that has the following fields: • name : the name field is a string object that holds the employee's name .• idnumber: the idnumber is an int variable that holds the employee's id number.• department: the department field is a string object that holds the name of the department where the employee works.• position: the position field is a string object that holds the employee's job title. write appropriate mutator methods that store the values in these fields and accessor methods that return thevalues in these fields. once you have written the class , write a separateprogram that creates three employee objects to hold the following data: name id number department positionsusan meyers 47899 marketing sales repmark jones 39119 it programmerjoy rogers 81774 manufacturing engineerthe program should store this data in the three objects and then display the datafor each employee in the format: name , employee number id number, works as a position in department. for example: susan meyers, employee 47899, works as a sales rep in marketing. print each statement on a separate line in the order susan, mark, joy. sample run #0: java employeethe code i wrote: public class employee { // fields private string name; private int idnumber; private string department; private string position; // constructors public employee(string nm, int id, string dp, string ps) { name = nm; idnumber = id; department = dp; position = ps; } public employee(string nm, int id) { name = nm; idnumber = id; department = " "; position = " "; } public employee() { name = " "; idnumber = 0; department = " "; position = " "; } // methods public string getname() { return name; } public int getidnumber() { return idnumber; } public string getdepartment() { return department; } public string getposition() { return position; } }class employeefile{ public static void main(string[] args) { //different employee instances. employee box = new employee("susan meyers", 47899, "accounting", "vice pres"); employee box1 = new employee("mark jones", 39119, "it", "programmer"); employee box2 = new employee("joy rodgers", 81774, "manufacturing", "engineer"); system. out. println(" name id number department position "); system. out. println(""); system. out. print(" " + box. getname() + " " + box. getidnumber() + " " + box.; system. out. println(" " + box.; system. out. print(" " + box1.getname() + " " + box1.getidnumber() + " " + box1.; system. out. println(" " + box1.; system. out. print(" " + box2.getname() + " " + box2.getidnumber() + " " + box2.; system. out. println(" " + box2.; } }problems detected: ⇒ the contents of your standard output is incorrect. ⇒ failed 1 out of 1 test runs. failed test run ⇒ the contents of your standard output is incorrect. the error i got

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 01:50
Write a program that uses a random number generator to generate a two digit positive integer and allows the user to perform one or more of the following operations: a. double the number. b. reverse the digits of the number. c. raise the number to the power of 2, 3, or 4. d. sum the digits of the number. e. if the number is a two-digit number, then raise the first digit to the power of the second digit. f. if the number is a three-digit number and the last digit is less than or equal to 4, then raise the first two digits to the power of the last digit. after performing an operation if the number is less than 10, add 10 to the number. also, after each operation determine if the number is prime. each successive operation should be performed on the number generated by the last operation. your program should not contain any global variables and each of these operations must be implemented by a separate function. also, your program should be menu driven. 7. (fraction calculator) write a program that
Answers: 1
question
Computers and Technology, 23.06.2019 20:50
3.11.3 quiz: comparing and analyzing function typesquestion 4 of 102 pointswhat can you say about the y-values of the two functions f(x) = 3x2-3 andg(x)=2* - 3?
Answers: 2
question
Computers and Technology, 24.06.2019 05:30
Hey i really need some solving this problem: 1. encrypt this binary string into cipher text: 110000. include in your answer the formula the decoder would use to decrypt your cipher text in the format (coded answer) x n mod (m) = y & 2. decrypt this cipher text into a binary string: 106 you.
Answers: 2
question
Computers and Technology, 24.06.2019 15:30
The idea that, for each pair of devices v and w, there’s a strict dichotomy between being “in range” or “out of range” is a simplified abstraction. more accurately, there’s a power decay function f (·) that specifies, for a pair of devices at distance δ, the signal strength f(δ) that they’ll be able to achieve on their wireless connection. (we’ll assume that f (δ) decreases with increasing δ.) we might want to build this into our notion of back-up sets as follows: among the k devices in the back-up set of v, there should be at least one that can be reached with very high signal strength, at least one other that can be reached with moderately high signal strength, and so forth. more concretely, we have values p1 ≥ p2 ≥ . . ≥ pk, so that if the back-up set for v consists of devices at distances d1≤d2≤≤dk,thenweshouldhavef(dj)≥pj foreachj. give an algorithm that determines whether it is possible to choose a back-up set for each device subject to this more detailed condition, still requiring that no device should appear in the back-up set of more than b other devices. again, the algorithm should output the back-up sets themselves, provided they can be found.\
Answers: 2
You know the right answer?
Write a class named employee that has the following fields: • name : the name field is a string obj...
Questions
question
English, 29.01.2020 14:57
question
Mathematics, 29.01.2020 14:57
question
Biology, 29.01.2020 14:57
Questions on the website: 13722363