1 public class USE11R 2 { String inputName; String inputSalary; String percentageRaise; float raiseSalary; public String getName () { return inputName; 10 11 } public void setName (String name) 12 13...


These two pictures are my resource and driver classes. Please, help me with the error in my resource class. I want my resource class to have getName, getSalary, getThePercentageThatTheEmployeeWantToRaise, and calculateTheNewSalary methods. For my driver class, I want the driver class to ask the user to input their name, salary, how much they want to raise, and print out their new salary.



1 public class USE11R<br>2 {<br>String inputName;<br>String inputSalary;<br>String percentageRaise;<br>float raiseSalary;<br>public String getName ()<br>{<br>return inputName;<br>10<br>11<br>}<br>public void setName (String name)<br>12<br>13<br>{<br>this.inputName = name;<br>}<br>public String getSalary()<br>{<br>return inputSalary;<br>}<br>public void setSalary(String salary)<br>{<br>this.inputSalary - salary;<br>}<br>public String getRaisePercentage()<br>{<br>return percentageRaise;<br>}<br>public void setPercentageRaise(String raise)<br>{<br>this.percentageRaise = raise;<br>}<br>public void calculateNewSalary()<br>{<br>raiseSalary = inputSalary + inputSalary * percentageRaise / 100;<br>14<br>15<br>16<br>17<br>18<br>19<br>20<br>21<br>22<br>23<br>24<br>25<br>26<br>27<br>28<br>29<br>34<br>35<br>36<br>GU5E11R.java G U5E11D.java G U4P17.java<br>Compile Messages<br>JGRASP Messages<br>Run I/O<br>Interactions<br>| USE11R.java:35: error: bad operand types for binary operator **<br>raiseSalary = inputSalary + inputSalary * percentageRaise / 100;<br>Stop<br>Clear<br>first type: String<br>second type: String<br>Сорy<br>

Extracted text: 1 public class USE11R 2 { String inputName; String inputSalary; String percentageRaise; float raiseSalary; public String getName () { return inputName; 10 11 } public void setName (String name) 12 13 { this.inputName = name; } public String getSalary() { return inputSalary; } public void setSalary(String salary) { this.inputSalary - salary; } public String getRaisePercentage() { return percentageRaise; } public void setPercentageRaise(String raise) { this.percentageRaise = raise; } public void calculateNewSalary() { raiseSalary = inputSalary + inputSalary * percentageRaise / 100; 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 34 35 36 GU5E11R.java G U5E11D.java G U4P17.java Compile Messages JGRASP Messages Run I/O Interactions | USE11R.java:35: error: bad operand types for binary operator ** raiseSalary = inputSalary + inputSalary * percentageRaise / 100; Stop Clear first type: String second type: String Сорy
1 import java.util.*;<br>2 public class USE11D<br>3 {<br>public static void main (String[] args)<br>{<br>Scanner sc = new Scanner(System.in);<br>4<br>7<br>System.out.print(

Extracted text: 1 import java.util.*; 2 public class USE11D 3 { public static void main (String[] args) { Scanner sc = new Scanner(System.in); 4 7 System.out.print("Please, enter your name: "); String inputName = sc.nextline(); 8. 10 11 12 System.out.print("Please, enter your salary: "); String inputSalary = sc.nextline (); 13 14 15 System.out.print("Please, enter how many percent you want to raise your salary: "); String percentageRaise = sc.nextLine(); 16 17 18 USE11R resource = new U5E11R(); resource.setName (inputName); resource.setSalary(inputSalary); resource.calculateNewSalary(); } 19 20 21 22 23 24 } 25

Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here