Assignment 1 2025
Unique number:
Due Date: April 2025
This document includes:
Helpful answers and guidelines
Detailed explanations and/ or calculations
References
Connect with the tutor on
+27 68 812 0934
,© Study Shack 2025. All rights Reserved +27 68 812 0934
, QUESTION 1
Console Application
#include <QCoreApplication>
#include <QFile>
#include <QTextStream>
#include <QRegularExpression>
#include <QDate>
#include <QStringList>
#include <iostream>
void printUsage() {
std::cout << "Usage:\n";
std::cout << "count [flags] [file1.txt file2.txt ...]\n";
std::cout << "Flags:\n";
std::cout << " -a Count capitalized words longer than 4
characters\n";
std::cout << " -b Count hyphenated words\n";
std::cout << " -c Count words that start and end with
the same letter\n";
std::cout << " -d Count words that do NOT start with a
vowel\n";
}
QString preprocessText(const QString &content) {
© Study Shack 2025. All rights Reserved +27 68 812 0934