Linda is starting a new cosmetic and clothing business and w

Linda is starting a new cosmetic and clothing business and would like to make a net profit of approximately 10% after paying all the expenses, which induce merchandise cost, store rent, employees\' salary, and electricity cost for the store. She would like to know how much the merchandise should be marked up so that after paying all the expenses at the end of the year she gets approximately 10% net profit on the merchandise cost. Note that after marking up the price of an item she would like to put the item on 15% sale. Write a program that prompts Linda to enter the total cost of the merchandise, the salary of the employees (including her own salary), the yearly rent, and the estimated electricity cost. The program then outputs how much the merchandise should be marked up so that Linda gets the desired profit. Get Merchandise cost Get Employee Salary Get Yearly store Rent Get Electric cost Total Cost = Merchandise cost + store rent + Employee Salary + Electricity cost Markup Price = (Total cost + Total cost * 10% profit)* (/1-sales)* Total cost) Display all the input values and total cost Display sold price of the product

Solution

Hey, there were some problems with the formula, so I have corrected it so that it gives the mathematically correct answer. It would be merchandiseCost in the formula at 2 places instead of total cost. I have checked it several times and it is giving correct result after changing the formula. Please comment in case you have a doubt regarding the same.

Store.java:


import java.util.Scanner;

public class Store {

   public static void main(String args[]){
      
       float storeRent, merchandiseCost, electricityCost, employeeSalary;
      
       Scanner scanner = new Scanner(System.in);
       System.out.println(\"Enter store Rent \");
       storeRent=scanner.nextFloat();
       System.out.println(\"Enter merchandise Cost\");
       merchandiseCost=scanner.nextFloat();
       System.out.println(\"Enter electricity Cost \");
       electricityCost=scanner.nextFloat();
       System.out.println(\"Enter employee Salary\");
       employeeSalary=scanner.nextFloat();

       float total=storeRent+ merchandiseCost + electricityCost + employeeSalary;

       //System.out.println(\"Year \\t Total Amount Invested \\t Compound Interest \\t Amount earned\");

       float markupPrice=(float) (total +(merchandiseCost/10f)) / (float) (.85 * merchandiseCost);
      
       System.out.println(\"Store Rent : \" + storeRent);
       System.out.println(\"Merchandise Cost : \"+ merchandiseCost);
       System.out.println(\"Electricity Cost : \"+ electricityCost);
       System.out.println(\"Employee total salary : \"+ employeeSalary);
      
       System.out.println(\"Total Cost : \"+ total);
      
       System.out.println(\"The merchandise should be marked up by a factor of \" + markupPrice + \" to achieve the desired profit. Hence the total sold price of merchandise must be \" + (markupPrice*merchandiseCost));
       scanner.close();
   }
}


Sample run 1:
Enter store Rent
500
Enter merchandise Cost
100
Enter electricity Cost
10
Enter employee Salary
50
Store Rent : 500.0
Merchandise Cost : 100.0
Electricity Cost : 10.0
Employee total salary : 50.0
Total Cost : 660.0
The merchandise should be marked up by a factor of 7.882353 to achieve the desired profit. Hence the total sold price of merchandise must be 788.2353


Sample run 2:
Enter store Rent
45260
Enter merchandise Cost
24250
Enter electricity Cost
1550
Enter employee Salary
10000
Store Rent : 45260.0
Merchandise Cost : 24250.0
Electricity Cost : 1550.0
Employee total salary : 10000.0
Total Cost : 81060.0
The merchandise should be marked up by a factor of 4.0502124 to achieve the desired profit. Hence the total sold price of merchandise must be 98217.65

 Linda is starting a new cosmetic and clothing business and would like to make a net profit of approximately 10% after paying all the expenses, which induce mer
 Linda is starting a new cosmetic and clothing business and would like to make a net profit of approximately 10% after paying all the expenses, which induce mer

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site