stillsweet786 wrote: > 1. > A company wants to transmit data over the telephone, but is concerned > that its phones could be tapped. All of the data are transmitted as > four-digit integers. The company has asked you to write a program > that encrypts the data so that it can be transmitted more securely. > Your program should read a four-digit integer and encrypt it as > follows: Replace each digit by (the sum of that digit plus 7) modulus > 10. Then, swap the first digit with the third, swap the second digit > with the fourth and print the encrypted integer.
Skip what the company thinks is "secure" and go straight to using OpenSSL. > 2. > A parking garage charges a £2.00 minimum fee to park for up to three > hours. The garage charges an additional £0.50 per hour for each hour > or part thereof in excess of three hours. The maximum charge for any > given 24-hour period is £10.00. Assume that no car parks for longer Who uses Francs? Euros. Or the backwards Dollar. > 3. > Package-delivery services, such as FedEx®, DHL® and UPS®, offer a > number of different shipping options, each with specific costs DHL is working on going out of business. And the other two have issues too. There are also plenty of programs already in existence that interface with these services. Many will even calculate tax. Why reinvent the wheel? > 4. > Suppose we wish to process survey results that are stored in a file. Your first problem is that the survey results are stored in a file. They should really have been stored in a backend database like MySQL - and then you could use PHP instead for both recording and post-processing. Who is going to sit users in front of a computer to take a survey using a C program? A web interface is more convenient. > 5. > Many businesses' Web sites contain shopping-cart applications, which > allow customers to buy items conveniently on the Web. The sites > record what the consumer wants to purchase and provide an easy, > intuitive way to shop online. They do so by using an electronic > shopping cart, just as people would use physical shopping carts in > retail stores. As users add items to their shopping carts, the sites > update the carts' contents. When users "check out," they pay for the > items in their shopping carts. You must implement a shopping cart > which allows users to purchase digital satellite receivers from a > fictitious satellite store that sells four digital satellite > receivers. Your application may uses four scripts, two server-side > files and cookies Huh? Four scripts != 2 server-side files. And everyone and their mother has developed a shopping cart already. Why reinvent the wheel? Plenty of options already. Oh, wait. What's that? This is homework? And question #5 isn't even relevant to this list (i.e. not even a C/C++ question). These appear to be homework problems. Most homework style problems are supplied by educational institutions to be done by the individual. Educational institutions usually provide resources for struggling students to help them through homework problems which the student is having difficulty with. If you got this problem from an educational institution, please consider using that valuable support resource. The alternative is that someone here could provide you a solution. However, if you pass it off as your own, that is called plagiarism. The punishment for plagiarism is usually a failing grade or expulsion depending on the educational institution you attend. It is NOT embarrassing to ask for help nor will it cause any grade deduction when using the official methods of help provided by educational institutions. c-prog demands excellence from its members. You won't learn anything if anyone simply provides you with a solution. In fact, you will likely become dependent upon the group and a burden to other people should you get a programming job. Today's business world demands self-reliance. If you wish to receive an answer to your question, you need to show us what you have done so far. Show us that you have made an effort - source code, Google queries, something, anything. If you are truly stumped, then describe in detail what exactly you don't understand. -- Thomas Hruska CubicleSoft President Ph: 517-803-4197 *NEW* MyTaskFocus 1.1 Get on task. Stay on task. http://www.CubicleSoft.com/MyTaskFocus/