GMS ) m IG G G WR | | | G...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
GMS ↓ ل) ↑ С m IG G ل G WR | | × | G | G ་ github.com/Santa Barbara City College/cs105-kinneavy-f19-a04-employee-chidinmaad README.md This is where your test code will go. Replace the code in that file with the code in the grey box below: K /** *CS 105 Theory and Practice I * CRN: [CHANGE THIS TO YOUR INFORMATION] * Assignment: Employee * * Statement of code ownership: I hereby state that I have written all of this * code and I have not copied this code from any other person or source. * * @author [CHANGE THIS TO YOUR INFORMATION] */ package edu.sbcc.cs105; /** *This class provides first level testing the Employee object. * */ public class Program { /** * Create an employee and test that the proper name has been created. Test * the initial salary amount and then give the employee a raise. Then check * to make sure the salary matches the raised salary. * * command line values. Not used in this example. ☑ Σ */ public static void main(String[] args) { // TODO: Paste code in here from the sample usage section. Feel free to adjust thing * @param args * Similar to the Employee.java file go through Program.java and change the [CHANGE THIS TO YOUR INFORMATION] text to the proper items. There are two items to be changed. } } JMD DeJ zy C | + A > ... GMS ↓ ل) ↑ С m K IG G ل G WR | | × | G | G ་ Σ ☑ JMD DeJ zy C | + github.com/Santa Barbara City College/cs105-kinneavy-f19-a04-employee-chidinmaad README.md The project name of this exercise is Employee. The purpose of this assignment is to give you some practice problem solving, writing your own classes, and running unit tests. Problem Description Implement a class Employee and test it in your Program**.java**. An employee has a name (a String) and a salary (a double). Your Employee class must follow the provided specification below: A constructor with two explicit arguments: public Employee(String employee Name, double currentSalary) - Constructor. The constructor will initialize instance variables of the same name as provided parameters. That is, it will assign the values from the parameters to the instance variables. Method Declarations / Class Interface **public String getName() - Returns the name of the employee from the instance variable employee Name public double getSalary () - Returns the current salary. It gets this value from an instance variable named currentSalary public void raiseSalary (double by Percent) - Gives the employee a raise according to the explicit argument byPercent. This method will modify the value of the currentSalary instance variable Sample Usage (paste this inside your main() method of Program.Java): Employee harry = new Employee("Harry", 10000); harry.raiseSalary(10); // Harry gets a 10% raise. double harrysSalary = harry.getSalary(); Getting Started A > ... GMS ↓ ل) ↑ С m IG G ل G WR | | × | G | G ་ github.com/Santa Barbara City College/cs105-kinneavy-f19-a04-employee-chidinmaad README.md This is where your test code will go. Replace the code in that file with the code in the grey box below: K /** *CS 105 Theory and Practice I * CRN: [CHANGE THIS TO YOUR INFORMATION] * Assignment: Employee * * Statement of code ownership: I hereby state that I have written all of this * code and I have not copied this code from any other person or source. * * @author [CHANGE THIS TO YOUR INFORMATION] */ package edu.sbcc.cs105; /** *This class provides first level testing the Employee object. * */ public class Program { /** * Create an employee and test that the proper name has been created. Test * the initial salary amount and then give the employee a raise. Then check * to make sure the salary matches the raised salary. * * command line values. Not used in this example. ☑ Σ */ public static void main(String[] args) { // TODO: Paste code in here from the sample usage section. Feel free to adjust thing * @param args * Similar to the Employee.java file go through Program.java and change the [CHANGE THIS TO YOUR INFORMATION] text to the proper items. There are two items to be changed. } } JMD DeJ zy C | + A > ... GMS ↓ ل) ↑ С m IG G ل G WR | | × | G | G ་ github.com/Santa Barbara City College/cs105-kinneavy-f19-a04-employee-chidinmaad README.md This is where your test code will go. Replace the code in that file with the code in the grey box below: K /** *CS 105 Theory and Practice I * CRN: [CHANGE THIS TO YOUR INFORMATION] * Assignment: Employee * * Statement of code ownership: I hereby state that I have written all of this * code and I have not copied this code from any other person or source. * * @author [CHANGE THIS TO YOUR INFORMATION] */ package edu.sbcc.cs105; /** *This class provides first level testing the Employee object. * */ public class Program { /** * Create an employee and test that the proper name has been created. Test * the initial salary amount and then give the employee a raise. Then check * to make sure the salary matches the raised salary. * * command line values. Not used in this example. ☑ Σ */ public static void main(String[] args) { // TODO: Paste code in here from the sample usage section. Feel free to adjust thing * @param args * Similar to the Employee.java file go through Program.java and change the [CHANGE THIS TO YOUR INFORMATION] text to the proper items. There are two items to be changed. } } JMD DeJ zy C | + A > ... GMS ↓ ل) ↑ С m K IG G ل G WR | | × | G | G ་ Σ ☑ JMD DeJ zy C | + github.com/Santa Barbara City College/cs105-kinneavy-f19-a04-employee-chidinmaad README.md The project name of this exercise is Employee. The purpose of this assignment is to give you some practice problem solving, writing your own classes, and running unit tests. Problem Description Implement a class Employee and test it in your Program**.java**. An employee has a name (a String) and a salary (a double). Your Employee class must follow the provided specification below: A constructor with two explicit arguments: public Employee(String employee Name, double currentSalary) - Constructor. The constructor will initialize instance variables of the same name as provided parameters. That is, it will assign the values from the parameters to the instance variables. Method Declarations / Class Interface **public String getName() - Returns the name of the employee from the instance variable employee Name public double getSalary () - Returns the current salary. It gets this value from an instance variable named currentSalary public void raiseSalary (double by Percent) - Gives the employee a raise according to the explicit argument byPercent. This method will modify the value of the currentSalary instance variable Sample Usage (paste this inside your main() method of Program.Java): Employee harry = new Employee("Harry", 10000); harry.raiseSalary(10); // Harry gets a 10% raise. double harrysSalary = harry.getSalary(); Getting Started A > ... GMS ↓ ل) ↑ С m K IG G ل G WR | | × | G | G ་ Σ ☑ JMD DeJ zy C | + github.com/Santa Barbara City College/cs105-kinneavy-f19-a04-employee-chidinmaad README.md The project name of this exercise is Employee. The purpose of this assignment is to give you some practice problem solving, writing your own classes, and running unit tests. Problem Description Implement a class Employee and test it in your Program**.java**. An employee has a name (a String) and a salary (a double). Your Employee class must follow the provided specification below: A constructor with two explicit arguments: public Employee(String employee Name, double currentSalary) - Constructor. The constructor will initialize instance variables of the same name as provided parameters. That is, it will assign the values from the parameters to the instance variables. Method Declarations / Class Interface **public String getName() - Returns the name of the employee from the instance variable employee Name public double getSalary () - Returns the current salary. It gets this value from an instance variable named currentSalary public void raiseSalary (double by Percent) - Gives the employee a raise according to the explicit argument byPercent. This method will modify the value of the currentSalary instance variable Sample Usage (paste this inside your main() method of Program.Java): Employee harry = new Employee("Harry", 10000); harry.raiseSalary(10); // Harry gets a 10% raise. double harrysSalary = harry.getSalary(); Getting Started A > ...
Expert Answer:
Answer rating: 100% (QA)
To get started with the Employee class implementation and testing in your Programjava file you can follow the steps outlined in the READMEmd file prov... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
A student adds NBS to a solution of 1-methylcyclohexene and irradiates the mixture with a sunlamp until all the NBS has reacted. After a careful distillation, the product mixture contains two major...
-
JB Corporation is a C corporation owned 80 percent by Jacob and 20 percent by Bauer. Jacob would like JB to make an S election but Bauer is opposed to the idea. Can JB elect to be taxed as an S...
-
In Exercises 5156, find all values of x satisfying the given conditions. 1 = 2x 1 x + 2x - 8 1 = Y + y2 = y3. 2 x + 4/3 = 1 x - 2' and
-
Plaintiff purchased stain and paint from defendant that, upon application, presented significant issues: discoloration and cracking. These issues became apparent 30 days after receipt of the...
-
Ross Textiles wishes to measure its cost of common stock equity. The firms stock is currently selling for $57.50. The firm expects to pay a $3.40 dividend at the end of the year (2013). The dividends...
-
Write down a regular expression for the following language: L= {w (p, q): number of p's in w is divisible by 4 }
-
Harrison Inc. acquired Mason Co. for $345,000 and assumed all liabilities at the date of acquisition. Mason Co had the following balance sheet data: Assets of $390,000, liabilities of $25,000, and...
-
The essential sections needed in an effective job description. 1. Job identification 2. Job summary 3. Responsibilities and duties 4. Authority of incumbent 5. Standards of performance 6. Working...
-
if a company has $100,000 in revenue, $20,000 in equipment depreciation and $10,000 in deductions, what is their taxable income?
-
BMW's strategic analysis of the transition to electric vehicles. What alternatives are there for consumers and for the BWM to be successful?
-
Based on Customer Services, what is flower of service and give example with Malaysia context?
-
Calculate the flow rate of blood (of density 1.02 g/cm3) in an aorta with a cross-sectional area of 1.97 cm2 if the flow speed is 40.7 cm/s .
-
12. Hydrocarbon mixtures are used as fuels. (State the atomic mass of each atom you are using for each solution) How many grams of CO:(g) are produced by the combustion of 200. g of a mixture that is...
-
In the current year, the City of Omaha donates land worth $500,000 to Ace Corporation to induce it to locate in Omaha and create an estimated 2,000 jobs for its citizens. a. How much income, if any,...
-
Yolanda is a cash basis taxpayer with the following transactions during the year: Cash received from sales of products........................................................................$65,000...
-
For each of the following situations, indicate whether the taxpayer(s) is (are) required to file a tax return for 2012. Explain your answer. a. Helen is a single taxpayer with interest income in 2012...
-
Ken (age 31) and Amy (age 28) Booth have brought you the following information regarding their income, expenses, and withholding for the year. They are unsure which of these items must be used to...
-
Cress Trust owns houses in Marion County, for whom Rainbow Realty Group, Inc., sells, rents, and manages. The same person serves as Rainbows president and Cresss corporate trustee. Cress offers four...
-
Genevieve and William Timmons began their tenancy of a ground-floor apartment at Cobblestone Square in September 2011. Kingsley-Johnston, Inc., is a property management company responsible for...
-
Linda Miller rented 35 acres of pastureland in Wabaunsee County, Kansas, from William Burnett for $1,000 per year. Miller and her husband used the land to grow and harvest brome grass for their...
Study smarter with the SolutionInn App