Click here to Skip to main content
15,887,822 members
Home / Discussions / Java
   

Java

 
AnswerRe: I am getting this Exception: Pin
Afzaal Ahmad Zeeshan12-May-15 4:22
professionalAfzaal Ahmad Zeeshan12-May-15 4:22 
GeneralRe: I am getting this Exception: Pin
Sascha Lefèvre12-May-15 10:41
professionalSascha Lefèvre12-May-15 10:41 
SuggestionRe: I am getting this Exception: Pin
Sascha Lefèvre12-May-15 10:43
professionalSascha Lefèvre12-May-15 10:43 
Questionmaps Pin
Member 116652324-May-15 23:18
Member 116652324-May-15 23:18 
AnswerRe: maps Pin
Richard MacCutchan4-May-15 23:52
mveRichard MacCutchan4-May-15 23:52 
QuestionKruskal Algorithm Pin
Member 116604013-May-15 1:46
Member 116604013-May-15 1:46 
AnswerRe: Kruskal Algorithm Pin
Sascha Lefèvre3-May-15 2:01
professionalSascha Lefèvre3-May-15 2:01 
QuestionI am getting a Compile Error Pin
Member 115176992-May-15 8:30
Member 115176992-May-15 8:30 
C#
package week3rvsdsalesperson;

/**how do I fix the lic class line?
 *
 * @author Henry
 */
public class Week3rvsdSalesperson {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {

         lic class week3rvsdsalesperson

    private final double annualSalary = 40000.00;
    private final double salesTarget = 120000;
    private final double commissionRate = 5.0;

    private double annualSales;

    //default constructor
    public week3rvsdsalesperson() {
        annualSales = 0.0;
    }

    //parameterized constructor
    public week3rvsdsalesperson(double aSale) {
        annualSales = aSale;
    }

    //getter method for the annual sales
    public double getAnnualSales(){
        return annualSales;
    }

    //method to set the value of annual sale
    public void setAnnualSales(double aSale) {
        annualSales = aSale;
    }

    //method to calcualte and get commission
    public double commission (){
        double commission = 0;
        if(annualSales>= (salesTarget*(80/100))) {//80% of the sales target

            if(annualSales>= salesTarget){
                commission = salesTarget * (commissionRate/100.0) + (annualSales- salesTarget)* (12.5/100.0);
            }
            else
                commission = annualSales * (commissionRate/100.0);
        }
        return commission ;
    }

    //method to calcualte and get  annual compensation
    public double annualCompensation  (){
        return annualSalary + commission();
    }

         }
    }
}

AnswerRe: I am getting a Compile Error Pin
Richard MacCutchan2-May-15 20:53
mveRichard MacCutchan2-May-15 20:53 
GeneralRe: I am getting a Compile Error Pin
Member 115176993-May-15 7:45
Member 115176993-May-15 7:45 
GeneralRe: I am getting a Compile Error Pin
Sascha Lefèvre3-May-15 14:33
professionalSascha Lefèvre3-May-15 14:33 
GeneralRe: I am getting a Compile Error Pin
Richard MacCutchan3-May-15 21:25
mveRichard MacCutchan3-May-15 21:25 
QuestionSpring MVC Example With Explanation Pin
Member 1165531330-Apr-15 6:13
Member 1165531330-Apr-15 6:13 
QuestionNoobie in need of help / direction Pin
Member 1163661723-Apr-15 5:09
Member 1163661723-Apr-15 5:09 
QuestionRe: Noobie in need of help / direction Pin
Richard MacCutchan23-Apr-15 5:42
mveRichard MacCutchan23-Apr-15 5:42 
AnswerRe: Noobie in need of help / direction Pin
Member 1163661724-Apr-15 10:03
Member 1163661724-Apr-15 10:03 
GeneralRe: Noobie in need of help / direction Pin
Richard MacCutchan24-Apr-15 22:03
mveRichard MacCutchan24-Apr-15 22:03 
AnswerRe: Noobie in need of help / direction Pin
jschell26-Apr-15 7:23
jschell26-Apr-15 7:23 
QuestionDigital clock javafx Pin
Member 1158717420-Apr-15 19:50
Member 1158717420-Apr-15 19:50 
AnswerRe: Digital clock javafx Pin
Richard MacCutchan20-Apr-15 21:38
mveRichard MacCutchan20-Apr-15 21:38 
QuestionHow Can I Map An Access Path In Spring Security For A Single .Html Page Inside A Folder, Without Giving Access To All The Pages In Htat Folder Pin
CodeZero216-Apr-15 4:09
CodeZero216-Apr-15 4:09 
AnswerRe: How Can I Map An Access Path In Spring Security For A Single .Html Page Inside A Folder, Without Giving Access To All The Pages In Htat Folder Pin
PIEBALDconsult16-Apr-15 4:27
mvePIEBALDconsult16-Apr-15 4:27 
QuestionFile Handling Pin
Member 115824517-Apr-15 6:17
Member 115824517-Apr-15 6:17 
QuestionRe: File Handling Pin
Richard MacCutchan7-Apr-15 21:09
mveRichard MacCutchan7-Apr-15 21:09 
AnswerRe: File Handling Pin
Member 115824519-Apr-15 8:34
Member 115824519-Apr-15 8:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.