Menu
Coddy logo textTech

Project Overview and Setup

Part of the Logic & Flow section of Coddy's Dart journey — lesson 51 of 65.

Welcome to an exciting multi-part project where you'll build a simple text analysis tool! This project will bring together many of the concepts you've learned throughout this course, including string manipulation, lists, sets, and maps.

Over the next several lessons, you'll create a program that can analyze any piece of text and provide useful statistics about it. Your analyzer will count characters, split text into words, find unique words, and even track how frequently each word appears.

In this first lesson, you'll set up the foundation by creating a string variable that contains the text you want to analyze. Think of this as preparing your workspace before diving into the actual analysis. You'll start with a simple task: storing your text and displaying it to confirm everything is working correctly.

This project is perfect for practicing real-world programming skills, as text analysis is used everywhere from social media platforms to search engines. Let's begin building your text analyzer!

challenge icon

Challenge

Easy

Create a program that sets up the foundation for a text analysis tool. This is the beginning of a multi-part project where you'll build a system to analyze text and extract useful information from it.

  1. Read a string input that contains the text you want to analyze
  2. Create a string variable called textToAnalyze and store the input text in it
  3. Display a welcome header for your text analyzer
  4. Show the original text that will be analyzed
  5. Display a confirmation message that the setup is complete

For example, if the input is "The quick brown fox jumps over the lazy dog", your program should output:

Text Analysis Tool - Setup Complete
====================================
Original text loaded for analysis:
"The quick brown fox jumps over the lazy dog"
====================================
Text analyzer is ready to process your data!
Setup completed successfully.

If the input is "Hello world! This is a test.", your program should output:

Text Analysis Tool - Setup Complete
====================================
Original text loaded for analysis:
"Hello world! This is a test."
====================================
Text analyzer is ready to process your data!
Setup completed successfully.

Your program should store the input text in a variable and display it exactly as provided, surrounded by quotation marks. This foundation will be used in the upcoming lessons to perform various text analysis operations like counting characters, splitting into words, and finding unique words.

Try it yourself

import 'dart:io';

void main() {
  // Read the input text
  String? inputText = stdin.readLineSync();
  
  // Create the textToAnalyze variable
  String textToAnalyze = inputText ?? '';
  
  // TODO: Write your code below to display the text analysis tool setup
  
}
quiz iconTest yourself

This lesson includes a short quiz. Start the lesson to answer it and track your progress.

All lessons in Logic & Flow