English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Can anybody please help me.I have tried to do this program but it's wrong. Some ppl have said this program is easy but,what I'm doing is wrong.


1. multiple methods (at least 2 others as well as main)
2. Declare functions,call them with multiple argument and return values from them
3. Use final variables to store literal values
4. Use import javax.swing.*; library for using JOptionPane.showInputDialog and JOptionPane.showMessageDialog


I need a program that works out how a company's profit is to be shared amongst the partners and employees.The 3 partners share half of the profit. The remaining half is shared equally amongst the other employees as a bonus. The user should input the total profit made and number of workers and the program should print out the amount to be given to the partners and the amount given to the workers.

The program should use 2 seperate methods to do the two calculations.Each method should be passed the profit(input elsewhere)as argument.

2007-12-06 18:53:41 · 2 answers · asked by fashionwalker 2 in Computers & Internet Programming & Design

2 answers

It should be easy.

So all the java you need should be below.

So
public double partnerProfit(double totalProfit, int divisor, int partnerCount) {
return totalProfit / divisor / partnerCount;
}

2007-12-06 19:49:21 · answer #1 · answered by AnalProgrammer 7 · 0 0

public classification xyz { public void say() { equipment.out.println("i'm occasion approach. To invoke me, you are able to desire to have an objectn"); } public static void say1() { equipment.out.println("i'm static approach. To invoke me, you opt to no longer have an objectn"); } public static void significant(String []a) { say1(); xyz A=new xyz(); A.say(); } }

2016-11-14 18:02:39 · answer #2 · answered by ? 4 · 0 0

fedest.com, questions and answers