Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Objective: Create a count server that can do the following: converts single digit integers of a given sentence to number words, counts the number of

Objective: Create a count server that can do the following: converts single digit integers of a given sentence to number words, counts the number of uppercase and lowercase alphabets, and finally counts the number of special characters in an input sentence. Requirements: 1. Create a C-based client-server architecture using TCP sockets 2. The count server should run on cell02-cse.eng.unt.edu machine and the client can run on any cell server machine 3. The count server should be able to accept and service at least one clients requests 4. The count server should be able to convert single digit integers in an input sentence to number words and print the converted sentence on the client side 5. The count server should be able to count the number of uppercase alphabets in an input sentence and print the number of uppercase alphabets on the client side 6. The count server should be able to count the number of lowercase alphabets in an input sentence and print the number of lowercase alphabets on the client side 7. The count server should be able to count the number of special characters (@, #, $, %, ^, and &) in an input sentence and print the number of special characters on the client side 8. The count server and the client program should exit or end execution when a quit expression is given as an input from the client side 9. Do not use any ready-made or pre-defined functions to directly count alphabets or special characters or for conversion. You can use pre-defined functions from C string library 10. The user will input the sentence in correct format without errors and the maximum size of the sentence is 255 characters. Do not use any Linux shell commands or code from the internet.

Procedure: 1. Create a C-based server that can accept at least one clients request using TCP sockets 2. Make sure the format to start the count server is as follows ./ctserver where ctserver is the count server executable and port_number is the port number on which the count server listens 3. Create a C-based client that can connect to the count server using TCP sockets 4. The client should connect the count server. The user can run the client and send the input sentence using the below format ./client Input: where client is the client executable, port_number is the port number on which the client connects the server and input is the input sentence to the server 5. Once the count server gets a request from the client, it converts the single digit integers in a given sentence to number words and sends the converted sentence to the client 6. It also finds the number of lowercase and uppercase alphabets, and the number of special characters (@, #, $, %, ^, and &) in the input sentence and sends this information to the client 7. The count server and the client program exits when a quit expression is given as input 8. An example client interaction with the server is shown below. Client-side input/output: ./client 1234 Input: The cost for 3 apples is $4!

Output: The cost for three apples is $four!

Uppercase alphabets: 1 Lowercase alphabets: 17 Special Characters: 1 Input: Average US inflation will be 6% this year! Output: Average US inflation will be six% this year! Uppercase alphabets: 3 Lowercase alphabets: 29 Special Characters: 1 Input: quit cya!

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Learning MySQL Get A Handle On Your Data

Authors: Seyed M M Tahaghoghi

1st Edition

0596529465, 9780596529468

More Books

Students also viewed these Databases questions

Question

Discuss the authoritative value of Davees v. Contractor.

Answered: 1 week ago