Question
Overview: This assignment will allow you to use pseudocode to implement the program to see the value in planning first, coding later. While coding is the glamorous part of the job, software development is a process with many steps. The program itself will focus on operators to complete an equation.
Prompt: Before completing this assignment, be sure to review the Module Two resources. Use the Guide to Pseudocode document to write out the pseudocode for the given problem:
Imagine that you are a merchant and need to keep better tabs on your merchandise to know when to reorder supplies. First, write out pseudocode, and then create a program to help you by accomplishing the following tasks:
Use command line interface to ask the user to input the following. (You will need to convert this from a string to an integer.)
How many apples are on hand
How many apples should be in stock
How many oranges are on hand
How many oranges should be in stock
Perform an operation to determine how many of each item should be ordered to maintain the stock.
Use command line interface to output the number of apples and oranges that need to be ordered
Once you have the program laid out, build it by creating a functional program. Use your pseudocode as a guide. Be sure to remember the following important items:
Follow the style guidelines found in ZyBooks as you develop.
Use commenting to describe the code.
Practice debugging if you encounter errors.
Ensure your program performs its intended function.
Specifically, the following critical elements must be addressed:
I.
Documentation: Pseudocode: Break down the problem statement into programming terms through creation of pseudocode following the guidelines provided in the course.
II.
Functioning Code: Produce fully functioning code (a code that produces no errors) that aligns with the accompanying annotations.
III.
Code Results: Results are properly generated
Solution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references.
Students may use these solutions for personal skill-building and practice.
Unethical use is strictly forbidden.

import java.util.Scanner;

/*
* ApplesOranges class
*/
public class ApplesOranges {

public static void main(String[] args) {
    Scanner s = new Scanner(System.in);
   
    // Get input of apples on hand
    System.out.print("How many apples are on hand? ");
    int applesOnHand = Integer.parseInt(s.nextLine());
    // Get input of apples in stock
    System.out.print("How many apples should be in stock? ");
    int applesInStock = Integer.parseInt(s.nextLine());
   
    // Calculate apples to order
    int applesToOrder = 0;
    if (applesInStock > applesOnHand)
      applesToOrder
This is only a preview of the solution.
Please use the purchase button to see the entire solution.
By purchasing this solution you'll be able to access the following files:
ApplesOranges.java
Purchase Solution
$30.00
Google Pay
Amazon
Paypal
Mastercard
Visacard
Discover
Amex
View Available Computer Science Tutors 645 tutors matched
Ionut
(ionut)
Master of Computer Science
Hi! MSc Applied Informatics & Computer Science Engineer. Practical experience in many CS & IT branches.Research work & homework
5/5 (6,808+ sessions)
1 hour avg response
$15-$50 hourly rate
Pranay
(math1983)
Doctor of Philosophy (PhD)
Ph.D. in mathematics and working as an Assistant Professor in University. I can provide help in mathematics, statistics and allied areas.
4.6/5 (6,702+ sessions)
1 hour avg response
$40-$50 hourly rate
Leo
(Leo)
Doctor of Philosophy (PhD)
Hi! I have been a professor in New York and taught in a math department and in an applied math department.
4.9/5 (6,469+ sessions)
2 hours avg response

Similar Homework Solutions