Question

this assingent is to  pseudocode, i have instructions and the example my teacher had given me for this, could i have some assistance, i need to do this in netbeans IDE and i need to use the scanner method as well and i need to pass both.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.) . o How many apples are on hand o How many apples should be in stock o How many oranges are on hand o 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. Functioning Code: Produce fully functioning code (a code that produces no errors) that aligns with the accompanying annotations. Code Results: Results are properly generated. I A. B. Code results generate accurate output Code results produce results that are streamlined, efficient, and error free.

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

Pseudocode.java

import java.util.Scanner;

public class Pseudocode {
    public static void main(String[] args) {
     
        /* PROMPT user to enter:
                OBTAIN apples on hand
                OBTAIN apples that should be in stock
                OBTAIN oranges on hand
                OBTAIN oranges that should be in stock

           CALCULATE difference between on hand and in stock

           DISPLAY amount that need to be ordered
        */
      
        Scanner input = new Scanner(System.in); //Create scanner for inputs
       
        System.out.println("How many apples do you have?");
        int appleHand = input.nextInt();
      
        System.out.println("How many apples should you have in stock?");
        int appleStock = input.nextInt();
      
            int appleDifference = (appleStock - appleHand); //Determine what is needed for apples
      
        System.out.println("How many oranges do you have?");
        int orangeHand = input.nextInt();
      
        System.out.println("How many oranges should you have in stock?");
        int orangeStock = input.nextInt();
      
            int orangeDifference = (orangeStock - orangeHand); //Determine what is needed for oranges
          
        System.out.println("You need " + appleDifference + " apples and " + orangeDifference + " oranges.");
    }
  
}

Problems Javadoc DclarationConsoleCoverage <terminated> Pseudocode [Java Application] C:Program FilesJava jdk1.8.0 131]bin ja

Add a comment
Know the answer?
Add Answer to:
this assingent is to  pseudocode, i have instructions and the example my teacher had given me for...
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
  • How do i write the pseudocode for this java code? First, write out pseudocode, and then create a program to help you by accomplishing the following tasks: :  Use command line interface to ask the use...

    How do i write the pseudocode for this java code? 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. ○ 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...

  • Please help me write a Pseudocode (please do NOT answer in JAVA or Python - I...

    Please help me write a Pseudocode (please do NOT answer in JAVA or Python - I will not be able to use those). Please ALSO create a flowchart using Flowgarithm program. Thank you so much, if answer is provided in Pseudocode and Flowchart, I will provide good feedback and thumbs up to the resonder. Thank you! Tic-Tac-Toe Game Write a program that allows two players to play a game of tic-tac-toe. Use a two- dimensional char array with three rows...

  • Hello, I need the pseudocode / flowchart for the following : read input from a file...

    Hello, I need the pseudocode / flowchart for the following : read input from a file by adding all the numbers in a file to an array, then iterate through the array to count how many times each number appears in the array (the frequency of each number) - then write the summation results to a file: summary.txt. Need to use a numbers.txt file that looks like this:

  • Hello, I'm having trouble solving this problem. I have tried some other codes and they seem like they work but I am...

    Hello, I'm having trouble solving this problem. I have tried some other codes and they seem like they work but I am not sure how the files are made or how this code works. It will be helpful that you show me how. Thank you so much. (In C++) Write a program find that searches all files specified on the command line and prints out all lines containing a keyword. For example, if you call find Tim report.txt address.txt homework.cpp...

  • Python Programming Chapter 5 Programming Exercise Dinner Selection Program (60 points total) Pseudocode (10 points) As...

    Python Programming Chapter 5 Programming Exercise Dinner Selection Program (60 points total) Pseudocode (10 points) As the family cook, you know that the toughest question of the day is "What's for dinner?" You For decide to write a program to help you do days of meal planning for the entree, side and dessert. You will need to use random numbers and functions to complete the project. What's Dinner? • • • Start with a pseudocode (10 points). Write the pseudocode...

  • write programs with detailed instructions on how to execute. code is java What you need to...

    write programs with detailed instructions on how to execute. code is java What you need to turn in: You will need to include an electronic copy of your report (standalone) and source code (zipped) of your programs. All programming files (source code) must be put in a zipped folder named "labl-name," where "name" is your last name. Submit the zipped folder on the assignment page in Canvas; submit the report separately (not inside the zipped folder) as a Microsoft Word...

  • my question is on a java program. i have added all instructions for this homeowrk assignment....

    my question is on a java program. i have added all instructions for this homeowrk assignment. from how the input is entered and what the output should read. im seeing if i can get a psuedo code setup for how the algorithm should be setup. Build an Intersection Check program. User inputs two points as x-y coordinates in twodimension space. Two points represent two end points of a line segment. Then, user can input second two points for the second...

  • Hi everyone, For my Assignment I have to use C# in order to create a validation...

    Hi everyone, For my Assignment I have to use C# in order to create a validation form and include the following things to register and validate: Email Address, Username, Password, Retype Password, and a Submit Button. I have figured out some of the code for the Email Address validation: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace Validation4 {     public partial class Form1 : Form     {        ...

  • I NEED HELP WITH THIS 2 PROBLEMS PLEASE! THANK YOU SO MUCH Given below is a...

    I NEED HELP WITH THIS 2 PROBLEMS PLEASE! THANK YOU SO MUCH Given below is a partially completed C program, which you will use as a start to complete the given tasks. #define SIZE 9 #include <stdio.h> int compareAndCount (int[], int[]); double averageDifference (int[], int[]); void main() { } int compareAndCount(int arr1[SIZE], int arr2[SIZE]) { int count = @; for (int i = 0; i < SIZE; i++) { if (arr1[1] > arr2[i]) count++; return count; } Task 1: (10...

  • I really need some help understaning how system verilog coding works in Cygwin I am a...

    I really need some help understaning how system verilog coding works in Cygwin I am a PC user, so I in order to have a linux version or an option to run commands I installed a program called Cygwin. This program currently allows me to run .cpp file and supposedly to run verilog (.v) and systemVerilog (.sv) file, but I am not able to or familiar with how to command call them from Cygwins terminal. I would also like to...

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