Skip to content

djzevenbergen/WordCounter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Word Counter

Counts instances of a word within a sentence. 5/14/2020

Made by DJ Zevenbergen

Description

This C# console application allows a user enters a sentence and a word, and counts all instances of that word within the sentence. It uses BDD and TDD to guide the design.

Setup/Installation Requirements

  • Clone repository from GitHub in terminal or console
  • ensure that C#/.netcore2.2 is installed on your computer
  • dotnet run
  • if you want to test, locate to the WordCounter.Tests directory and run "dotnet test"

Specs

  1. User enters a sentence and a word, and the program returns how many times that word occurs in the sentence
  • Input: "There is a rat over there", "there"
  • Output: "The word 'there' occurs 2 times in 'There is a rat over there'"
  1. User enters an word that is not in the sentence, and the program returns 0
  • Input: "than"
  • Output: "The word 'than' occurs 0 times in 'There is a rat over there'"
  1. User enters an empty sentence, and the program responds with a prompt
  • Input: "" or " "
  • Output: "Please enter sentence to be searched"
  1. User enters an empty word, and the program responds with a prompt
  • Input: "" or " "
  • Output: "Please enter a word!"
  1. User enters a sentence and a word, where the sentence contains words that contain the word, and the program doesn't count those partial matches
  • Input: "Cat catcat cat", "cat"
  • Output: "The word 'cat' appears 2 times in the sentence "Cat catcat cat"
  1. User can save summary of actions into .txt file
  • Input: Save? Y
  • Output: saved file

Support

Open an issue

Built With

C#

License

This project is licensed under the MIT License

Copyright (c) 2020 DJ Zevenbergen

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages