CSE PROGRAM #4: Solution

$30.00 $24.00

Outcomes: Write programs that obtain user input Write programs that compute mathematical results Write programs that work with Strings Format and comment source code that adheres to a given set of formatting guidelines Use a zip compression tool to combine multiple files Requirements: You will write three separate Java programs (5 points) Read and understand…

5/5 – (1 vote)

You’ll get a: zip file solution

 

Categorys:

Description

5/5 – (1 vote)

Outcomes:

  • Write programs that obtain user input
  • Write programs that compute mathematical results
  • Write programs that work with Strings
  • Format and comment source code that adheres to a given set of formatting guidelines
  • Use a zip compression tool to combine multiple files

Requirements: You will write three separate Java programs

  1. (5 points) Read and understand the pseudocode of problem R2.20 from the end of chapter 2 in your textbook. In a Java class named StringSwapper, write a java program that reads an input string, 2 indexes in the string and displays a new string with the characters at these 2 positions swapped.

  1. (5 points) In a Java class named BookstoreOrder, solve problem P2.22 from the end of chapter 2 in your textbook.

  2. (5 points) In a Java class named ExtractDollarsAndCents, solve problem P2.25 from the end of chapter 2 in your textbook.

  1. (5 points) Include a set of test cases for StringSwapper program. Include a list of the test cases at the top with the comments and the expected outputs. (Read Section 3.6 about Test Cases). You should also indicate the test case(s) that did not work for your program along with the wrong output it printed. Note that this part of the assignment is worth 5 points. You can get full credit for this, even if your StringSwapper class does not always produce the correct answer.

 

  1. Follow these steps to submit your work:
    1. Create an empty folder named program4.
    2. Put copies of your three source code files (.java) in the program4 folder. Do not put any other files in that folder. There should be exactly 3 .java files.
    3. Compress the folder to create a zip file. Be sure it ends with .zip.
    4. Submit only the zip file to the Canvas website.

 

Note: If you submit your work and decide to modify one of your programs, you need to resubmit a new zip file containing all three source code files (even if you only modified one of them). Do not rename your source code files. Do not rename the zip file. Canvas may add a number to the name of your zip file. That is fine. But you should keep all filenames the same.

CSE PROGRAM #4: Solution
$30.00 $24.00