Questions
I can’t get my code to work and/or finish it. Please fix. Below are code instructions...

I can’t get my code to work and/or finish it. Please fix. Below are code instructions and then sample runs and lastly my code so far.
//*********************************************************************
Program
You will write a program that uses a recursive function to determine whether a string is a character unit palindrome. Moreover, flags can be used to indicate whether to do case sensitive comparisons and whether to ignore spaces. For example "A nut for a jar of tuna" is a palindrome if spaces are ignored and not otherwise. "Step on no pets" is a palindrome whether spaces are ignored or not, but is not a palindrome if it is case sensitive since the ‘S’ and ‘s’ are not the same.

Background
Palindromes are character sequences that read the same forward or backwards (e.g. the strings "mom" or "123 454 321"). Punctuation and spaces are frequently ignored so that phrases like "Dog, as a devil deified, lived as a god." are palindromes. Conversely, even if spaces are not ignored phrases like "Rats live on no evil star" are still palindromes. .

Specifications
Command Line Parameters
The program name will be followed by a list of strings. The program will determine whether each string is a palindrome and output the results. Punctuation will always be ignored. An optional flag can precede the terms that modifies how a palindrome is determined.

Strings
Each string will be separated by a space on the command line. If you want to include a string that has spaces in it (e.g. "Rats live on no evil star"), then put quotes around it. The quote characters will not be part of the string that is read in.

Flags
Optional for the user
If present, flags always appear immediately after the program name and before any strings are processed and apply to all subsequent strings processed.
Flags must start with a minus (-) sign followed by flag values that can be capital or lowercase. e.g. -c, -S, -Cs, -Sc, -alphabetsoup, etc.
There are no spaces between starting minus (-) sign and flag(s).
Flags values are case insensitive.
c or C: Indicates that comparisons should be case-sensitive for all input strings. The default condition (i.e. if the flag is NOT included) is to ignore case-sensitivity. So, for example:
palindrome Mom should evaluate as being a palindrome.
palindrome -c Mom should not evaluate as being a palindrome.
s or S: Indicates that comparisons should not ignore spaces for all input strings. The default condition (i.e. if the flag is NOT included) is to ignore spaces. So, for example:
palindrome "A nut for a jar of tuna" should evaluate as being a palindrome.
palindrome -s "A nut for a jar of tuna" should not evaluate as being a palindrome.
Any flag values beside c and s are invalid (see program flow notes below)
Options can appear in different flags, e.g. you can use -Sc or -S -c
Repeated flags should be ignored, e.g. -ccs
The argument -- (two dashes) signifies that every argument that follows is not a flag (allowing for strings that begin with a dash), e.g. palindrome -- -s

Code Expectations
Your program should only get user input from the command line. (i.e. "cin" should not be anywhere in your code).
Required Functions:
Function that prints program usage message in case no input strings were found at command line.
Name: printUsageInfo
Parameter(s): a string representing the name of the executable from the command line. (Not a c string)
Return: void.
Function that determines whether a string is a character-unit palindrome.
Name: isPalindrome
Parameter(s): an input string, a boolean flag that considers case-sensitivity when true, and a boolean flag that ignores spaces when true. (Not a c string)
Return: bool.
Calls helper function isPalindromeR to determine whether string is a palindrome.
String passed into isPalindromeR after dealing with flags.
If case insensitive, make all lower or upper case so that case does not matter.
If spaces are ignored, remove spaces from string.
Helper recursive function that determines whether a string is a character-unit palindrome. This does not deal with flags.
Name: isPalindromeR
Parameter(s): an input string (Not a c string)
Return: bool
All functions should be placed in a separate file following the code organization conventions we covered.

Program Flow
Your program will take arguments from the command-line.
Determine if you have enough arguments. If not, output a usage message and exit program.
If flags are present.
Process and set values to use when processing a palindrome.
Loop through remaining arguments which are all input strings:
Process each by calling isPalindrome function with flag values.
Output results

Program Flow Notes:
Any time you encounter a syntax error, you should print a usage message and exit the program immediately.
E.g. an invalid flag

Hints
Remember rules for a good recursive function.
Recommended Functions to write:
Note: You could combine these into a single function. e.g. "preprocessString"
tolower - convert each letter to lowercase version for case insensitive comparisons.
Parameter(s): a string to be converted to lowercase
Return: a string with all lowercase characters
removePunctuation - Remove all punctuation marks possibly including spaces depending on the flag value.
Parameter(s): a string and a boolean flag indicating whether to also remove spaces
Return: a string with punctuation/spaces removed
Existing functions that might help:
tolower
substr
isalnum
erase (This can be used instead of substr, but is a bit more complicated.)
Example Output
Assumes executable is named palindrome
$ g++ … -o palindrome …

./palindrome
Usage: ./palindrome [-c] [-s] string ...
-c: turn on case sensitivity
-s: turn off ignoring spaces

./palindrome -c
Usage: ./palindrome [-c] [-s] string ...
-c: turn on case sensitivity
-s: turn off ignoring spaces

./palindrome Kayak
"Kayak" is a palindrome.

./palindrome -c Kayak
"Kayak" is not a palindrome.

./palindrome -C Kayak
"Kayak" is not a palindrome.

./palindrome -c kayak
"kayak" is a palindrome.

./palindrome "Test Set"
"Test Set" is a palindrome.

./palindrome -sc "Test Set"
"Test Set" is not a palindrome.

./palindrome -s -c "Test Set"
"Test Set" is not a palindrome.

./palindrome -s -s "Test Set"
"Test Set" is not a palindrome.

./palindrome -scs "Test Set"
"Test Set" is not a palindrome.

./palindrome Kayak madam "Test Set" "Evil Olive" "test set" "loop pool"
"Kayak" is a palindrome.
"madam" is a palindrome.
"Test Set" is a palindrome.
"Evil Olive" is a palindrome.
"test set" is a palindrome.
"loop pool" is a palindrome.

#include <iostream>
#include <cctype>
#include <string>

using namespace std;

void printUsageInfo(string executableName) {
cout << "Usage: " << executableName << " [-c] [-s] string ... " << endl;
cout << " -c: turn on case sensitivity" << endl;
cout << " -s: turn off ignoring spaces" << endl;
exit(1);

//prints program usage message in case no strings were found at command line
}

bool isPalindrome(string str, bool caps, bool space) {

//determines whether a string is a character-unit palindrome
//should do everytyhing to find palindrome
return false;
}

bool isPalindromeR(string str, start, end) {
if (start >= end)
return true;

if(str.at(start) != str.at(end))
return false;
return isPalindromeR(str, ++start, --end);

//helper recursive function that determines whether string is a character-unit palindrome
}


string tolower(string str) {
for (unsigned int i = 0; i < str.length(); i++){
str.at(i) = tolower(str.at(i));
}
return str; //change to return string in all lowercase chars
}

string removePunctuation (string str, bool space) {
for(unsigned int i = 0; i < str.length(); i++){
if (ispunct(str.at(i))) {
str.erase(i);
cout << str;
}
}

return str;
//change to return string w/ punctuation/spaces removed
}
//****
int main(int argc, char* argv[]) {

bool caps = false;
bool space = true;
string executableName = argv[0];

if (argc < 2)
printUsageInfo(argv[0]);

int startIndex = 1;
int i = 1;

if ('-' == argv[1][0]) {
startIndex++;
while((argv[1][i]) != '\0') {
if ('c' == tolower(argv[1][i])){
caps = true;
}
else if ('s' == tolower(argv[1][i])) {
space = true;
}
else { //not a flag
printUsageInfo(argv[0]);
break;
}
i++;
}//while
//cout << space << endl;
//cout << caps << endl;
} //if

else {

}

//TO DO

for(int j = startIndex; j < argc; ++j) {
if (caps) {
cout << tolower(argv[j]);
}
else if (space) {
cout << removePunctuation(argv[j], space);
}
else if (caps && space){
cout << "seriously, fix me";
}
else {
cout << "else";
}
}
cout << endl;

//isPalindrome(cup, bool caps, bool space);
cout << "end of program" << endl;
return 0;
}


In: Computer Science

1b. Explain each of the following with an example in two languages of your choice for...

1b. Explain each of the following with an example in two languages of your choice for each item. (25 points)

  • Orthogonality

  • Generality

  • Uniformity

In: Computer Science

Assignment # 6: Chain of Custody Roles and Requirements Learning Objectives and Outcomes Describe the requirements...

Assignment # 6: Chain of Custody Roles and Requirements

Learning Objectives and Outcomes

  • Describe the requirements of a chain of custody.
  • Differentiate the roles of people involved in evidence seizure and handling.

Assignment Requirements

You are a digital forensics intern at Azorian Computer Forensics, a privately owned forensics investigations and data recovery firm in the Denver, Colorado area. Azorian has been called to a client’s site to work on a security incident involving five laptop computers. You are assisting Pat, one of Azorian's lead investigators. Pat is working with the client's IT security staff team leader, Marta, and an IT staff member, Suhkrit, to seize and process the five computers. Marta is overseeing the process, whereas Suhkrit is directly involved in handling the computers.

The computers must be removed from the employees' work areas and moved to a secure location within the client's premises. From there, you will assist Pat in preparing the computers for transporting them to the Azorian facility.

BACKGROUND

Chain of Custody

Evidence is always in the custody of someone or in secure storage. The chain of custody form documents who has the evidence in their possession at any given time. Whenever evidence is transferred from one person to another or one place to another, the chain of custody must be updated.

A chain of custody document shows:

  • What was collected (description, serial numbers, and so on)
  • Who obtained the evidence
  • Where and when it was obtained
  • Who secured it
  • Who had control or possession of it

The chain of custody requires that every transfer of evidence be provable that nobody else could have accessed that evidence. It is best to keep the number of transfers as low as possible.

Chain of Custody Form

Fields in a chain of custody form may include the following:

  • Case
  • Reason of evidence obtained
  • Name
  • Title
  • Address from person received
  • Location obtained from
  • Date/time obtained
  • Item number
  • Quantity
  • Description

For each evidence item, include the following information:

  • Item number
  • Date
  • Released by (signature, name, title)
  • Received by (signature, name, title)
  • Purpose of chain of custody

For this assignment:

  1. Walk through the process of removal of computers from employees’ work areas to the client's secure location and eventually to the Azorian facility. Who might have possession of the computers during each step? Sketch a rough diagram or flow chart of the process.
  2. Each transfer of possession requires chain of custody documentation. Each transfer requires a signature from the person releasing the evidence and the person receiving the evidence. Include the from/to information in your diagram or flow chart.

In: Computer Science

Write the code for binary min heap in c++ .

Write the code for binary min heap in c++ .

In: Computer Science

write a C program to display the dimensions of a room along with number of doors...

write a C program to display the dimensions of a room along with number of doors and number of windows. make it user prompt including a function.

In: Computer Science

Consider a company which owns a license of Class C network (207.84.123.0), This Company wants to...

Consider a company which owns a license of Class C network (207.84.123.0), This Company wants to create 14 subnetworks.
1.
Determine the number of bits borrowed
2.
How many bits are then used for the subnet ID?
Determine the maximum number of hosts in each subnet
3.
Determine the subnet mask of this scheme
4.
Determine the first, the forth and the last network (subnet) addresses
5.
Determine the first host address, the last host address and the broadcast address in only the first subnet.
6.
7. To which subnet belongs the host having the address 207.84.123.181?

In: Computer Science

Suggest with proper explanation 10 reasons about which web framework is likely to at the forefront...

Suggest with proper explanation 10 reasons about which web framework is likely to at the forefront of technology in the next decades.

NOTE: NO plagiarism from the internet it should be typed in your OWN WORDS PLEASE.

In: Computer Science

The company decided to hire you to be its new Director of Information Security. Explain ten...

The company decided to hire you to be its new Director of Information Security.

  1. Explain ten security policies, procedures, and/or technologies you would put into place during your first year on the job. For each strategy, you must explain one type of security problem that the strategy would attempt to prevent. The security problem does not have to be from the list provided above.
  2. list six things that should be included in a disaster recovery plan for The Insurance Company

In: Computer Science

i want three research question in PICOC model on the following key topics Key Concepts: Optimization...

i want three research question in PICOC model on the following key topics

Key Concepts: Optimization Techniques, Resource Scheduling, Scheduling Algorithms, Cloud Computing, Scheduling Strategies, Cloud Security

General Topic: Resource Scheduling in cloud computing

Who: Small scale industries

What: scheduling algorithms

When: current situation

Where: Software Industries


In: Computer Science

A) Based on what the Federal Information Processing Standard 199 (FIPS-199) requires information owners to classify...

A) Based on what the Federal Information Processing Standard 199 (FIPS-199) requires information owners to classify information and information systems? Provide a detailed answer.

B) Are there any differences between classifying governmental information and commercial information? And are there any common levels of classification have been used to classify governmental information and commercial information? Explain your answers and supported them with examples (NOT from the book or slides).

C) Can a company make a change on classified information? Assuming now a company feels that such information need higher protection or the company decide to make some information that was classified as secret to be accessed by public. Here, is there any mechanism or process that allows a change in classified information. Explain your answers and supported them with examples (NOT from the book or slides).

In: Computer Science

In need of assistance in C++ code: Design and implement class Rectangle to represent a rectangle...

In need of assistance in C++ code:

Design and implement class Rectangle to represent a rectangle object. The class defines the following attributes (variables) and methods:

  1. Two Class variables of type double named height and width to represent the height and width of the rectangle. Set their default values to 0 in the default constructor.
  2. A non-argument constructor method to create a default rectangle.
  3. Another constructor method to create a rectangle with user-specified height and width.
  4. Method getArea() that returns the area.
  5. Method getPerimeter() that returns the perimeter.
  6. Method getHeight() that returns the height.
  7. Method getWidth() that returns the width.

Now design and implement a test program to create two rectangle objects: one with default height and width, and the second is 5 units high and 6 units wide. Next, test the class methods on each object to print the information as shown below.

Sample run:

First object:

Height:     1 unit

Width:      1 unit

Area:       1 unit

Perimeter: 4 units

Second object:

Height:     5 unit

Width:      6 unit

Area:       30 units

Perimeter: 22 units

Thanks in advance!

In: Computer Science

Create a module to calculate the amount of royalties that Parker Schnabel must pay Tony Beets...

Create a module to calculate the amount of royalties that Parker Schnabel must pay Tony Beets at the end of the gold mining season based on the following contractual agreement. When the amount of gold mined is 3000 ounces or less the rate is 15% of the gold value. This lower royalty rate is stored in a variable named lowerRate. When the amount of gold mined is greater than 3000 ounces the royalty rate is 20%. This higher rate is stored in a variable named goldRushRate and is applied only to the amount over 3000 ounces. The price of gold is currently $1200.00. This amount is stored in a variable defined as priceGold. The number of ounces mined is stored in a variable integer ouncesMined. You should ask Parker to input the number of ounces that he mined this season and print out “Based on x ounces mined, you paid y in royalties.”  You will need to multiply the ounces of gold mined by the price by the royalty rate to produce the proper royalties.

In: Computer Science

I need an app ideas for social distancing due to covid-19

I need an app ideas for social distancing due to covid-19

In: Computer Science

Systems Analysis 8. Explain how Agile techniques for systems analysis and design are different from the...

Systems Analysis

8. Explain how Agile techniques for systems analysis and design are different from the structured or other object oriented methodologies. Discuss the advantages and disadvantages of the methods and the conditions under which you would use them. (25 points)

In: Computer Science

PYTHON PROGRAM QUESTION 1 Briefly describe how a while loop works QUESTION 2 Compare and contrast  a...

PYTHON PROGRAM

QUESTION 1

  1. Briefly describe how a while loop works

QUESTION 2

Compare and contrast  a while statement and an  if statement ?

QUESTION 3

What is a loop body?

QUESTION 4

What is the value of variable num after the following code segment?

num = 10;

while  num > 0:
  num = num -1;

QUESTION 5

What is the value of variable num after the following code segment is executed?

var num = 1

while  num >10:

  num = num -1

QUESTION 6

Why the loop does not terminate?

n = 10
answer = 1
while n > 0:
answer = answer + n
    n = n + 1
print(answer)

QUESTION 7

Convert the following for loop to a while loop.

total = 0
for i in range(10):
total = total + i

print(total)

QUESTION 8

Write a while loop to display from 0 to 100, step up 5 each time.

0, 5, 10, 15, 20, ... , 100

In: Computer Science