//default constructor public SalesPerson() { name = "Unknown"; annual_Sales = 0.0; }
//parameterized constructor public SalesPerson(String nm, double aSale) { name = nm; annual_Sales = aSale; }
//getter method for the name public String getName() { return name; }
//setter method to set name public void setName(String nm) { name = nm; }
//getter method for the annual sales public double getAnnualSales() { return annual_Sales; }
//method to set the value of annual sale public void setAnnualSales(double aSale) { annual_Sales = aSale; }
//method to calculate and get commission public double commission() { double commission = 0; if (annual_Sales >= (sales_Target * (80 / 100))) {//80% of the sales target
//method to calculate and get annual compensation public double annualCompensation() { return fixed_Salary + commission(); }
}
public class Main { public static void main(String args[]) {
//array list to have a collection of sales persons ArrayList<SalesPerson> sales_Persons = new ArrayList<>();
Scanner input = new Scanner(System.in); do {
//prompt the user to enter name System.out.print("Enter Sales Person name (stop to EXIT) : "); String name = input.nextLine().trim();
if (name.equalsIgnoreCase("stop")) { break; }
//creating an object of SalesPerson class SalesPerson sales_Person = new SalesPerson();
//set name of sales person sales_Person.setName(name);
//prompt the user to enter the annual sales System.out.print("Enter the annual sales : "); double sale = input.nextDouble();
//set the value of annual sale of sales person object sales_Person.setAnnualSales(sale);
//add sales Person to array list sales_Persons.add(sales_Person);
//read a blank line input.nextLine();
} while (true);
//getting the 2 minimum annual compensation double min = -1; double secondMin = -1;
//interchanging if in reverse order if (firstValue < secondValue) { min = firstValue; secondMin = secondValue; } else { min = secondValue; secondMin = firstValue; }
double nextElement = -1;
//comparing the 2 to n values for (int i = 2; i < sales_Persons.size(); i++) { nextElement = sales_Persons.get(i).annualCompensation(); if (nextElement
american public was clamorouing for war with France and was ultimatley unaware of the peace treaty signed by Adams and the French cost him a second term. Once elected, Jefferon repudiated Federalist policiess, lowered taxes and cut military spending by 1/3. He believed in a smaller governemnt and trusted well informed citizen to govern themselves. He therefore repealed the Alien and Sedition Act. The Jefferson admistration faced many issues during his eight years in office. Politically, Jefferson…
Case: _Centra Software Name(s):Alyssa Altman & Ashley Hayes Section: ______ Be sure to hand in the complete template, including grading sheets. Fiel d Sa les 2. Les ser ’s S trateg y 1. Ree d ’s Strat egy 5 & 6. Alternatives and analysis (typically 3-5 alternatives) 3. E limi nate 1. Strengths -Leon Navickas who is the founder of Centra had worked as general manager of Advanced Research and Development on the Lotus Notes groupware, which shows he has knowledge of the industry. (pg 4)…
information) electronically” (Anderson Consulting,1999). E-business has played an important role in the nature of retailing. John Dawson (1996) suggested that there are three type of investment, which has lead retailers towards profitability: 1. Knowledge-based investments: It provide more creative ways to run the enterprise; 2. Alliances-based investments: between businesses work to generate new or reinforce existing competitive positions; and 3. Productivity-based investments: seek…
no strict definition of what constitutes it. Therefore, judges have to interpret what is meant by recklessness through case law. The Criminal Damage Act 1971 had replaced the Malicious Damage Act 1861, where mens rea had been defined as ‘maliciously’.1 It replaced the term ‘maliciousness’ with ‘recklessness’ but recklessness was not defined in the new Act. Recklessness in the legal sense is concerned with conscious taking of an unjustified risk of harm.2 Between 1982 and 2003, recklessness was described…
Firewalls: Putting a Limit on Learning High school English teacher, Ms. Smith, searched all night for the perfect tutorial on how to write an essay for her struggling students. She was about to give up when she found the perfect video on YouTube. In the next class, excited for this influential lecture, Ms. Smith opened her laptop to show her students the video, but when she tried to open the link the website simply read “ACCESS DENIED.” The gray ambiance of the projector stared at the faces of…
The Evolution of the Accounting Quality Model Sam Ferguson Regis University Executive Summary Charlie Hoffman is credited with inventing XBR, is a computer readable language for financial reporting similar to HTML language except for it allows users to define the tags. Each tag element of the financial data provides the user a linkbases to a set of taxonomies comprised of the Accounting Standard Codification reassuring users the information can be compared to other XBRL reports. The SEC adapted…
be very concerned about. Based on the data provided, the drop is attributed to the declining economy and sales trends in the product mix. Based on the data provided, this trend is expected to continue for the next three years (TaskStream.com - Task 1 competition Bikes Inc. Storyline, 2015). Gross Profits are another area where there is a weakness between years 7 and 8, which is considerable at 16.3%. In prior years, year 6 to year 7, Gross Profits was a strength for the company and had previously…
west empire is gone o Beginning of the separation of Eastern (orthodox)/ Western (latin catholic) church happens in the 11th century o Next time we talk about Judaism and roman contexts. AUGUST 23 JEWISH AND ROMAN CONTEXTS (I) • CHADWICK, CH. 1 Judaism is ultimately responsible for the reconfiguration of the world. Judaism originates with a small people. Nomadic herdsmen. It changed the way people think about everything. When we talk about the origination of Judaism in antiquity. We are…