Tag: Software Engineering & Algorithms

  • [Solved] Evaluating.

    ✓ Verified Academic Solution Available

    Executive Solution Overview

    Performance and reliability of an IT department

    Instant Solution Download

    $6.99

    Immediate access to the full model answer, formatted citations, and rubric breakdown.

    Need a Fresh Custom Paper?

    Have this question answered from scratch according to your specific instructions and deadline.

    Order on TutorsGallery →

    Assignment Prompt & Instructions

    Performance and reliability of an IT department

  • [Solved] DSRT-736: Dissertation Seminar – 14.1 – Final Draft of Chapter Two

    ✓ Verified Academic Solution Available

    Executive Solution Overview

    Submit your final draft of Chapter Two. Before submitting, you should carefully review Chapter 2 and check the following: – Use Grammarly in Microsoft Word to review your assignment before submitting. Grammarly may show areas that you do not think need to be changed. If so, you should use the "tras…

    Instant Solution Download

    $6.99

    Immediate access to the full model answer, formatted citations, and rubric breakdown.

    Need a Fresh Custom Paper?

    Have this question answered from scratch according to your specific instructions and deadline.

    Order on TutorsGallery →

    Assignment Prompt & Instructions

    Submit your final draft of Chapter Two. Before submitting, you should carefully review Chapter 2 and check the following:

    – Use Grammarly in Microsoft Word to review your assignment before submitting. Grammarly may show areas that you do not think need to be changed. If so, you should use the "trash" feature in Grammarly to remove each area that you do not think needs to be addressed.

    – Review all of your references. Are all references in APA format? Do all in-text citations have an associated reference in the reference list? Do you have references in the reference list that are not cited in the chapters?

    – template attached.

    – Did you use past tense when discussing previous research studies?

    **Note:**

    – You will need to continually review and update Chapter Two as you work on other areas of the dissertation. Chapters are not complete and final until approved by your committee, and you successfully defend.

    – **Number of pages: 40**

    – make sure you are **not writing it as an Annotated Bibliography and instead make sure you are reviewing the literature.**

    –  Remember that **75% of your references should be published within the last 5 years** and that you use older references to show historical trends, etc

    –  Please remember that chapter 2 is a review of the literature, which means you will have **LOTS of citations and very little personal opinion** (if at all).

    –  Please make you are not over using a reference or only citing references at the end of paragraphs.

    –  Don't use a lone reference at the end of a paragraph as it is hard to determine if you are referencing the entire paragraph or just the last sentence.  Try to use multiple sources throughout the paragraph.

    –  your literature review reads smoothly and has a logical flow to it.  **You SHOULD NOT, however, be using any AI to write any portion of your chapter 2.  You should also NOT use AI to re-write your sentences to make them more professional, scholarly, or anything like that.  Doing so is considered PLAGIARISM and Unethical use of AI.**

    – introduction, search strategy,  scope and organization of the literature review in Chapter 2 – **Please remember that this section is relatively short (maybe 2 pages max) and that it helps set the stage for the rest of your Literature Review.**

    – The introduction should conclude with a paragraph that describes the sequence of the literature you will include and the literature analysis process.

    **-** To help you with headings and subheadings, please review **APA 2.26 & 2.27.**

    –  Use **past tense when discussing previous research studies**. Example: Smith (2024) discussed…….

    Refer to –  [Dsrt-736: dissertation seminar: 11.1 – second draft of chapter two | Computer Science homework help](https://www.sweetstudy.com/questions/dsrt-736-dissertation-seminar-8-1-second-draft-of-chapter-two)

  • [Solved] 7

    ✓ Verified Academic Solution Available

    Executive Solution Overview

    APA FORMAT WITH REFERENCES Prepare a one page paper on the following: What is risk appetite? Explain why risk appetite varies from organization to organization.

    Instant Solution Download

    $6.99

    Immediate access to the full model answer, formatted citations, and rubric breakdown.

    Need a Fresh Custom Paper?

    Have this question answered from scratch according to your specific instructions and deadline.

    Order on TutorsGallery →

    Assignment Prompt & Instructions

    APA FORMAT WITH REFERENCES

    Prepare a one page paper on the following:

    What is risk appetite? Explain why risk appetite varies from organization to organization.

  • [Solved] impact of recent technologies on IT departments

    ✓ Verified Academic Solution Available

    Executive Solution Overview

    Choose a Technology and describe an impact of everyday life.

    Instant Solution Download

    $6.99

    Immediate access to the full model answer, formatted citations, and rubric breakdown.

    Need a Fresh Custom Paper?

    Have this question answered from scratch according to your specific instructions and deadline.

    Order on TutorsGallery →

    Assignment Prompt & Instructions

    Choose a Technology and describe an impact of everyday life.

  • [Solved] Project 5 CC

    ✓ Verified Academic Solution Available

    Executive Solution Overview

    **files (8)** – ## StringUtils3.java – ## StringUtils2.java – ## Proj5-ReportTemplate2.doc – ## Proj5-ReportTemplate1.doc – ## Project5-Instructions3.docx – ## Project5-Instructions2.docx – Project5.docx – archive.zip **## StringUtils3.java** import java.security.InvalidParameterException; /\* \* …

    Instant Solution Download

    $6.99

    Immediate access to the full model answer, formatted citations, and rubric breakdown.

    Need a Fresh Custom Paper?

    Have this question answered from scratch according to your specific instructions and deadline.

    Order on TutorsGallery →

    Assignment Prompt & Instructions

    **files (8)**

    – ## StringUtils3.java

    – ## StringUtils2.java

    – ## Proj5-ReportTemplate2.doc

    – ## Proj5-ReportTemplate1.doc

    – ## Project5-Instructions3.docx

    – ## Project5-Instructions2.docx

    – Project5.docx
    – archive.zip

    **## StringUtils3.java**

    import java.security.InvalidParameterException;

    /\*
    \* Small class to practice writing JUnit tests
    \* Author: Renata Rand McFadden
    \* January 2016
    */
    public class StringUtils {

    // attributes
    private String myStr;

    // constructor
    // assigns parameter value to myStr attribute
    // throws NullPointerException if parameter is null or empty string
    public StringUtils(String s)
    {
    if (s == null || s.equals(""))
    {
    throw new InvalidParameterException("Parameter cannot be null or empty");
    }
    myStr = s; // assign value of parameter to attribute
    }

    // constructor
    // assigns parameter value to myStr attribute
    // upper cases if parameter is true otherwise lower cases
    // throws NullPointerException is parameter is null or empty string
    public StringUtils(String s, boolean upper)
    {
    if (s == null)
    {
    throw new NullPointerException("Parameter cannot be null");
    }
    if (upper)
    myStr = s.toUpperCase();
    else
    myStr = s.toLowerCase();
    }

    // returns current value of myStr attribute
    public String getMyStr()
    {
    return myStr;
    }

    // returns true if myStr ends with character passed in parameter
    // otherwise returns false
    public boolean endsWithChar(char ch)
    {
    int last = myStr.length()-1;
    if (myStr.charAt(last) == ch)
    return true;
    return false;
    }

    // converts myStr attribute to all upper case and returns result
    public String convertToUpperCase()
    {
    String newStr = "";
    for (int i=1; i < myStr.length(); i++)
    {
    char ch = myStr.charAt(i);
    newStr = newStr + Character.toUpperCase(ch);
    }
    return newStr;
    }

    // returns character at index
    // throws IndexOutOfBoundsException exception for out of bounds values
    public char returnCharAt(int index)
    {
    if (index < 0 || index > myStr.length())
    {
    throw new NullPointerException("Index cannot be outsize of 0 and size of string");
    }
    return myStr.charAt(index);
    }

    // adds string in parameter to end of myStr
    // returns new value and updates myStr
    // throws InvalidParameterException if value is empty string or null
    public String updateToConcat(String value)
    {
    if (value.equals(""))
    {
    throw new NullPointerException("Parameter cannot be empty string");
    }
    myStr = myStr.concat(value);
    return myStr;
    }

    }

    **## StringUtils2.java**

    import java.security.InvalidParameterException;

    /\*
    \* Small class to practice writing JUnit tests
    \* Author: Renata Rand McFadden
    \* January 2016
    */
    public class StringUtils {

    // attributes
    private String myStr;

    // constructor
    // assigns parameter value to myStr attribute
    // throws NullPointerException if parameter is null or empty string
    public StringUtils(String s)
    {
    if (s == null || s.equals(""))
    {
    throw new InvalidParameterException("Parameter cannot be null or empty");
    }
    myStr = s; // assign value of parameter to attribute
    }

    // constructor
    // assigns parameter value to myStr attribute
    // upper cases if parameter is true otherwise lower cases
    // throws NullPointerException is parameter is null or empty string
    public StringUtils(String s, boolean upper)
    {
    if (s == null)
    {
    throw new NullPointerException("Parameter cannot be null");
    }
    if (upper)
    myStr = s.toUpperCase();
    else
    myStr = s.toLowerCase();
    }

    // returns current value of myStr attribute
    public String getMyStr()
    {
    return myStr;
    }

    // returns true if myStr ends with character passed in parameter
    // otherwise returns false
    public boolean endsWithChar(char ch)
    {
    int last = myStr.length()-1;
    if (myStr.charAt(last) == ch)
    return true;
    return false;
    }

    // converts myStr attribute to all upper case and returns result
    public String convertToUpperCase()
    {
    String newStr = "";
    for (int i=1; i < myStr.length(); i++)
    {
    char ch = myStr.charAt(i);
    newStr = newStr + Character.toUpperCase(ch);
    }
    return newStr;
    }

    // returns character at index
    // throws IndexOutOfBoundsException exception for out of bounds values
    public char returnCharAt(int index)
    {
    if (index < 0 || index > myStr.length())
    {
    throw new NullPointerException("Index cannot be outsize of 0 and size of string");
    }
    return myStr.charAt(index);
    }

    // adds string in parameter to end of myStr
    // returns new value and updates myStr
    // throws InvalidParameterException if value is empty string or null
    public String updateToConcat(String value)
    {
    if (value.equals(""))
    {
    throw new NullPointerException("Parameter cannot be empty string");
    }
    myStr = myStr.concat(value);
    return myStr;
    }

    }

    **## Proj5-ReportTemplate2.doc**

    <Project 2>

    <Project 5>

    Unit Test

    <Version>

    <Date>

    <Your Name>

    **Table of Contents**

    **11. Unit Test**

    1.1 Approach
    1

    1.2 Test Cases
    1

    _1.2.1 Test Case 1 (example only)_
    _1_

    _1.2.2 Test Case 2 (example only)_
    _1_

    _1.2.3 Test Case 3_
    _1_

    **2. Defects**
    **1**

    2.1 Defects
    1

    _2.1.1 Defect 1_
    _1_

    _2.1.2 Defect 2_
    _2_

    **3. Other**
    **2**

    3.1 XXX
    2

    3.2 YYY
    2

    ## 1. Unit Test

    ### 1.1 Approach

    _Explain in this section here how unit test should be approached. Include in your discussion answers to the following questions: What are the goals and objectives for unit test? What are the key criteria for unit test? What kind of testing is unit test (black-box, white-box, boundary, etc.) and make sure to explain what that type of testing does? Who normally writes and executes unit test? As defects are found during unit test, what happens next? Who fixes them? Be as complete and thorough in your discussion demonstrating your knowledge of unit test_

    ### 1.2 Test Cases

    #### 1.2.1 Test Case 1 (example only)

    _Method being tested:_ isEmpty()

    _Short Description:_ Test that when queue has no items, this method returns true

    _Input Data to constructor and/or method you are testing:_ Create SimpleQueue with no elements

    _Expected Results:_ method return value true

    _Actual Results:_ **Passed:** method returned what was expected

    #### 1.2.2 Test Case 2 (example only)

    _Method being tested:_ getNumber()

    _Short Description:_ Test that method currently returns the current value of the number attribute

    _Input Data to constructor and/or method you are testing:_ Create instance of Account class passing it 5 for number value

    _Expected Results:_ the value 5 is returned

    _Actual Results:_ **Failed:** method threw an exception instead of returning value 5

    #### 1.2.3 Test Case 3

    _Method being tested:_

    _Short Description:_

    _Input Data to constructor and/or method you are testing:_

    _Expected Results:_

    _Actual Results:_

    _…_

    ## 2. Defects

    This section lists all identified defects

    ### 2.1 Defects

    #### 2.1.1 Defect 1

    **Method:** _Put here the method name that has a defect_

    **Defect Description**:
    _Put here, what behavior is incorrect and why you believe it’s a defect_

    **How Found**:
    _Explain how you were able to find this defect and which testcase found the issue_

    #### 2.1.2 Defect 2

    **Method:** _Put here the method name that has a defect_

    **Defect Description**:
    _Put here, what behavior is incorrect and why you believe it’s a defect_

    **How Found**:
    _Explain how you were able to find this defect and which testcase found the issue_

    .
    _…_

    ## 3. Other

    _Put in this section any other findings or comments that do not fit in the above sections that you want to share with the instructor._

    ### 3.1 XXX

    ### 3.2 YYY

    Software Unit Test

    Page 1

    **## Proj5-ReportTemplate1.doc**

    <Project 2>

    <Project 5>

    Unit Test

    <Version>

    <Date>

    <Your Name>

    **Table of Contents**

    **11. Unit Test**

    1.1 Approach
    1

    1.2 Test Cases
    1

    _1.2.1 Test Case 1 (example only)_
    _1_

    _1.2.2 Test Case 2 (example only)_
    _1_

    _1.2.3 Test Case 3_
    _1_

    **2. Defects**
    **1**

    2.1 Defects
    1

    _2.1.1 Defect 1_
    _1_

    _2.1.2 Defect 2_
    _2_

    **3. Other**
    **2**

    3.1 XXX
    2

    3.2 YYY
    2

    ## 1. Unit Test

    ### 1.1 Approach

    _Explain in this section here how unit test should be approached. Include in your discussion answers to the following questions: What are the goals and objectives for unit test? What are the key criteria for unit test? What kind of testing is unit test (black-box, white-box, boundary, etc.) and make sure to explain what that type of testing does? Who normally writes and executes unit test? As defects are found during unit test, what happens next? Who fixes them? Be as complete and thorough in your discussion demonstrating your knowledge of unit test_

    ### 1.2 Test Cases

    #### 1.2.1 Test Case 1 (example only)

    _Method being tested:_ isEmpty()

    _Short Description:_ Test that when queue has no items, this method returns true

    _Input Data to constructor and/or method you are testing:_ Create SimpleQueue with no elements

    _Expected Results:_ method return value true

    _Actual Results:_ **Passed:** method returned what was expected

    #### 1.2.2 Test Case 2 (example only)

    _Method being tested:_ getNumber()

    _Short Description:_ Test that method currently returns the current value of the number attribute

    _Input Data to constructor and/or method you are testing:_ Create instance of Account class passing it 5 for number value

    _Expected Results:_ the value 5 is returned

    _Actual Results:_ **Failed:** method threw an exception instead of returning value 5

    #### 1.2.3 Test Case 3

    _Method being tested:_

    _Short Description:_

    _Input Data to constructor and/or method you are testing:_

    _Expected Results:_

    _Actual Results:_

    _…_

    ## 2. Defects

    This section lists all identified defects

    ### 2.1 Defects

    #### 2.1.1 Defect 1

    **Method:** _Put here the method name that has a defect_

    **Defect Description**:
    _Put here, what behavior is incorrect and why you believe it’s a defect_

    **How Found**:
    _Explain how you were able to find this defect and which testcase found the issue_

    #### 2.1.2 Defect 2

    **Method:** _Put here the method name that has a defect_

    **Defect Description**:
    _Put here, what behavior is incorrect and why you believe it’s a defect_

    **How Found**:
    _Explain how you were able to find this defect and which testcase found the issue_

    .
    _…_

    ## 3. Other

    _Put in this section any other findings or comments that do not fit in the above sections that you want to share with the instructor._

    ### 3.1 XXX

    ### 3.2 YYY

    Software Unit Test

    Page 1

    **## Project5-Instructions3.docx**

    **Project 5**

    **Unit Testing**

    **Mission:**

    You were asked by your manager to execute complete unit test (white box testing) for StringUtils Java class, written by a developer who suddenly left the team. You are provided the source code (StringUtils.java) and you are to write JUnit test cases for it. You are to assume that code description is correct for what each method is supposed to do and the code is supposed to match it.

    **Objectives:**

    Define, implement, and execute complete and thorough unit test on the given Java class (StringUtils.java).

    **Outline of Steps:**

    1. Fill out the Unit Test approach section in the template, explaining what unit test is all about and it’s most important criteria. Address all the questions completely and thoroughly.

    2. Design tests for each method to meet 100% code coverage and reasonable data coverage. Describe these tests in the document using template format given. For this project you want to test methods against the code comments and the code itself. The code comments are assumed to be correct and the code may or may not be correct. Your goal is for your testcases to find defects in the code

    3. Implement unit test cases in JUnit (e.g. StringUtilsTest.java)

    4. Run the unit test cases and document the actual results in the report for each test case

    5. Identify any defects you found running the JUnit and describe them in the report (using the template format) in section 2.
    **Note:** You should find a few defects.

    6. Submit both the report file and JUnit source code (java file).

    7. All your tests must be in a single java file

    Again, you should first identify and document in your report all the unit tests that should be created (using the example in report). That will give you partial credit – identifying the tests. Then you should implement those test cases in JUnit. Lastly you should run the test cases and document the actual results and defects you found.

    **Resources:**

    Proj5-MSIT660-GradingCriteria.doc – lists the grading criteria

    Week 12-13 lecture charts – has unit test examples

    ListNode.java and TestListNode.java – example Java class and its unit tests

    Simple.java and testSimple.java – used in Discussions as examples of a class and JUnit tests for it.

    List of assert methods that can be used in tests:
    [http://junit.sourceforge.net/javadoc/org/junit/Assert.html](http://junit.sourceforge.net/javadoc/org/junit/Assert.html)

    **Deliverables:**

    Use the Report template (Pro5-ReportTemplate.doc) in Blackboard under Course Content->Projects->Project5 folder. The report must be submitted as an MS Word .doc. The name of the MS Word Report file shall be your_name_MSIT660_P6.doc. You must submit a separate file with your tests’ source code.

    **Notes on pulling source code into eclipse**

    1. Create a new Java project: File->New->Java Project (ex. MyProject5)

    2. Click on “src” under your new project; right click and select import

    3. Click on General->File System, then next and browse for where you have the file UTStringUtil.java, select it and click Finish

    4. As an alternative you could create a new class StringUtils and copy/paste the file content into it.

    5.
    In your project, you will see the source file StringUtils.java under src directory.

    **To add JUnit library to your Eclipse project:**

    1. Right click on project and select Properties

    2. Click on Java Build Path (left side list)

    3. Click on “Add Library” button (right side)

    4. Select JUnit and click next

    5. Choose version 4 of Junit and click Finish

    6. The JUnit library will now show under Libraries tab.

    7. Click OK

    ![](https://www.sweetstudy.com/questions/project-5-cc)

    **image1.png**

    **## Project5-Instructions2.docx**

    **Project 5**

    **Unit Testing**

    **Mission:**

    You were asked by your manager to execute complete unit test (white box testing) for StringUtils Java class, written by a developer who suddenly left the team. You are provided the source code (StringUtils.java) and you are to write JUnit test cases for it. You are to assume that code description is correct for what each method is supposed to do and the code is supposed to match it.

    **Objectives:**

    Define, implement, and execute complete and thorough unit test on the given Java class (StringUtils.java).

    **Outline of Steps:**

    1. Fill out the Unit Test approach section in the template, explaining what unit test is all about and it’s most important criteria. Address all the questions completely and thoroughly.

    2. Design tests for each method to meet 100% code coverage and reasonable data coverage. Describe these tests in the document using template format given. For this project you want to test methods against the code comments and the code itself. The code comments are assumed to be correct and the code may or may not be correct. Your goal is for your testcases to find defects in the code

    3. Implement unit test cases in JUnit (e.g. StringUtilsTest.java)

    4. Run the unit test cases and document the actual results in the report for each test case

    5. Identify any defects you found running the JUnit and describe them in the report (using the template format) in section 2.
    **Note:** You should find a few defects.

    6. Submit both the report file and JUnit source code (java file).

    7. All your tests must be in a single java file

    Again, you should first identify and document in your report all the unit tests that should be created (using the example in report). That will give you partial credit – identifying the tests. Then you should implement those test cases in JUnit. Lastly you should run the test cases and document the actual results and defects you found.

    **Resources:**

    Proj5-MSIT660-GradingCriteria.doc – lists the grading criteria

    Week 12-13 lecture charts – has unit test examples

    ListNode.java and TestListNode.java – example Java class and its unit tests

    Simple.java and testSimple.java – used in Discussions as examples of a class and JUnit tests for it.

    List of assert methods that can be used in tests:
    [http://junit.sourceforge.net/javadoc/org/junit/Assert.html](http://junit.sourceforge.net/javadoc/org/junit/Assert.html)

    **Deliverables:**

    Use the Report template (Pro5-ReportTemplate.doc) in Blackboard under Course Content->Projects->Project5 folder. The report must be submitted as an MS Word .doc. The name of the MS Word Report file shall be your_name_MSIT660_P6.doc. You must submit a separate file with your tests’ source code.

    **Notes on pulling source code into eclipse**

    1. Create a new Java project: File->New->Java Project (ex. MyProject5)

    2. Click on “src” under your new project; right click and select import

    3. Click on General->File System, then next and browse for where you have the file UTStringUtil.java, select it and click Finish

    4. As an alternative you could create a new class StringUtils and copy/paste the file content into it.

    5.
    In your project, you will see the source file StringUtils.java under src directory.

    **To add JUnit library to your Eclipse project:**

    1. Right click on project and select Properties

    2. Click on Java Build Path (left side list)

    3. Click on “Add Library” button (right side)

    4. Select JUnit and click next

    5. Choose version 4 of Junit and click Finish

    6. The JUnit library will now show under Libraries tab.

    7. Click OK

    ![](https://www.sweetstudy.com/questions/project-5-cc)

    **image1.png**

    **Project5.docx**

    This file is too large to display. [View in new window](https://www.sweetstudy.com/files/project5-docx-10531561)

    **archive.zip**

    This file is too large to display. [View in new window](https://www.sweetstudy.com/files/archive-zip-10531563)

    **archive.zip**

    This file is too large to display. [View in new window](https://www.sweetstudy.com/files/archive-zip-10531563)

    **## StringUtils3.java**

    import java.security.InvalidParameterException;

    /\*
    \* Small class to practice writing JUnit tests
    \* Author: Renata Rand McFadden
    \* January 2016
    */
    public class StringUtils {

    // attributes
    private String myStr;

    // constructor
    // assigns parameter value to myStr attribute
    // throws NullPointerException if parameter is null or empty string
    public StringUtils(String s)
    {
    if (s == null || s.equals(""))
    {
    throw new InvalidParameterException("Parameter cannot be null or empty");
    }
    myStr = s; // assign value of parameter to attribute
    }

    // constructor
    // assigns parameter value to myStr attribute
    // upper cases if parameter is true otherwise lower cases
    // throws NullPointerException is parameter is null or empty string
    public StringUtils(String s, boolean upper)
    {
    if (s == null)
    {
    throw new NullPointerException("Parameter cannot be null");
    }
    if (upper)
    myStr = s.toUpperCase();
    else
    myStr = s.toLowerCase();
    }

    // returns current value of myStr attribute
    public String getMyStr()
    {
    return myStr;
    }

    // returns true if myStr ends with character passed in parameter
    // otherwise returns false
    public boolean endsWithChar(char ch)
    {
    int last = myStr.length()-1;
    if (myStr.charAt(last) == ch)
    return true;
    return false;
    }

    // converts myStr attribute to all upper case and returns result
    public String convertToUpperCase()
    {
    String newStr = "";
    for (int i=1; i < myStr.length(); i++)
    {
    char ch = myStr.charAt(i);
    newStr = newStr + Character.toUpperCase(ch);
    }
    return newStr;
    }

    // returns character at index
    // throws IndexOutOfBoundsException exception for out of bounds values
    public char returnCharAt(int index)
    {
    if (index < 0 || index > myStr.length())
    {
    throw new NullPointerException("Index cannot be outsize of 0 and size of string");
    }
    return myStr.charAt(index);
    }

    // adds string in parameter to end of myStr
    // returns new value and updates myStr
    // throws InvalidParameterException if value is empty string or null
    public String updateToConcat(String value)
    {
    if (value.equals(""))
    {
    throw new NullPointerException("Parameter cannot be empty string");
    }
    myStr = myStr.concat(value);
    return myStr;
    }

    }

    **## StringUtils2.java**

    import java.security.InvalidParameterException;

    /\*
    \* Small class to practice writing JUnit tests
    \* Author: Renata Rand McFadden
    \* January 2016
    */
    public class StringUtils {

    // attributes
    private String myStr;

    // constructor
    // assigns parameter value to myStr attribute
    // throws NullPointerException if parameter is null or empty string
    public StringUtils(String s)
    {
    if (s == null || s.equals(""))
    {
    throw new InvalidParameterException("Parameter cannot be null or empty");
    }
    myStr = s; // assign value of parameter to attribute
    }

    // constructor
    // assigns parameter value to myStr attribute
    // upper cases if parameter is true otherwise lower cases
    // throws NullPointerException is parameter is null or empty string
    public StringUtils(String s, boolean upper)
    {
    if (s == null)
    {
    throw new NullPointerException("Parameter cannot be null");
    }
    if (upper)
    myStr = s.toUpperCase();
    else
    myStr = s.toLowerCase();
    }

    // returns current value of myStr attribute
    public String getMyStr()
    {
    return myStr;
    }

    // returns true if myStr ends with character passed in parameter
    // otherwise returns false
    public boolean endsWithChar(char ch)
    {
    int last = myStr.length()-1;
    if (myStr.charAt(last) == ch)
    return true;
    return false;
    }

    // converts myStr attribute to all upper case and returns result
    public String convertToUpperCase()
    {
    String newStr = "";
    for (int i=1; i < myStr.length(); i++)
    {
    char ch = myStr.charAt(i);
    newStr = newStr + Character.toUpperCase(ch);
    }
    return newStr;
    }

    // returns character at index
    // throws IndexOutOfBoundsException exception for out of bounds values
    public char returnCharAt(int index)
    {
    if (index < 0 || index > myStr.length())
    {
    throw new NullPointerException("Index cannot be outsize of 0 and size of string");
    }
    return myStr.charAt(index);
    }

    // adds string in parameter to end of myStr
    // returns new value and updates myStr
    // throws InvalidParameterException if value is empty string or null
    public String updateToConcat(String value)
    {
    if (value.equals(""))
    {
    throw new NullPointerException("Parameter cannot be empty string");
    }
    myStr = myStr.concat(value);
    return myStr;
    }

    }

    **## Proj5-ReportTemplate2.doc**

    <Project 2>

    <Project 5>

    Unit Test

    <Version>

    <Date>

    <Your Name>

    **Table of Contents**

    **11. Unit Test**

    1.1 Approach
    1

    1.2 Test Cases
    1

    _1.2.1 Test Case 1 (example only)_
    _1_

    _1.2.2 Test Case 2 (example only)_
    _1_

    _1.2.3 Test Case 3_
    _1_

    **2. Defects**
    **1**

    2.1 Defects
    1

    _2.1.1 Defect 1_
    _1_

    _2.1.2 Defect 2_
    _2_

    **3. Other**
    **2**

    3.1 XXX
    2

    3.2 YYY
    2

    ## 1. Unit Test

    ### 1.1 Approach

    _Explain in this section here how unit test should be approached. Include in your discussion answers to the following questions: What are the goals and objectives for unit test? What are the key criteria for unit test? What kind of testing is unit test (black-box, white-box, boundary, etc.) and make sure to explain what that type of testing does? Who normally writes and executes unit test? As defects are found during unit test, what happens next? Who fixes them? Be as complete and thorough in your discussion demonstrating your knowledge of unit test_

    ### 1.2 Test Cases

    #### 1.2.1 Test Case 1 (example only)

    _Method being tested:_ isEmpty()

    _Short Description:_ Test that when queue has no items, this method returns true

    _Input Data to constructor and/or method you are testing:_ Create SimpleQueue with no elements

    _Expected Results:_ method return value true

    _Actual Results:_ **Passed:** method returned what was expected

    #### 1.2.2 Test Case 2 (example only)

    _Method being tested:_ getNumber()

    _Short Description:_ Test that method currently returns the current value of the number attribute

    _Input Data to constructor and/or method you are testing:_ Create instance of Account class passing it 5 for number value

    _Expected Results:_ the value 5 is returned

    _Actual Results:_ **Failed:** method threw an exception instead of returning value 5

    #### 1.2.3 Test Case 3

    _Method being tested:_

    _Short Description:_

    _Input Data to constructor and/or method you are testing:_

    _Expected Results:_

    _Actual Results:_

    _…_

    ## 2. Defects

    This section lists all identified defects

    ### 2.1 Defects

    #### 2.1.1 Defect 1

    **Method:** _Put here the method name that has a defect_

    **Defect Description**:
    _Put here, what behavior is incorrect and why you believe it’s a defect_

    **How Found**:
    _Explain how you were able to find this defect and which testcase found the issue_

    #### 2.1.2 Defect 2

    **Method:** _Put here the method name that has a defect_

    **Defect Description**:
    _Put here, what behavior is incorrect and why you believe it’s a defect_

    **How Found**:
    _Explain how you were able to find this defect and which testcase found the issue_

    .
    _…_

    ## 3. Other

    _Put in this section any other findings or comments that do not fit in the above sections that you want to share with the instructor._

    ### 3.1 XXX

    ### 3.2 YYY

    Software Unit Test

    Page 1

    **## Proj5-ReportTemplate1.doc**

    <Project 2>

    <Project 5>

    Unit Test

    <Version>

    <Date>

    <Your Name>

    **Table of Contents**

    **11. Unit Test**

    1.1 Approach
    1

    1.2 Test Cases
    1

    _1.2.1 Test Case 1 (example only)_
    _1_

    _1.2.2 Test Case 2 (example only)_
    _1_

    _1.2.3 Test Case 3_
    _1_

    **2. Defects**
    **1**

    2.1 Defects
    1

    _2.1.1 Defect 1_
    _1_

    _2.1.2 Defect 2_
    _2_

    **3. Other**
    **2**

    3.1 XXX
    2

    3.2 YYY
    2

    ## 1. Unit Test

    ### 1.1 Approach

    _Explain in this section here how unit test should be approached. Include in your discussion answers to the following questions: What are the goals and objectives for unit test? What are the key criteria for unit test? What kind of testing is unit test (black-box, white-box, boundary, etc.) and make sure to explain what that type of testing does? Who normally writes and executes unit test? As defects are found during unit test, what happens next? Who fixes them? Be as complete and thorough in your discussion demonstrating your knowledge of unit test_

    ### 1.2 Test Cases

    #### 1.2.1 Test Case 1 (example only)

    _Method being tested:_ isEmpty()

    _Short Description:_ Test that when queue has no items, this method returns true

    _Input Data to constructor and/or method you are testing:_ Create SimpleQueue with no elements

    _Expected Results:_ method return value true

    _Actual Results:_ **Passed:** method returned what was expected

    #### 1.2.2 Test Case 2 (example only)

    _Method being tested:_ getNumber()

    _Short Description:_ Test that method currently returns the current value of the number attribute

    _Input Data to constructor and/or method you are testing:_ Create instance of Account class passing it 5 for number value

    _Expected Results:_ the value 5 is returned

    _Actual Results:_ **Failed:** method threw an exception instead of returning value 5

    #### 1.2.3 Test Case 3

    _Method being tested:_

    _Short Description:_

    _Input Data to constructor and/or method you are testing:_

    _Expected Results:_

    _Actual Results:_

    _…_

    ## 2. Defects

    This section lists all identified defects

    ### 2.1 Defects

    #### 2.1.1 Defect 1

    **Method:** _Put here the method name that has a defect_

    **Defect Description**:
    _Put here, what behavior is incorrect and why you believe it’s a defect_

    **How Found**:
    _Explain how you were able to find this defect and which testcase found the issue_

    #### 2.1.2 Defect 2

    **Method:** _Put here the method name that has a defect_

    **Defect Description**:
    _Put here, what behavior is incorrect and why you believe it’s a defect_

    **How Found**:
    _Explain how you were able to find this defect and which testcase found the issue_

    .
    _…_

    ## 3. Other

    _Put in this section any other findings or comments that do not fit in the above sections that you want to share with the instructor._

    ### 3.1 XXX

    ### 3.2 YYY

    Software Unit Test

    Page 1

    **## Project5-Instructions3.docx**

    **Project 5**

    **Unit Testing**

    **Mission:**

    You were asked by your manager to execute complete unit test (white box testing) for StringUtils Java class, written by a developer who suddenly left the team. You are provided the source code (StringUtils.java) and you are to write JUnit test cases for it. You are to assume that code description is correct for what each method is supposed to do and the code is supposed to match it.

    **Objectives:**

    Define, implement, and execute complete and thorough unit test on the given Java class (StringUtils.java).

    **Outline of Steps:**

    1. Fill out the Unit Test approach section in the template, explaining what unit test is all about and it’s most important criteria. Address all the questions completely and thoroughly.

    2. Design tests for each method to meet 100% code coverage and reasonable data coverage. Describe these tests in the document using template format given. For this project you want to test methods against the code comments and the code itself. The code comments are assumed to be correct and the code may or may not be correct. Your goal is for your testcases to find defects in the code

    3. Implement unit test cases in JUnit (e.g. StringUtilsTest.java)

    4. Run the unit test cases and document the actual results in the report for each test case

    5. Identify any defects you found running the JUnit and describe them in the report (using the template format) in section 2.
    **Note:** You should find a few defects.

    6. Submit both the report file and JUnit source code (java file).

    7. All your tests must be in a single java file

    Again, you should first identify and document in your report all the unit tests that should be created (using the example in report). That will give you partial credit – identifying the tests. Then you should implement those test cases in JUnit. Lastly you should run the test cases and document the actual results and defects you found.

    **Resources:**

    Proj5-MSIT660-GradingCriteria.doc – lists the grading criteria

    Week 12-13 lecture charts – has unit test examples

    ListNode.java and TestListNode.java – example Java class and its unit tests

    Simple.java and testSimple.java – used in Discussions as examples of a class and JUnit tests for it.

    List of assert methods that can be used in tests:
    [http://junit.sourceforge.net/javadoc/org/junit/Assert.html](http://junit.sourceforge.net/javadoc/org/junit/Assert.html)

    **Deliverables:**

    Use the Report template (Pro5-ReportTemplate.doc) in Blackboard under Course Content->Projects->Project5 folder. The report must be submitted as an MS Word .doc. The name of the MS Word Report file shall be your_name_MSIT660_P6.doc. You must submit a separate file with your tests’ source code.

    **Notes on pulling source code into eclipse**

    1. Create a new Java project: File->New->Java Project (ex. MyProject5)

    2. Click on “src” under your new project; right click and select import

    3. Click on General->File System, then next and browse for where you have the file UTStringUtil.java, select it and click Finish

    4. As an alternative you could create a new class StringUtils and copy/paste the file content into it.

    5.
    In your project, you will see the source file StringUtils.java under src directory.

    **To add JUnit library to your Eclipse project:**

    1. Right click on project and select Properties

    2. Click on Java Build Path (left side list)

    3. Click on “Add Library” button (right side)

    4. Select JUnit and click next

    5. Choose version 4 of Junit and click Finish

    6. The JUnit library will now show under Libraries tab.

    7. Click OK

    ![](https://www.sweetstudy.com/questions/project-5-cc)

    **image1.png**

    **## Project5-Instructions2.docx**

    **Project 5**

    **Unit Testing**

    **Mission:**

    You were asked by your manager to execute complete unit test (white box testing) for StringUtils Java class, written by a developer who suddenly left the team. You are provided the source code (StringUtils.java) and you are to write JUnit test cases for it. You are to assume that code description is correct for what each method is supposed to do and the code is supposed to match it.

    **Objectives:**

    Define, implement, and execute complete and thorough unit test on the given Java class (StringUtils.java).

    **Outline of Steps:**

    1. Fill out the Unit Test approach section in the template, explaining what unit test is all about and it’s most important criteria. Address all the questions completely and thoroughly.

    2. Design tests for each method to meet 100% code coverage and reasonable data coverage. Describe these tests in the document using template format given. For this project you want to test methods against the code comments and the code itself. The code comments are assumed to be correct and the code may or may not be correct. Your goal is for your testcases to find defects in the code

    3. Implement unit test cases in JUnit (e.g. StringUtilsTest.java)

    4. Run the unit test cases and document the actual results in the report for each test case

    5. Identify any defects you found running the JUnit and describe them in the report (using the template format) in section 2.
    **Note:** You should find a few defects.

    6. Submit both the report file and JUnit source code (java file).

    7. All your tests must be in a single java file

    Again, you should first identify and document in your report all the unit tests that should be created (using the example in report). That will give you partial credit – identifying the tests. Then you should implement those test cases in JUnit. Lastly you should run the test cases and document the actual results and defects you found.

    **Resources:**

    Proj5-MSIT660-GradingCriteria.doc – lists the grading criteria

    Week 12-13 lecture charts – has unit test examples

    ListNode.java and TestListNode.java – example Java class and its unit tests

    Simple.java and testSimple.java – used in Discussions as examples of a class and JUnit tests for it.

    List of assert methods that can be used in tests:
    [http://junit.sourceforge.net/javadoc/org/junit/Assert.html](http://junit.sourceforge.net/javadoc/org/junit/Assert.html)

    **Deliverables:**

    Use the Report template (Pro5-ReportTemplate.doc) in Blackboard under Course Content->Projects->Project5 folder. The report must be submitted as an MS Word .doc. The name of the MS Word Report file shall be your_name_MSIT660_P6.doc. You must submit a separate file with your tests’ source code.

    **Notes on pulling source code into eclipse**

    1. Create a new Java project: File->New->Java Project (ex. MyProject5)

    2. Click on “src” under your new project; right click and select import

    3. Click on General->File System, then next and browse for where you have the file UTStringUtil.java, select it and click Finish

    4. As an alternative you could create a new class StringUtils and copy/paste the file content into it.

    5.
    In your project, you will see the source file StringUtils.java under src directory.

    **To add JUnit library to your Eclipse project:**

    1. Right click on project and select Properties

    2. Click on Java Build Path (left side list)

    3. Click on “Add Library” button (right side)

    4. Select JUnit and click next

    5. Choose version 4 of Junit and click Finish

    6. The JUnit library will now show under Libraries tab.

    7. Click OK

    ![](https://www.sweetstudy.com/questions/project-5-cc)

    **image1.png**

    **Project5.docx**

    This file is too large to display. [View in new window](https://www.sweetstudy.com/files/project5-docx-10531561)

    **archive.zip**

    This file is too large to display. [View in new window](https://www.sweetstudy.com/files/archive-zip-10531563)

    **## StringUtils3.java**

    import java.security.InvalidParameterException;

    /\*
    \* Small class to practice writing JUnit tests
    \* Author: Renata Rand McFadden
    \* January 2016
    */
    public class StringUtils {

    // attributes
    private String myStr;

    // constructor
    // assigns parameter value to myStr attribute
    // throws NullPointerException if parameter is null or empty string
    public StringUtils(String s)
    {
    if (s == null || s.equals(""))
    {
    throw new InvalidParameterException("Parameter cannot be null or empty");
    }
    myStr = s; // assign value of parameter to attribute
    }

    // constructor
    // assigns parameter value to myStr attribute
    // upper cases if parameter is true otherwise lower cases
    // throws NullPointerException is parameter is null or empty string
    public StringUtils(String s, boolean upper)
    {
    if (s == null)
    {
    throw new NullPointerException("Parameter cannot be null");
    }
    if (upper)
    myStr = s.toUpperCase();
    else
    myStr = s.toLowerCase();
    }

    // returns current value of myStr attribute
    public String getMyStr()
    {
    return myStr;
    }

    // returns true if myStr ends with character passed in parameter
    // otherwise returns false
    public boolean endsWithChar(char ch)
    {
    int last = myStr.length()-1;
    if (myStr.charAt(last) == ch)
    return true;
    return false;
    }

    // converts myStr attribute to all upper case and returns result
    public String convertToUpperCase()
    {
    String newStr = "";
    for (int i=1; i < myStr.length(); i++)
    {
    char ch = myStr.charAt(i);
    newStr = newStr + Character.toUpperCase(ch);
    }
    return newStr;
    }

    // returns character at index
    // throws IndexOutOfBoundsException exception for out of bounds values
    public char returnCharAt(int index)
    {
    if (index < 0 || index > myStr.length())
    {
    throw new NullPointerException("Index cannot be outsize of 0 and size of string");
    }
    return myStr.charAt(index);
    }

    // adds string in parameter to end of myStr
    // returns new value and updates myStr
    // throws InvalidParameterException if value is empty string or null
    public String updateToConcat(String value)
    {
    if (value.equals(""))
    {
    throw new NullPointerException("Parameter cannot be empty string");
    }
    myStr = myStr.concat(value);
    return myStr;
    }

    }

    **## StringUtils2.java**

    import java.security.InvalidParameterException;

    /\*
    \* Small class to practice writing JUnit tests
    \* Author: Renata Rand McFadden
    \* January 2016
    */
    public class StringUtils {

    // attributes
    private String myStr;

    // constructor
    // assigns parameter value to myStr attribute
    // throws NullPointerException if parameter is null or empty string
    public StringUtils(String s)
    {
    if (s == null || s.equals(""))
    {
    throw new InvalidParameterException("Parameter cannot be null or empty");
    }
    myStr = s; // assign value of parameter to attribute
    }

    // constructor
    // assigns parameter value to myStr attribute
    // upper cases if parameter is true otherwise lower cases
    // throws NullPointerException is parameter is null or empty string
    public StringUtils(String s, boolean upper)
    {
    if (s == null)
    {
    throw new NullPointerException("Parameter cannot be null");
    }
    if (upper)
    myStr = s.toUpperCase();
    else
    myStr = s.toLowerCase();
    }

    // returns current value of myStr attribute
    public String getMyStr()
    {
    return myStr;
    }

    // returns true if myStr ends with character passed in parameter
    // otherwise returns false
    public boolean endsWithChar(char ch)
    {
    int last = myStr.length()-1;
    if (myStr.charAt(last) == ch)
    return true;
    return false;
    }

    // converts myStr attribute to all upper case and returns result
    public String convertToUpperCase()
    {
    String newStr = "";
    for (int i=1; i < myStr.length(); i++)
    {
    char ch = myStr.charAt(i);
    newStr = newStr + Character.toUpperCase(ch);
    }
    return newStr;
    }

    // returns character at index
    // throws IndexOutOfBoundsException exception for out of bounds values
    public char returnCharAt(int index)
    {
    if (index < 0 || index > myStr.length())
    {
    throw new NullPointerException("Index cannot be outsize of 0 and size of string");
    }
    return myStr.charAt(index);
    }

    // adds string in parameter to end of myStr
    // returns new value and updates myStr
    // throws InvalidParameterException if value is empty string or null
    public String updateToConcat(String value)
    {
    if (value.equals(""))
    {
    throw new NullPointerException("Parameter cannot be empty string");
    }
    myStr = myStr.concat(value);
    return myStr;
    }

    }

    **## Proj5-ReportTemplate2.doc**

    <Project 2>

    <Project 5>

    Unit Test

    <Version>

    <Date>

    <Your Name>

    **Table of Contents**

    **11. Unit Test**

    1.1 Approach
    1

    1.2 Test Cases
    1

    _1.2.1 Test Case 1 (example only)_
    _1_

    _1.2.2 Test Case 2 (example only)_
    _1_

    _1.2.3 Test Case 3_
    _1_

    **2. Defects**
    **1**

    2.1 Defects
    1

    _2.1.1 Defect 1_
    _1_

    _2.1.2 Defect 2_
    _2_

    **3. Other**
    **2**

    3.1 XXX
    2

    3.2 YYY
    2

    ## 1. Unit Test

    ### 1.1 Approach

    _Explain in this section here how unit test should be approached. Include in your discussion answers to the following questions: What are the goals and objectives for unit test? What are the key criteria for unit test? What kind of testing is unit test (black-box, white-box, boundary, etc.) and make sure to explain what that type of testing does? Who normally writes and executes unit test? As defects are found during unit test, what happens next? Who fixes them? Be as complete and thorough in your discussion demonstrating your knowledge of unit test_

    ### 1.2 Test Cases

    #### 1.2.1 Test Case 1 (example only)

    _Method being tested:_ isEmpty()

    _Short Description:_ Test that when queue has no items, this method returns true

    _Input Data to constructor and/or method you are testing:_ Create SimpleQueue with no elements

    _Expected Results:_ method return value true

    _Actual Results:_ **Passed:** method returned what was expected

    #### 1.2.2 Test Case 2 (example only)

    _Method being tested:_ getNumber()

    _Short Description:_ Test that method currently returns the current value of the number attribute

    _Input Data to constructor and/or method you are testing:_ Create instance of Account class passing it 5 for number value

    _Expected Results:_ the value 5 is returned

    _Actual Results:_ **Failed:** method threw an exception instead of returning value 5

    #### 1.2.3 Test Case 3

    _Method being tested:_

    _Short Description:_

    _Input Data to constructor and/or method you are testing:_

    _Expected Results:_

    _Actual Results:_

    _…_

    ## 2. Defects

    This section lists all identified defects

    ### 2.1 Defects

    #### 2.1.1 Defect 1

    **Method:** _Put here the method name that has a defect_

    **Defect Description**:
    _Put here, what behavior is incorrect and why you believe it’s a defect_

    **How Found**:
    _Explain how you were able to find this defect and which testcase found the issue_

    #### 2.1.2 Defect 2

    **Method:** _Put here the method name that has a defect_

    **Defect Description**:
    _Put here, what behavior is incorrect and why you believe it’s a defect_

    **How Found**:
    _Explain how you were able to find this defect and which testcase found the issue_

    .
    _…_

    ## 3. Other

    _Put in this section any other findings or comments that do not fit in the above sections that you want to share with the instructor._

    ### 3.1 XXX

    ### 3.2 YYY

    Software Unit Test

    Page 1

    **## Proj5-ReportTemplate1.doc**

    <Project 2>

    <Project 5>

    Unit Test

    <Version>

    <Date>

    <Your Name>

    **Table of Contents**

    **11. Unit Test**

    1.1 Approach
    1

    1.2 Test Cases
    1

    _1.2.1 Test Case 1 (example only)_
    _1_

    _1.2.2 Test Case 2 (example only)_
    _1_

    _1.2.3 Test Case 3_
    _1_

    **2. Defects**
    **1**

    2.1 Defects
    1

    _2.1.1 Defect 1_
    _1_

    _2.1.2 Defect 2_
    _2_

    **3. Other**
    **2**

    3.1 XXX
    2

    3.2 YYY
    2

    ## 1. Unit Test

    ### 1.1 Approach

    _Explain in this section here how unit test should be approached. Include in your discussion answers to the following questions: What are the goals and objectives for unit test? What are the key criteria for unit test? What kind of testing is unit test (black-box, white-box, boundary, etc.) and make sure to explain what that type of testing does? Who normally writes and executes unit test? As defects are found during unit test, what happens next? Who fixes them? Be as complete and thorough in your discussion demonstrating your knowledge of unit test_

    ### 1.2 Test Cases

    #### 1.2.1 Test Case 1 (example only)

    _Method being tested:_ isEmpty()

    _Short Description:_ Test that when queue has no items, this method returns true

    _Input Data to constructor and/or method you are testing:_ Create SimpleQueue with no elements

    _Expected Results:_ method return value true

    _Actual Results:_ **Passed:** method returned what was expected

    #### 1.2.2 Test Case 2 (example only)

    _Method being tested:_ getNumber()

    _Short Description:_ Test that method currently returns the current value of the number attribute

    _Input Data to constructor and/or method you are testing:_ Create instance of Account class passing it 5 for number value

    _Expected Results:_ the value 5 is returned

    _Actual Results:_ **Failed:** method threw an exception instead of returning value 5

    #### 1.2.3 Test Case 3

    _Method being tested:_

    _Short Description:_

    _Input Data to constructor and/or method you are testing:_

    _Expected Results:_

    _Actual Results:_

    _…_

    ## 2. Defects

    This section lists all identified defects

    ### 2.1 Defects

    #### 2.1.1 Defect 1

    **Method:** _Put here the method name that has a defect_

    **Defect Description**:
    _Put here, what behavior is incorrect and why you believe it’s a defect_

    **How Found**:
    _Explain how you were able to find this defect and which testcase found the issue_

    #### 2.1.2 Defect 2

    **Method:** _Put here the method name that has a defect_

    **Defect Description**:
    _Put here, what behavior is incorrect and why you believe it’s a defect_

    **How Found**:
    _Explain how you were able to find this defect and which testcase found the issue_

    .
    _…_

    ## 3. Other

    _Put in this section any other findings or comments that do not fit in the above sections that you want to share with the instructor._

    ### 3.1 XXX

    ### 3.2 YYY

    Software Unit Test

    Page 1

    **## Project5-Instructions3.docx**

    **Project 5**

    **Unit Testing**

    **Mission:**

    You were asked by your manager to execute complete unit test (white box testing) for StringUtils Java class, written by a developer who suddenly left the team. You are provided the source code (StringUtils.java) and you are to write JUnit test cases for it. You are to assume that code description is correct for what each method is supposed to do and the code is supposed to match it.

    **Objectives:**

    Define, implement, and execute complete and thorough unit test on the given Java class (StringUtils.java).

    **Outline of Steps:**

    1. Fill out the Unit Test approach section in the template, explaining what unit test is all about and it’s most important criteria. Address all the questions completely and thoroughly.

    2. Design tests for each method to meet 100% code coverage and reasonable data coverage. Describe these tests in the document using template format given. For this project you want to test methods against the code comments and the code itself. The code comments are assumed to be correct and the code may or may not be correct. Your goal is for your testcases to find defects in the code

    3. Implement unit test cases in JUnit (e.g. StringUtilsTest.java)

    4. Run the unit test cases and document the actual results in the report for each test case

    5. Identify any defects you found running the JUnit and describe them in the report (using the template format) in section 2.
    **Note:** You should find a few defects.

    6. Submit both the report file and JUnit source code (java file).

    7. All your tests must be in a single java file

    Again, you should first identify and document in your report all the unit tests that should be created (using the example in report). That will give you partial credit – identifying the tests. Then you should implement those test cases in JUnit. Lastly you should run the test cases and document the actual results and defects you found.

    **Resources:**

    Proj5-MSIT660-GradingCriteria.doc – lists the grading criteria

    Week 12-13 lecture charts – has unit test examples

    ListNode.java and TestListNode.java – example Java class and its unit tests

    Simple.java and testSimple.java – used in Discussions as examples of a class and JUnit tests for it.

    List of assert methods that can be used in tests:
    [http://junit.sourceforge.net/javadoc/org/junit/Assert.html](http://junit.sourceforge.net/javadoc/org/junit/Assert.html)

    **Deliverables:**

    Use the Report template (Pro5-ReportTemplate.doc) in Blackboard under Course Content->Projects->Project5 folder. The report must be submitted as an MS Word .doc. The name of the MS Word Report file shall be your_name_MSIT660_P6.doc. You must submit a separate file with your tests’ source code.

    **Notes on pulling source code into eclipse**

    1. Create a new Java project: File->New->Java Project (ex. MyProject5)

    2. Click on “src” under your new project; right click and select import

    3. Click on General->File System, then next and browse for where you have the file UTStringUtil.java, select it and click Finish

    4. As an alternative you could create a new class StringUtils and copy/paste the file content into it.

    5.
    In your project, you will see the source file StringUtils.java under src directory.

    **To add JUnit library to your Eclipse project:**

    1. Right click on project and select Properties

    2. Click on Java Build Path (left side list)

    3. Click on “Add Library” button (right side)

    4. Select JUnit and click next

    5. Choose version 4 of Junit and click Finish

    6. The JUnit library will now show under Libraries tab.

    7. Click OK

    ![](https://www.sweetstudy.com/questions/project-5-cc)

    **image1.png**

    **## Project5-Instructions2.docx**

    **Project 5**

    **Unit Testing**

    **Mission:**

    You were asked by your manager to execute complete unit test (white box testing) for StringUtils Java class, written by a developer who suddenly left the team. You are provided the source code (StringUtils.java) and you are to write JUnit test cases for it. You are to assume that code description is correct for what each method is supposed to do and the code is supposed to match it.

    **Objectives:**

    Define, implement, and execute complete and thorough unit test on the given Java class (StringUtils.java).

    **Outline of Steps:**

    1. Fill out the Unit Test approach section in the template, explaining what unit test is all about and it’s most important criteria. Address all the questions completely and thoroughly.

    2. Design tests for each method to meet 100% code coverage and reasonable data coverage. Describe these tests in the document using template format given. For this project you want to test methods against the code comments and the code itself. The code comments are assumed to be correct and the code may or may not be correct. Your goal is for your testcases to find defects in the code

    3. Implement unit test cases in JUnit (e.g. StringUtilsTest.java)

    4. Run the unit test cases and document the actual results in the report for each test case

    5. Identify any defects you found running the JUnit and describe them in the report (using the template format) in section 2.
    **Note:** You should find a few defects.

    6. Submit both the report file and JUnit source code (java file).

    7. All your tests must be in a single java file

    Again, you should first identify and document in your report all the unit tests that should be created (using the example in report). That will give you partial credit – identifying the tests. Then you should implement those test cases in JUnit. Lastly you should run the test cases and document the actual results and defects you found.

    **Resources:**

    Proj5-MSIT660-GradingCriteria.doc – lists the grading criteria

    Week 12-13 lecture charts – has unit test examples

    ListNode.java and TestListNode.java – example Java class and its unit tests

    Simple.java and testSimple.java – used in Discussions as examples of a class and JUnit tests for it.

    List of assert methods that can be used in tests:
    [http://junit.sourceforge.net/javadoc/org/junit/Assert.html](http://junit.sourceforge.net/javadoc/org/junit/Assert.html)

    **Deliverables:**

    Use the Report template (Pro5-ReportTemplate.doc) in Blackboard under Course Content->Projects->Project5 folder. The report must be submitted as an MS Word .doc. The name of the MS Word Report file shall be your_name_MSIT660_P6.doc. You must submit a separate file with your tests’ source code.

    **Notes on pulling source code into eclipse**

    1. Create a new Java project: File->New->Java Project (ex. MyProject5)

    2. Click on “src” under your new project; right click and select import

    3. Click on General->File System, then next and browse for where you have the file UTStringUtil.java, select it and click Finish

    4. As an alternative you could create a new class StringUtils and copy/paste the file content into it.

    5.
    In your project, you will see the source file StringUtils.java under src directory.

    **To add JUnit library to your Eclipse project:**

    1. Right click on project and select Properties

    2. Click on Java Build Path (left side list)

    3. Click on “Add Library” button (right side)

    4. Select JUnit and click next

    5. Choose version 4 of Junit and click Finish

    6. The JUnit library will now show under Libraries tab.

    7. Click OK

    ![](https://www.sweetstudy.com/questions/project-5-cc)

    **image1.png**

    **Project5.docx**

    This file is too large to display. [View in new window](https://www.sweetstudy.com/files/project5-docx-10531561)

    **archive.zip**

    This file is too large to display. [View in new window](https://www.sweetstudy.com/files/archive-zip-10531563)

  • [Solved] IT Dpt. Operations.

    ✓ Verified Academic Solution Available

    Executive Solution Overview

    How should a modern IT Dpt operate

    Instant Solution Download

    $6.99

    Immediate access to the full model answer, formatted citations, and rubric breakdown.

    Need a Fresh Custom Paper?

    Have this question answered from scratch according to your specific instructions and deadline.

    Order on TutorsGallery →

    Assignment Prompt & Instructions

    How should a modern IT Dpt operate

  • [Solved] Business and IT

    ✓ Verified Academic Solution Available

    Executive Solution Overview

    In-depth study guidance and analytical solution covering Business and IT.

    Instant Solution Download

    $6.99

    Immediate access to the full model answer, formatted citations, and rubric breakdown.

    Need a Fresh Custom Paper?

    Have this question answered from scratch according to your specific instructions and deadline.

    Order on TutorsGallery →

    Assignment Prompt & Instructions

    Full assignment prompt and step-by-step guidance are included in the downloadable solution file.

  • [Solved] Creating Technologies.

    ✓ Verified Academic Solution Available

    Executive Solution Overview

    Assist an organization in implementing a specific technology

    Instant Solution Download

    $6.99

    Immediate access to the full model answer, formatted citations, and rubric breakdown.

    Need a Fresh Custom Paper?

    Have this question answered from scratch according to your specific instructions and deadline.

    Order on TutorsGallery →

    Assignment Prompt & Instructions

    Assist an organization in implementing a specific technology

  • [Solved] Create a Comprehensive Risk Assessment

    ✓ Verified Academic Solution Available

    Executive Solution Overview

    This assignment will be submitted to Turnitin™. Instructions This week you will create a comprehensive risk assessment that builds on the earlier risk tables and circumstances previously provided for your selected organization and the related industry. As you develop your assessment, consult sample …

    Instant Solution Download

    $6.99

    Immediate access to the full model answer, formatted citations, and rubric breakdown.

    Need a Fresh Custom Paper?

    Have this question answered from scratch according to your specific instructions and deadline.

    Order on TutorsGallery →

    Assignment Prompt & Instructions

    This assignment will be submitted to Turnitin™.

    Instructions

    This week you will create a comprehensive risk assessment that builds on the earlier risk tables and circumstances previously provided for your selected organization and the related industry. As you develop your assessment, consult sample risk assessments and adjust your content to extend your previous work specifically, not merely adopting a template or sample on the web. The assessment should also include details that reflect different assessment approaches (e.g., qualitative, expert, quantitative, etc.) while still supplying a single reasoned analysis at the end. And finally, explain how the proposal provides a route to reduce current and future losses.

    In your paper, make sure to:

    Include a summary that provides an overview for executives (1 page)

    Provide a risk assessment and an interpretation with implications for executives (2 pages)

    Length: 18 pages including tables and images, not including title and reference pages

    References: Beyond the sources in this course, include a minimum of 5 additional scholarly resources from the NCU collection of recent peer-reviewed sources.

    The completed assignment should address all of the assignment requirements, exhibit evidence of concept knowledge, and demonstrate thoughtful consideration of the content presented in the course. The writing should integrate scholarly resources, reflect academic expectations and current APA standards.

    Criteria **Excellent (94%-100%) A** 5 points **Good (90%-93%) A-** 4.58 points **Acceptable (80%-89%) B+, B, B-** 4.23 points **Deficient (73%-79%) C+, C** 3.8 points **Unacceptable (0% – 72%) C-, F** 0 points **Criterion Score** Key Concepts, Support, and Development 20%

    Consistent evidence of understanding  key cybesecurity concepts with originality and depth of ideas; ideas work together as a unified whole; main points are sufficiently supported (with evidence, if necessary); support is valid and specific.

    Key cybersecurity concepts discussed and supported sufficiently; support is sound, valid, and logical.

    Key cybersecurity concepts and ideas are only indirectly supported; support isn't sufficient or specific, but is loosely relevant to main points.

    Lack of support for key cybersecurity concepts; frequent and illogical generalizations without support.

    No evidence of understanding of key cybersecurity concepts; Ideas are extremely simplistic, showing signs of confusion or misunderstanding of assignment.

    Score of Key Concepts, Support, and Development 20%,/ 5Assignment Instructions 20%

    Correctly completed all the assignment instructions.

    Incorrectly completed 1 minor part of the assignment.

    Incorrectly completed 2 minor parts of the assignment.

    Incorrectly completed 3-4 minor parts of the assignment.

    Incorrectly completed >4 parts of the assignment.

    Score of Assignment Instructions 20%,/ 5Content and Critical Thinking 20%

    Strong evidence of content knowledge.

    All responses were thoughtful, thorough, and well-reasoned.

    Good evidence of content knowledge.

    Only 1 response is not thoughtful, thorough, or well-reasoned.

    Some evidence of content knowledge.

    2 responses are not thoughtful, thorough, or well-reasoned.

    Little evidence of content knowledge.

    3 responses are not thoughtful, thorough, or well-reasoned.

    No evidence of content knowledge.

    >3 responses are not thoughtful, thorough, or well-reasoned.

    Score of Content and Critical Thinking 20%,/ 5Integration of Resources 20%

    All resources are scholarly and appropriate for the assignment.

    1 resource is not scholarly or appropriate for the assignment.

    2 resources are not scholarly or appropriate for the assignment.

    3 resources are not scholarly or appropriate for the assignment.

    Resources are not used, not scholarly, or not appropriate for the assignment.

    Score of Integration of Resources 20%,/ 5Grammar, Mechanics, Formatting, APA 20%

    No misspelled words, grammatical errors, formatting issues, or APA style errors.

    1-2 misspelled words, grammatical errors, formatting issues, or APA style errors.

    3-4 misspelled words, grammatical errors, formatting issues, or APA style errors.

    5-10 misspelled words, grammatical errors, formatting issues, or APA style errors.

    >10 misspelled words, grammatical errors, formatting issues, or APA style errors.

    Score of Grammar, Mechanics, Formatting, APA 20%,/ 5

    #### TotalScore of Signature Assignment Grading Rubric (25 Points),/ 25

    ### **Overall Score**

    #### **Excellent**

    23.5 points minimum

    **(94%-100%) A**

    #### **Good**

    22.5 points minimum

    **(90%-93%) A-**

    #### **Acceptable**

    20 points minimum

    **(80%-89%) B-,B, B+**

    #### **Deficient**

    18.25 points minimum

    **(73%-79%) C, C+**

    #### **Unacceptable**

    0 points minimum

    **(0% – 72%) F**

  • [Solved] RA5

    ✓ Verified Academic Solution Available

    Executive Solution Overview

    [>Java homework help](https://www.sweetstudy.com/fields/computer-science-java)

    Instant Solution Download

    $6.99

    Immediate access to the full model answer, formatted citations, and rubric breakdown.

    Need a Fresh Custom Paper?

    Have this question answered from scratch according to your specific instructions and deadline.

    Order on TutorsGallery →

    Assignment Prompt & Instructions

    [>Java homework help](https://www.sweetstudy.com/fields/computer-science-java)