User Input Program and Analysis


Demonstrate an understanding of C++ programming concepts by completing the following:

Program: Create a C++ program that will obtain input from a user and store it into the provided CSC450_CT5_mod5.txt file. Your program should append it to the provided text file, without deleting the existing data:
Store the provided data in a CSC450_mod5-2.txt file.
Create a reversal method that will reverse all of the characters in the CC450-mod5_2.txt file and store the result in a CSC450-mod5-reverse.txt file.
Program Analysis: Given your program implementation, discuss and identify the possible security vulnerabilities that may exist. If present, discuss solutions to minimize the vulnerabilities. Discuss and identify possible problems that can result in errors for string manipulation of data. Your analysis should be 1-2 pages in length.
Submit the following components:

Sample Solution

Market based instruments in China
The government have been making progress to improve the quality of the water in The Peoples Republic Of China. China’s tenth and eleventh five-year plans entailed the governments intentions in controlling water pollution. The government did invest into water pollution technologies, between 2000 and 2008, pollution control investments grew by 420%, this shows tangible efforts in cleaning up China’s water. Command and control instruments are central to water pollution and control policy. Examples of command and control policies which they use include discharge permits, the application of discharge standards and total load control. Although command and control instruments such as these achieve results, there are problems. There is little use being made of incentive based or voluntary policies. The current policies do not put enough attention on the prevention and management, rather they emphasize pollution control. The precautionary principle should be applied by policy makers in China, rather than polluting first and cleaning up later, much more should be done to prevent rather than end-of-pipe strategies. To address the growing problems of water pollution, more attention on market-based instruments are needed from China’s government. Looking at international market-based instruments, China’s water system may benefit from water quality trading: this is similar to emissions trading, where pollution control becomes something of a market within itself.

Rising Sea Levels
Increases on a global level in greenhouse gas emissions contribute to climate change and as a result, rising sea levels mean that the future of low-lying states and islands is alarming. ‘Rising global sea level is likely to accelerate through the twenty-first century with a rise of 18-59cm above 1990 levels projected by the end of the century’ (Meehl et al. 2007). This in turn will cause food and water insecurity, pose a threat to human safety and national security will be affected. Ha’ofa’s ‘Sea of Islands’ thesis is about the ‘resilience and adaptive capacities of island communities that leverage global networks in the face of local environmental devastation.’ (Lazrus, 2012) A sea level rise of just one metre could mean the loss of the entire land area (MHAHE, 2001). Severe beach erosion and fresh water scarcity is an effect of gradual sea level rise. Also, the increased levels of sea water temperature pose a threat to the coral reefs which support the countries tourism and fisheries.

National Policies