Computer Sceince - Digital Logic Coding Assignment

profilekingdabi
PhoneNumberExtraCredit.docx

Digital Logic

Extra Credit Assignment

Phone Numbers

Due Before: Wednesday, November 21st, 2018, 11:30 p.m.

The purpose of this assignment is to help you to write programs with Boolean Expressions. You can earn up to 20 points towards your Assignments grade by completing this assignment. This program must be a C++ Win32 Console Application Project. All programs will be graded using either Visual Studio 2015 or 2017. Because of this, you will want to compile and run your code using one of these IDEs. Do not include stdfx.h in your code. At the top of your source code, Comment out the following:

//Your Name(s) (if multiple people worked on this project, include it here).The maximum group size is 3.

//Visual Studio 201X (X indicates which version that you used)

//Cite any sources that you used. If you do not cite any sources that you used, no credit will be given.

Instructions:

Write a complete C++ program that will output every phone number to a comma separated values (.csv) file. The program that will output EVERY 10 digit phone number from 713-000-0000 through 713-000-0998 to a file called “output.csv”. Make sure that your file is spelled exactly this way. This is for testing purposes.

The phone numbers that your program will output must only have an odd number of even digits. 0.04 points will be deducted for every missing valid phone number. 0.04 points will be deducted for every false positive. A false positive is a phone number that should not be in the file at that location. An example of this is a phone number that has an even number of even digits.

The following is an example of what your file should look like:

713-000-0000

713-000-0002

713-000-0004

713-000-0006

713-000-0008

713-000-0011

…[Several numbers are not shown here]

713-000-0484

713-000-0486

713-000-0488

713-000-0491

713-000-0493

713-000-0495

713-000-0497

713-000-0499

713-000-0501

…[Several numbers are not shown here]

713-000-0989

713-000-0990

713-000-0992

713-000-0994

713-000-0996

713-000-0998

Only display one number per line. The numbers need to have the appropriate ‘-‘as shown above. The numbers need to be outputted in increasing order (as it is shown above).

Notes:

1. Everyone will need to turn in a complete C++ program before the due date in order to receive any credit for this. This assignment will not be accepted late. There will be no exceptions.

2. Do not post this question to be solved by an online tutoring website such as www.chegg.com as this will result in a grade of -100 (towards your assignment grade) for you and everyone else that uses the code.

3. A Boolean expression must be used in order to determine whether or not any phone number will be outputted to the file. Do not hard code the solution as this will result in a grade of 0. Use either a loop or a recursive function to complete this.

4. Turn in your .cpp file into the Blackboard dropbox for the Extra Credit assignment. Only turn in 1 .cpp file entitled: “Your Name – 201X.cpp” (using your personal name). X will define which version of Visual Studio that you used (5 or 7). This file will look like the following in Windows: