×
Samples Blogs Make Payment About Us Reviews 4.9/5 Order Now

Program to Implement Corgi Workshop in Java Assignment Solution

June 22, 2024
Dr. Ethan Taylor
Dr. Ethan
🇬🇧 United Kingdom
Java
Dr. Ethan Taylor holds a Ph.D. in Computer Science from the University of Oxford. With over 850 assignments completed, he brings extensive expertise in data structures, algorithms, and programming languages. Ethan specializes in array manipulation, dynamic memory allocation, and algorithm optimization, providing students with comprehensive guidance and practical solutions for their Array class interface homework.
Key Topics
  • Instructions
    • Objective
  • Requirements and Specifications
Tip of the day
Focus on understanding TensorFlow's computational graph and its eager execution mode. Use pre-built functions like tf.data for efficient data pipelines.
News
The latest version of Google's machine learning library, offering improved performance, streamlined APIs, and expanded support for reinforcement learning, making it a powerful tool for AI development.

Instructions

Objective

Write a java assignment program to implement corgi workshop.

Requirements and Specifications

********Build-a-Corgi Workshop********

  • Write the pseudocode for the following program.
  • Create a flowchart.
  • Design a program based on the below information.

********Build-a-Corgi Workshop: Scenario********

Three children are going to the build-your-own stuffed Corgi workshop with a group of Corgi fans. Each child is allowed to spend no more than $30.00 and they have their own cash!

Based on the three children’s selections, calculate the total amount due for the stuffed Corgi. Calculate how much change each child receives, if they do not spend the entire $30. Force a new selection if the child spends more than $30.00. The cashier has unlimited denominations and coin varieties to make the exact change. Use all of the information you have learned in Chapters 1-8 to create an elegant program.

  1. Proper naming conventions.
  2. Proper use of comments.
  3. Using objects.
  4. Providing well-formatted user output.
  5. Concise writing of code, if you can write it in two lines instead of five, two lines is typically nicer.
  6. Do not write repetitive code.
  7. Use proper methods/syntax.
  8. Using arrays.
  9. Using sentinel value.
  10. Code is formatted properly.
  11. Code output is formatted as if it were a receipt
  12. Error check user input as needed to run program properly.

Source Code

import java.text.SimpleDateFormat; import java.util.Date; public class CorgiWorkshop { // This our constants to easier to read the array of money denominations private static final int TENS = 0; private static final int FIVES = 1; private static final int ONES = 2; private static final int QUARTERS = 3; private static final int DIMES = 4; private static final int NICKELS = 5; private static final int PENNIES = 6; // $10 = 1000 pennies // $5 = 500 pennies // $1 = 100 pennies // Quarter = 25 pennies // Dimes = 10 pennies // Nickels = 5 pennies // This will be useful for calculating based on the available bills private static final int[] PENNIES_DENOMINATIONS = { 10 * 100, 5 * 100, 100, 25, 10, 5, 1 }; // Initialize available items and prices private static final String[] FURS = {"Large Red and White", "Large Tri-color"}; private static final double[] FUR_PRICES = {12, 13.50}; private static final String[] OUTFITS = {"Shark", "Mermaid", "Swim trunks"}; private static final double[] OUTFIT_PRICES = {6.49, 8, 6.99}; private static final String[] SOUNDS = {"Puppy 5-in-1 sounds", "Personalized message", "I love you", "Heartbeat"}; private static final double[] SOUND_PRICES = {4.49, 3.47, 2.99, 2.49}; private static final String[] ACCESSORIES = {"Beach ball", "Pet carrier", "Radio flyer wagon", "Water cooler"}; private static final double[] ACCESSORY_PRICES = {3.50, 7.99, 10, 3.29}; // Create a starting money for a customer // Start with 1 x $10, 2 x $5, 6 x $1, // 6 quarters, 10 dimes, 20 nickels, and 50 pennies private static int[] initializeStartingMoney() { int[] money = new int[7]; // These all stores the pennies rate of each bill money[TENS] = 1 * 10 * 100;

Similar Samples

Explore our curated samples at ProgrammingHomeworkHelp.com to witness expertly crafted solutions across various programming disciplines. Our samples exemplify clarity, efficiency, and adherence to best practices, offering valuable insights into our commitment to delivering top-notch programming assistance. Dive into our collection to discover how we can elevate your understanding and performance in programming tasks.