For Dr. CompExpert Only

profileehmagrzm7i
week_3_sales.zip

week 3 sales/build.xml

Builds, tests, and runs the project week 3 sales.

week 3 sales/build/classes/.netbeans_automatic_build

week 3 sales/build/classes/.netbeans_update_resources

week 3 sales/build/classes/week/pkg3/sales/totalSales.class

                package week.pkg3.sales;

                synchronized 
                class totalSales {
    void totalSales();
}

            

week 3 sales/build/classes/week/pkg3/sales/Week3Sales.class

                package week.pkg3.sales;

                public 
                synchronized 
                class Week3Sales {
    double 
                salary;
    
                static double 
                salesTarget;
    double 
                totalSales;
    double 
                commisionRate;
    
                static double 
                accelrationFactor;
    
                public void Week3Sales();
    
                public 
                static void 
                main(String[]);
    
                private Object 
                totalCompensation(double);
    
                static void 
                <clinit>();
}

            

week 3 sales/manifest.mf

Manifest-Version: 1.0 X-COMMENT: Main-Class will be added automatically by build

week 3 sales/nbproject/build-impl.xml

Must set src.dir Must set test.src.dir Must set build.dir Must set dist.dir Must set build.classes.dir Must set dist.javadoc.dir Must set build.test.classes.dir Must set build.test.results.dir Must set build.classes.excludes Must set dist.jar Must set javac.includes No tests executed. Must set JVM to use for profiling in profiler.info.jvm Must set profiler agent JVM arguments in profiler.info.jvmargs.agent Must select some files in the IDE or set javac.includes To run this application from the command line without Ant, try: java -jar "${dist.jar.resolved}" Must select one file in the IDE or set run.class Must select one file in the IDE or set run.class Must select one file in the IDE or set debug.class Must select one file in the IDE or set debug.class Must set fix.includes This target only works when run from inside the NetBeans IDE. Must select one file in the IDE or set profile.class This target only works when run from inside the NetBeans IDE. This target only works when run from inside the NetBeans IDE. This target only works when run from inside the NetBeans IDE. Must select one file in the IDE or set run.class Must select some files in the IDE or set test.includes Must select one file in the IDE or set run.class Must select one file in the IDE or set applet.url Must select some files in the IDE or set javac.includes Some tests failed; see details above. Must select some files in the IDE or set test.includes Some tests failed; see details above. Must select some files in the IDE or set test.class Must select some method in the IDE or set test.method Some tests failed; see details above. Must select one file in the IDE or set test.class Must select one file in the IDE or set test.class Must select some method in the IDE or set test.method Must select one file in the IDE or set applet.url Must select one file in the IDE or set applet.url

week 3 sales/nbproject/genfiles.properties

build.xml.data.CRC32=888bb55b build.xml.script.CRC32=d5e2edd2 [email protected] # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. nbproject/build-impl.xml.data.CRC32=888bb55b nbproject/build-impl.xml.script.CRC32=1122d468 nbproject/[email protected]

week 3 sales/nbproject/private/private.properties

compile.on.save=true user.properties.file=C:\\Users\\kheat_000\\AppData\\Roaming\\NetBeans\\8.1\\build.properties

week 3 sales/nbproject/project.properties

annotation.processing.enabled=true annotation.processing.enabled.in.editor=false annotation.processing.processor.options= annotation.processing.processors.list= annotation.processing.run.all.processors=true annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output build.classes.dir=${build.dir}/classes build.classes.excludes=**/*.java,**/*.form # This directory is removed when the project is cleaned: build.dir=build build.generated.dir=${build.dir}/generated build.generated.sources.dir=${build.dir}/generated-sources # Only compile against the classpath explicitly listed here: build.sysclasspath=ignore build.test.classes.dir=${build.dir}/test/classes build.test.results.dir=${build.dir}/test/results # Uncomment to specify the preferred debugger connection transport: #debug.transport=dt_socket debug.classpath=\ ${run.classpath} debug.test.classpath=\ ${run.test.classpath} # Files in build.classes.dir which should be excluded from distribution jar dist.archive.excludes= # This directory is removed when the project is cleaned: dist.dir=dist dist.jar=${dist.dir}/week_3_sales.jar dist.javadoc.dir=${dist.dir}/javadoc excludes= includes=** jar.compress=false javac.classpath= # Space-separated list of extra javac options javac.compilerargs= javac.deprecation=false javac.external.vm=true javac.processorpath=\ ${javac.classpath} javac.source=1.8 javac.target=1.8 javac.test.classpath=\ ${javac.classpath}:\ ${build.classes.dir} javac.test.processorpath=\ ${javac.test.classpath} javadoc.additionalparam= javadoc.author=false javadoc.encoding=${source.encoding} javadoc.noindex=false javadoc.nonavbar=false javadoc.notree=false javadoc.private=false javadoc.splitindex=true javadoc.use=true javadoc.version=false javadoc.windowtitle= main.class=week.pkg3.sales.Week3Sales manifest.file=manifest.mf meta.inf.dir=${src.dir}/META-INF mkdist.disabled=false platform.active=default_platform run.classpath=\ ${javac.classpath}:\ ${build.classes.dir} # Space-separated list of JVM arguments used when running the project. # You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. # To set system properties for unit tests define test-sys-prop.name=value: run.jvmargs= run.test.classpath=\ ${javac.test.classpath}:\ ${build.test.classes.dir} source.encoding=UTF-8 src.dir=src test.src.dir=test

week 3 sales/nbproject/project.xml

org.netbeans.modules.java.j2seproject week 3 sales

week 3 sales/src/week/pkg3/sales/totalSales.java

week 3 sales/src/week/pkg3/sales/totalSales.java

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package  week . pkg3 . sales ;

/**
 *
 *  @author  emmagreyson
 */
class  totalSales  {
    
}
Object  totalCompensation ( double  annualSales )   {
         throw   new   UnsupportedOperationException ( "Not supported yet." );   //To change body of generated methods, choose Tools | Templates.
   
    
}

week 3 sales/src/week/pkg3/sales/Week3Sales.java

week 3 sales/src/week/pkg3/sales/Week3Sales.java

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package  week . pkg3 . sales ;
import  java . text . DecimalFormat ;
import  java . util . Scanner ;
/**
 *
 *  @author  emmagreyson
 * 
 */
public   class   Week3Sales   {
     double  salary = 100000 ;    //fixed salary
     static   double  salesTarget = 150000 ;    //target salary
     double  totalSales ;
     double  commisionRate = 15 ;    //commision Rate
     static   double  accelrationFactor = 1.25 ;     //acceleration factor
     /**   
}    
    public Week3Sales(double totalSales) {  
        this.totalSales = totalSales;
    }

    public Week3Sales() {
    }
      public double totalCompensation(double totalSales)
    {
        if(totalSales<salesTarget)  //if sales target is not acheived yet
        {
            if(totalSales>=(salesTarget*0.8))   // total sales are greater than equal to 80 % of sales Target
            {
                return salary+totalSales*commisionRate/100;     
            }
            else    // total Sales are smaller than 80% of sales target so no extra compensation
            {
                return salary;
            }
        }
        else   // if sales target is achieved 
        {
            return salary+(totalSales*commisionRate*accelrationFactor/100);
        }    
    }
    /**
     *  @param  args the command line arguments
     */
     public   static   void  main ( String []  args )   {
         Week3Sales  s = new   Week3Sales ();      // creating a sales person object
         DecimalFormat  df = new   DecimalFormat ( "0.00" );
         double  annualSales ;
         System . out . println ( "Enter the total annual sales : " );
         Scanner  in  = new   Scanner ( System . in );
        annualSales = Double . parseDouble ( in . nextLine ());
         double  extendedSales = annualSales + annualSales * 0.5 ;      // extended sales is equal to 50% greater than annual sales
         System . out . println ( "Total Sales  "   + "   Total Compensation" );
         while ( annualSales <= extendedSales )
         {
              System . out . println ( "$" + annualSales + "         $" + df . format ( s . totalCompensation ( annualSales )));
             annualSales += 5000 ;
         }
     }     

     private   Object  totalCompensation ( double  annualSales )   {
         throw   new   UnsupportedOperationException ( "Not supported yet." );   //To change body of generated methods, choose Tools | Templates.
     }
}