Question

JAVA PROGRAM Caitlyn's Crafty Creations computes a retail price for each product as the cost of...

JAVA PROGRAM

Caitlyn's Crafty Creations computes a retail price for each product as the cost of materials plus $14 multiplied by the number of hours of work required to create the product, plus $6 shipping and handling. Caitlyn’s Crafty Creations is having a semi-annual sale now, and everything is 25% off before shipping and handling:

Retail price = 0.75 * (cost of materials + (14 * hours of work)) + 6

Create a class that contains a main () method that prompts the user for the name of a product (for example, “woven purse”), the cost of materials before discount and the number of hours of work required. Pass the numeric data to a method that computes the retail price of the product and returns the computed value to the main () method where the product name and retail price are displayed. Save the program as CraftPricing.java.

PLEASE RECREATE AS YOUR OWN work do not copy from any where else please

0 0
Add a comment Improve this question Transcribed image text
Answer #1

import java.util.*;
import java.lang.*;
import java.io.*;


class CraftPricing
{
   public static double calc(double cost,double hours)
   {
       double retprice = 0.75 * (cost + (14 * hours)) + 6;
       return retprice;
   }
   public static void main (String[] args) throws java.lang.Exception
   {
       Scanner sc = new Scanner(System.in);
       System.out.println("Enter name of the product");
       String name = sc.nextLine();
       double cost = sc.nextDouble();
       double hours = sc.nextDouble();
      
       double result = calc(cost,hours);
       System.out.println("Name of the product is: "+ name + " has retail price of "+ result);
   }
}

Add a comment
Know the answer?
Add Answer to:
JAVA PROGRAM Caitlyn's Crafty Creations computes a retail price for each product as the cost of...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Write the following program in Java using Eclipse. A cash register is used in retail stores...

    Write the following program in Java using Eclipse. A cash register is used in retail stores to help clerks enter a number of items and calculate their subtotal and total. It usually prints a receipt with all the items in some format. Design a Receipt class and Item class. In general, one receipt can contain multiple items. Here is what you should have in the Receipt class: numberOfItems: this variable will keep track of the number of items added to...

  • Mer (c) Explain why overhead cost cost to produce one unit of each product. Plain why...

    Mer (c) Explain why overhead cost cost to produce one unit of each product. Plain why overhead cost shifted from the high-volume product (product B) he low volume product (product A) under activity based costing. A company has been applying factory overhead on the basis of direct labour hours using an overhead recovery rate of $60.00 per direct labour hour. One of their employees, a trainee accountant, has suggested that the company should change to activity based costing as it...

  • Programming Project 3 See Dropbox for due date Project Outcomes: Develop a Java program that uses:...

    Programming Project 3 See Dropbox for due date Project Outcomes: Develop a Java program that uses: Exception handling File Processing(text) Regular Expressions Prep Readings: Absolute Java, chapters 1 - 9 and Regular Expression in Java Project Overview: Create a Java program that allows a user to pick a cell phone and cell phone package and shows the cost. Inthis program the design is left up to the programmer however good object oriented design is required.    Project Requirements Develop a text...

  • Java Inventory Management Code Question

    Inventory ManagementObjectives:Use inheritance to create base and child classesUtilize multiple classes in the same programPerform standard input validationImplement a solution that uses polymorphismProblem:A small electronics company has hired you to write an application to manage their inventory. The company requested a role-based access control (RBAC) to increase the security around using the new application. The company also requested that the application menu must be flexible enough to allow adding new menu items to the menu with minimal changes. This includes...

  • -low analysis P6-3A. Cost Formulas Longboat Manufacturing produces a single product requiring the following direct LO2,...

    -low analysis P6-3A. Cost Formulas Longboat Manufacturing produces a single product requiring the following direct LO2, 3,6 materials and direct labor: MIM lowing er each Description Cost per Unit of Required Amount per Input Material A Unit of Product Material B $ pound 20 ounces Material C 7/pound 4 ounces Cutting labor 25/gallon 0.4 gallon Shaping labor 12/hour 45 minutes Finishing labor 15/hour 15 minutes 14/hour 75 minutes Manufacturing overhead consists of indirect materials, 50.60 per unit of product; indirect...

  • Someone, please help. Sales Price of Retail Product Customers are charged $75 for each unit purchased...

    Someone, please help. Sales Price of Retail Product Customers are charged $75 for each unit purchased Cost of Inventory for Products Purchased Inventory can be purchased for $36 per unit Price for Services Provided Customers are charged $87 per hour for services rendered Record the following transactions in the General Journal.   Trans. Date Description 1 Dec. 1 Borrow $115,000 from the local bank and signed a six-year installment note with payments of $1,905 at the end of each month. The...

  • In this practice program you are going to practice creating graphical user interface controls and placing...

    In this practice program you are going to practice creating graphical user interface controls and placing them on a form. You are given a working NetBeans project shell to start that works with a given Invoice object that keeps track of a product name, quantity of the product to be ordered and the cost of each item. You will then create the necessary controls to extract the user input and display the results of the invoice. If you have any...

  • //Add name, date, and description here //preprocessor directives #de fine CRT SECURE NO WARNINGS ...

    Complete the incomplete code provided //Add name, date, and description here //preprocessor directives #de fine CRT SECURE NO WARNINGS #includestdio.h> - //Calculate the cost of the gas on a trip /Ideclare, ask, and get the price per gallon and the mpg /Icalculate and return (by reference) the cost of gas for the number of miles passed to the function void GasCost (double miles, double *gasTotalPtr) //using a 70 MPH speed limit and the miles passed to the function //calculate and...

  • Must Follow Example code //Add name, date, and description here //preprocessor directives #de fine CRT SECURE...

    Must Follow Example code //Add name, date, and description here //preprocessor directives #de fine CRT SECURE NO WARNINGS #includestdio.h> - //Calculate the cost of the gas on a trip /Ideclare, ask, and get the price per gallon and the mpg /Icalculate and return (by reference) the cost of gas for the number of miles passed to the function void GasCost (double miles, double *gasTotalPtr) //using a 70 MPH speed limit and the miles passed to the function //calculate and return...

  • Master Problem: Job order coasting: Maria Young is the sole stockholder of Purl of Great Price...

    Master Problem: Job order coasting: Maria Young is the sole stockholder of Purl of Great Price Company (POGP Company), which produces high-end knitted sweaters and sweater vests for sale to retail outlets. The company started in January of the current year, and employs three knitters (each of whom work 40 hours per week) and one office manager/knitting supervisor (this employee works 20 hours per week as office manager, and 20 hours per week as knitting supervisor). All wages are paid...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT