Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Purpose

To practice UDP programming, including the use of the socket, bind, sendto, and recvfrom system calls.

Assignment

Write a C++ program that will validate (imaginary) credit card transaction information by querying to a UDP server. You will be writing the client, and the server's address and port information will be provided to you.

Program

Implement a C++ program that prompts the user for the details of a credit card transaction. These details include the name of the card holder, the credit card number, the expiration date, and the dollar amount to be authorized. The card holder name is a string. The card number must be a 15 or 16 digit number. The expiration date is of the form MM/YYYY (eg. 12/2019). The amount will be a number with two digits after the decimal point.

Your program will send the information to a UDP server in a single datagram containing all of the information spec- ified. The server will respond with a single datagram, containing whether the credit card transaction is valid, and an authorization code.

The UDP datagram sent to the server must contain the card number, expiration date, amount, and card holder name in a colon separated list, for example: "6011 1234 4321 1234:12/2016:543.21:John Doe".

UDP Server Details

The details for the UDP Server will be listed in the assignment listing on BlackBoard.

Error Checking

Your program must check whether the name, credit card, expiration date, and amount are well formed. If they are not, prompt the user for them again.

Name can be any string less than 64 characters. Credit card number must be either 15 or 16 digits, with the possibil- ity that spaces may be used between numbers to separate them into groups. The expiration date must be of the form MM/YYYY (obviously MM should be between 01 and 12). The amount can be any number digits followed by a decimal point and then two more digits.

 

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M93100221

Have any Question?


Related Questions in Computer Engineering

What is the relation between z-score confidence interval

What is the relation between Z-score, confidence interval, t-statistic, p-score and hypothesis testing?

Test 1 - open loop level step response test1objective to

Test 1 - Open Loop Level Step Response Test 1)Objective: To get familiar with the process vessel and to measure the time constant. Procedure 1 1) Start the CE2000 software and load ?le ‘exp4-1.ict'. You will see the soft ...

In linux what synchronization methods they use within the

In Linux what synchronization methods they use within the kernel, please dig into your findings for Linux.

Suppose you are doing some online banking using your banks

Suppose you are doing some online banking using your bank's website. An attacker has set up an active wiretap between your computer and your bank's server. After checking your balance and reading through your transaction ...

A national report indicates that the mean and standard

A national report indicates that the mean and standard deviation of the ACT scores of incoming freshman at American public universities are 24.6 and 6.2, respectively. A sample of 30 incoming freshmen at a small, suburba ...

For this assignment you are required to work on different

For this assignment, you are required to work on different aspects of the project described below for the next five weeks. Imagine you have to work on a project for building a corporate website for a company named Offex ...

Question group work this weekbull introduce yourself to

Question: Group work this week: • Introduce yourself to your group • Start planning out the project with your group • The group should compile the following information into a draft document 1. What specific and detailed ...

Question suppose a prolog database exists that gives

Question : Suppose a Prolog database exists that gives information about the parts in an automobile engine. Predicates of big, small, and part-of are included. a. Write a query to find all small items that are part of ot ...

Taskwrite an essay according to the following

Task Write an essay according to the following instructions. Your lecturer will provide few links for relevant articles and/or case studies. These will be available to you just after your second assignment submission dat ...

Question suppose that a table has 9 columns it is known

Question : Suppose that a table has 9 columns. It is known that we only need to provide values for 4 columns explicitly to insert a new row successfully. Assume that there are n columns with default values and there are ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As