Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

3. Hayley Mills owns a small stationary shop in downtown Boston. Hayley is plann

ID: 3599263 • Letter: 3

Question

3. Hayley Mills owns a small stationary shop in downtown Boston. Hayley is planning for the upcoming Christmas season and needs to decide how many boxes of Christmas cards to order from her supplier. The cost of each box depends on how many Hayley orders as she will receive quantity discounts for larger orders. The cost per box according to order size is given in the following table. Boxes ordered 0 to 49 50 to 99 100 to 149 150 to 200 Cost per box $5.50 $5.00 $4.50 $4.00 Each box will be sold before Christmas for $15.00. If there are boxes leftover after Christmas, they will be sold for $6.00 per box. Create a profit model for Hayley so she can investigate different order quantities vs potential demand.(You must use IF and VLookUP functions) Create a two-way table to show the sensitivity of profit to changes in Demand and Order Quantity . .Put Demand as the row, Order Quantity as the column. Use the values 50, 100, 150, 200, 250, 300 for both.

Explanation / Answer

package com;

public class ReverseString {

public static void main(String[] args) {

boolean isvalidate=ReverseString.validateString(args[0]);

if(isvalidate){

String value=ReverseString.reverseString(args[0]);

}

else{

System.out.println("Please enter valid String ! String should not be less then 5 character");

}

}

public static String reverseString(String input){

String result="";

char [] strValue=input.toCharArray();

for(int i=strValue.length-1;i>=0;i--){

result=result+strValue[i];

}

System.out.println(result);

return result;

}

public static boolean validateString(String strVal){

boolean flag=false;

if(strVal.length()>=5){

flag=true;

}

else{

flag=false;

}

return flag;

}

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote