Our Services

Get 15% Discount on your First Order

[rank_math_breadcrumb]

Week 5: Instructions: The Test Plan for each project includes the Pseudocode, Flowchart, Goals and Objectives, Functional Requirements, and Test Matrix including Actual Output column. Below the table

Week 5:

Instructions:

The Test Plan for each project includes the Pseudocode, Flowchart, Goals and Objectives, Functional Requirements, and Test Matrix including Actual Output column.  Below the table are screenshots verifying the actual output for each case.

Week 5 Notes – Loops ( while, do-while, and for )

Let us recall our Week 4 Notes:   We are using Mathematical Functions, Characters and Strings.  We will be using these again for our Projects in Week 5.

For Week 5, we again have 3 graded items due this week:

  1. Week 3 Discussion, (2) Week 3 textbook tasks, with quizzes and Projects 3 & 5, (3) Test Plans

Our Test Plan has 5 parts, in order:  (1) Pseudocode, (2) Flowchart, (3) Goals & Objectives, (4) Functional Requirements, the (5) Test Matrix/table (simplified), and Output (screenshots from your own output).   Your Output also appears under Actual Output in your table.   We can find more on flowcharting with Loops here, for example:   Flowcharting For and While loops

Our Tasks this Week

You may have worked with Loops in another language, and they work exactly the same way in any language.  The while loop tests at the top of the loop (pretest), the do-while checks at the bottom of the loop (posttest), and the for loop also checks at the top and works best when we know the exact number of repetitions (sometimes input by the user).

Discussion:  We show examples of pretest and posttest loops.

Test Plan:   Refers to Projects 1 and 6 in Chapter 5.   See above for exact format.

Projects and Quizzes:

For Project 1:  Our “sample run” shows us exactly what the program must do.  We can use these “sample runs” for cases in our test matrix/table and for our screenshots of actual output from our program, demonstrating that the program works precisely as required. 

Example:  Sample Run 1: 

Enter an integer, the input ends if it is 0: 1 2 -1 3 0

The number of positives is 3

The number of negatives is 1

The total is 5.0

The average is 1.25 

As with any program, there is more than one way to accomplish the task.  If there’s a problem with the textbook grading, please let me know. 

Hints: 

Notice that the user could simply enter 0, with no numbers, and the program must quit. What type of loop is needed to do this?

How do we get user input on the same line with the prompt, as shown in the sample run?  We can use System.out.print rather than println to prompt the user.           

In our table, we can use this input as one of our cases, showing Expected Output and Actual Output.   Actual Output comes from our screenshot when we run our program.  It should have exactly the same format as shown in “sample run 1.” 

For Project 6:

ISBN-13 is a new standard for identifying books.    It uses 13 digits

d1d2d3d4d5d6d7d8d9d10d11d12d13.    The last digit d13

is a checksum, which is calculated from the other digits using the following formula:

10 – (d1 + 3d2 + d3 + 3d4 + d5 + 3d6 + d7 + 3d8 + d9 + 3d10 + d11 + 3d12) % 10

If the checksum is 10, replace it with 0. Your program should read the input as a String of 12 digits, d1 to d12.   You may assume the user enters the data as digits correctly although perhaps not enough digits.  (See more sample runs for exact requirements.) 

Example:  Sample Run 1

                   We see that the 13th digit is calculated as 6. 

Enter the first 12 digits of an ISBN-13 as a string: 978013213080 

The ISBN-13 number is 9780132130806 

Hints:

Remember that you are reading in a String.  This means we have characters and not digits when we see “978013213080”.

Check if the String length is 12. 

For the calculation, we must loop through all 12 characters (they are not considered digits as we read them in). 

Assuming s is our String, we may need to use s.charAt(i) – ‘0’  to find the number to be added, where i is indexing through the loop.  See other way to convert char to integer data.

In Week 7, we have TWO CHAPTERS, FOUR PROJECTS, and FOUR TEST PLANS!  You will be so glad that you stayed ahead, even a little.   I’m here to help you when you’re ready.

Share This Post

Email
WhatsApp
Facebook
Twitter
LinkedIn
Pinterest
Reddit

Order a Similar Paper and get 15% Discount on your First Order

Related Questions

In this journal, you will embark on a journey of exploration into emerging technologies that intrigue you; be it virtual reality, wearables, IoT, or any other fascinating field. You will research a ch

In this journal, you will embark on a journey of exploration into emerging technologies that intrigue you; be it virtual reality, wearables, IoT, or any other fascinating field. You will research a chosen technology and reflect on your learning journey, sharing insights gained, challenges faced, and areas primed for growth.

Database Detective This assignment measures your mastery of ULOs 3.4, 4.1, and 4.2. Before working on this assignment, you will need to complete the Unit VI Activity: Access 2021 – Chapter 2 – Wor

Database Detective  This assignment measures your mastery of ULOs 3.4, 4.1, and 4.2. Before working on this assignment, you will need to complete the Unit VI Activity: Access 2021 – Chapter 2 – Working with Tables in the SIMNet lab.  Download and complete the Unit VI Assignment Poole’s Nursery Template. Complete

This PowerPoint Presentation will measure your understanding of the concepts covered in this course to this point. For this assignment, you are going to create a PowerPoint presentation that would

This PowerPoint Presentation will measure your understanding of the concepts covered in this course to this point. For this assignment, you are going to create a PowerPoint presentation that would be appropriate to present to a class of high schoolers. Imagine that you are presenting a proposal to a congressional

This assignment will give you an opportunity to learn more about secondary storage technologies, communications, and networks. Before working on this assignment, you will need to complete the Unit IV

This assignment will give you an opportunity to learn more about secondary storage technologies, communications, and networks. Before working on this assignment, you will need to complete the Unit IV Knowledge Check. Reflect on what you have learned about secondary storage, communications, and network security in this unit. Address the

In Units V, VI, and VII, you learned about the components of a computer, how a computer works, the internet, networks and network communications, cloud computing, web development, digital identity, so

In Units V, VI, and VII, you learned about the components of a computer, how a computer works, the internet, networks and network communications, cloud computing, web development, digital identity, social media, e-commerce, ethical behavior, databases, and explored two Microsoft Office applications, PowerPoint and Access.  In this assignment, you will

Your assignment will have four parts. Before working on this assignment, you will need to complete the Unit III Activity: Word Advanced Features. Part 1: Introduction Begin your assignment with

Your assignment will have four parts. Before working on this assignment, you will need to complete the Unit III Activity: Word Advanced Features. Part 1: Introduction Begin your assignment with an introduction that identifies what a computer, storage, and networking are. Introduce internal, input, and output devices of a computer.

In Units V, VI, and VII, you learned about the components of a computer, how a computer works, the internet, networks and network communications, cloud computing, web development, digital identity, so

In Units V, VI, and VII, you learned about the components of a computer, how a computer works, the internet, networks and network communications, cloud computing, web development, digital identity, social media, e-commerce, ethical behavior, databases, and explored two Microsoft Office applications, PowerPoint and Access.  In this assignment, you will

In Units I, II, and III, you learned about the history of computers, application and system software, blockchain, cryptocurrency, computer ethics, and explored two Microsoft Office applications, Word

In Units I, II, and III, you learned about the history of computers, application and system software, blockchain, cryptocurrency, computer ethics, and explored two Microsoft Office applications, Word and Excel.  In this assignment you will demonstrate what you have learned in these three units. This assignment will have five parts. 

Assignment Tasks Part 1  Choose an organization or company of your choice.  Provide a clear description of the organization, including: o Mission o Vision o Objectives  Identify and describe the ma

Assignment Tasks Part 1  Choose an organization or company of your choice.  Provide a clear description of the organization, including: o Mission o Vision o Objectives  Identify and describe the main business processes in this organization.  Looking at the business processes, point out an issue that

Write 200-250 words on the following topic. Be sure to cite the readings and lectures. Topic: Select two international organizations and explain what role they play in promoting, monitoring, investig

Write 200-250 words on the following topic. Be sure to cite the readings and lectures.  Topic: Select two international organizations and explain what role they play in promoting, monitoring, investigating, and/or enforcing human rights. Use at least one concrete example of a human rights issue (e.g. allegations of war crimes

DFA Closure: 1.4 c and f. Do union and intersection for each (use cross product algorithm) Each of the following languages is the intersection of two simpler languages. In each part, construct DFAs fo

DFA Closure: 1.4 c and f. Do union and intersection for each (use cross product algorithm) Each of the following languages is the intersection of two simpler languages. In each part, construct DFAs for the simpler languages, then combine them using the construction discussed in footnote 3 (page 46) to

DFA Closure: 1.4 c and f. Do union and intersection for each (use cross product algorithm) Each of the following languages is the intersection of two simpler languages. In each part, construct DFAs fo

DFA Closure: 1.4 c and f. Do union and intersection for each (use cross product algorithm) Each of the following languages is the intersection of two simpler languages. In each part, construct DFAs for the simpler languages, then combine them using the construction discussed in footnote 3 (page 46) to

1.2 Lab – More Charts in Excel Submission: Completed Excel workbook via Canvas. Part 1 – Multiple Variable Charts Overview • This problem furthers the ideas from the notes ‘1.2 – Basic Charts in Excel

1.2 Lab – More Charts in ExcelSubmission: Completed Excel workbook via Canvas.Part 1 – Multiple Variable ChartsOverview• This problem furthers the ideas from the notes ‘1.2 – Basic Charts in Excel’, where we learnedhow to create and format many simple charts in Excel.• The first tab of the accompanying workbook