1. Create a class called Employee that has three instance variables - a (String) name, a...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
1. Create a class called Employee that has three instance variables - a (String) name, a (int) CPR, and a (double) salary. 2. Write a constructor with parameter that initialize the object. 3. Write setters and getters for each data member. Part (2) Write a Java application that do the following: . Create object E1 from the Employee with the following name=" Ahmed Jaffer", CPR-78956894, and salary- 1235. • Ask the user to enter the Employee name, CPR, and salary. After that, create another object E2 and initialized it with data entered by the user. . Check if the given Employees has the same salary or NOT. 1. Create a class called Employee that has three instance variables - a (String) name, a (int) CPR, and a (double) salary. 2. Write a constructor with parameter that initialize the object. 3. Write setters and getters for each data member. Part (2) Write a Java application that do the following: . Create object E1 from the Employee with the following name=" Ahmed Jaffer", CPR-78956894, and salary- 1235. • Ask the user to enter the Employee name, CPR, and salary. After that, create another object E2 and initialized it with data entered by the user. . Check if the given Employees has the same salary or NOT.
Expert Answer:
Answer rating: 100% (QA)
Code of Employee Class public class Employee Variables public String name public int CPR public doub... View the full answer
Related Book For
Introduction to Java Programming, Comprehensive Version
ISBN: 978-0133761313
10th Edition
Authors: Y. Daniel Liang
Posted Date:
Students also viewed these programming questions
-
INTELLIJ QUESTION: Intellij is literally running whatever files it wants! I am trying to run my code but it's impossible. I don't know how to fix it. It goes immediately to my other Utils.java file...
-
1. Create a class called Mammal. All mammals have a weight and a name, so its data should be the mammals weight and name. Provide a default constructor that sets the mammals weight to 0 and name to...
-
This assignment reviews object-oriented programming concepts such as classes, methods, constructors, accessor methods, and access modifiers. It makes use of an array of objects as a class data...
-
(You can use other websites for this question) The Chicago Bulls realize that they've sucked since the 90s because they have relied on one start player for too long (Jordan, Rose), and that Machine...
-
Each of the three homogeneous plates welded to the rod has a density and a thickness a. Determine the length l of plate C and the angle of placement, , so that the center of mass of the assembly...
-
Recording transactions and identifying types of adjusting entry A selection of a list of transactions for Penna is as follows: Apr 1 Paid six months of rent, $5,400 (GST exclusive) (originally...
-
For each of the following sets of numbers, calculate a \(95 \%\) confidence interval for the mean ( \(\sigma\) not known); before going through the steps in calculating the confidence interval, the...
-
In Section 5.5, we showed the following two-person, zero-sum game had a mixed strategy: a. Use dominance to reduce the game to a 2 2 game. Which strategies are dominated? b. Determine the optimal...
-
How do these parenting styles differ? How might each parenting style affect socioemotional development? What is an example of a behavior exhibited by both the parent and the child associated with...
-
Frame the Mattco case using the factors set forth in this chapter. Specific areas that should be addressed in this exercise include: a. Type of case b. Jurisdiction c. Professional standards d....
-
Sue Smith recertifies the Sumner family. Their current annual income is $45,000. The current income limit to determine the eligibility of a new family their size is $37,440. Does Sue need to...
-
What transferable skills can individuals trained in either game design or user experience (UX) design bring to the practice?
-
Which of the following best describes skimming? 1. Skimming involves the theft of cash after the cash is recorded in the companys accounting system. 2. Skimming involves the theft of cash prior to...
-
Which two adjustments are made to the fraud triangle to accommodate predators? 1. The fraud triangle is not meant to differentiate between accidental and predator raudsters. 2. Criminal mindset and...
-
Should gamified systems always be voluntary? Make an argument about if and when it is ever appropriate to make the use of a gamified system mandatory. Describe which scenarios may be fitting for such...
-
What created to opportunity for Enron to trade in this market?
-
What is a downside of using the traditional Waterfall approach? It requires a larger commitment for collaboration between project team members than Agile. It prevents the development team from...
-
Problem 3.5 (4 points). We will prove, in steps, that rank (L) = rank(LT) for any LE Rnxm (a) Prove that rank (L) = rank (LTL). (Hint: use Problem 3.4.) (b) Use part (a) to deduce that that rank(L) =...
-
Write a JSF page that displays a factorial page as shown in Figure 33.25. Display the table in an h:outputText component. Set its escape property to false to display it as HTML contents. Factoriaks -...
-
Write the following method that merges two sorted lists into a new sorted list.public static int[] merge(int[] list1,?int[] list2)Implement the method in a way that takes at most list1.length +...
-
Write a method that converts milliseconds to hours, minutes, and seconds using the following header: public static String convertMillis(long millis) The method returns a string as...
-
The first three energy levels \(E(\mathrm{eV})\) of the fictitious element \(\mathrm{X}\) are \(\ldots . . \ldots\) shown in Figure P29.56. a. What wavelengths are observed in the absorption spectrum...
-
A sodium atom in the \(3 p\) state emits a photon, decreasing the energy of the atom by \(2.10 \mathrm{eV}\). By how much does the orbital angular momentum of the atom change? Does it increase or...
-
Assume instead that the spot exchange rate between the dollar and Swiss franc is a fixed or pegged rate within a narrow band around a central rate. For each change shown in Problem 9, assume that...
Study smarter with the SolutionInn App