1. Homepage
  2. Programming
  3. CS 1313 010: Programming for Non-majors - Programming Project #2: Census

CS 1313 010: Programming for Non-majors - Programming Project #2: Census

Engage in a Conversation
USOUThe University of OklahomaCS 1313Programming for Non-majorsCensus

CS 1313 010: Programming for Non-majors, Spring 2023 Programming Project #2: Census

CourseNana.COM

This second assignment will introduce you to designing, developing, testing and debugging your own C program, as well as to declaring variables, inputting and outputting. You will also learn to add new projects to your makefile. CourseNana.COM

I. PROBLEM DESCRIPTION CourseNana.COM

You are a software developer for the United States Cencus Bureau, working on software for the 2023 Census. CourseNana.COM

The particular program that you’re developing will ask three questions about a cnesus subject: 1. the average number of e-mails that the subject sends per month. CourseNana.COM

2. the average number of hours that the subject spends on homework per week. CourseNana.COM

3. the subject’s Social Security Number. CourseNana.COM

Notice that the average number of e-mails sent per month MIGHT NOT BE AN INTEGER; for example, a person might average 13.25 text messages sent per day. CourseNana.COM

Note that a number that doesn’t have to be an integer is known in mathematics as a real number, and is also known in computing as a floating point number. CourseNana.COM

On the other hand, notice that a person’s Social Security Number can be expressed as three integers (the area number, the group number and the serial number),1 separated by hyphens; for example: CourseNana.COM

123 - 45 - 6789 CourseNana.COM

So, this program will have a user input two real numbers (average number of e-mails sent per month, average number of homework hours per week) and three integers (the parts of the Social Security Number), and then output those numbers in a specific format. CourseNana.COM

Write a program to perform the above task. Note that your program MUST begin with a declaration section in which you declare all necessary variables. This will be followed by the execution section (body), which will: CourseNana.COM

1. greet the user and explain what the program does, and then
2. prompt the user and input the requested information, and then 3. output the five numbers.
CourseNana.COM

Details follow. Please read all of this specification CAREFULLY. CourseNana.COM

IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT!!! CourseNana.COM

This programming project specification contains many small code examples. In most cases, these code examples will be extremely useful in your actual PP#2. WE URGE YOU TO USE THEM. CourseNana.COM

II. WHAT TO DO FIRST: Insert an Entry for the New Program into Your Makefile CourseNana.COM

AS THE VERY FIRST STEP, in your makefile, insert a makefile entry for the new program, so that, when you’re ready to compile your new program, you can use make instead of having to use the gcc command directly (which would risk disaster). CourseNana.COM

Your C source file MUST be named census.c
and your executable MUST be named census CourseNana.COM

Using your preferred text editor (for example, nano), edit your makefile (which is named makefile) to include the following lines at the TOP of the makefile, ABOVE the make entry for Programming Project #1 (PP#1), with a blank line between the entries for PP#2 and PP#1: CourseNana.COM

census: census.c
gcc -o census census.c
CourseNana.COM

IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT!!! CourseNana.COM

  • In the gcc command, the filename after -o should be the executable (NO .c extension),

and the filename at the end should be the C source file (WITH the .c extension). CourseNana.COM

  • DON’T DELETE THE MAKE ENTRY FOR PROGRAMMING PROJECT #1, nor

any other make entry, EVER. CourseNana.COM

  • On the first line, above, between the colon and the name of the C source file, there are one

or more tabs (on most keyboards, it’s in the upper left, to the left of the Q key). There are CourseNana.COM

NO SPACES between the colon and the filename. CourseNana.COM

  • On the second line, immediately before the gcc, there are one or more tabs. There are

NO SPACES immediately before the gcc. CourseNana.COM

IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT!!! CourseNana.COM

Also in the makefile, update the clean entry (the bottommost entry in the makefile) by putting in another rm command, as the LAST rm command in the clean entry, like this: CourseNana.COM

clean: CourseNana.COM

rm -f my_number CourseNana.COM

rm -f census CourseNana.COM

NOTES: CourseNana.COM

  • DON’T DELETE THE rm COMMAND FOR PROGRAMMING PROJECT #1, nor

any other rm command, EVER. CourseNana.COM

  • In the new rm command, above, immediately before the rm, there are one or more tabs.

There are NO SPACES immediately before the rm. CourseNana.COM

  • NEVER put ANYTHING on the same line as clean: regardless of what it may be that

you want to put there. LEAVE THAT LINE COMPLETELY ALONE!
IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT!!! In the
clean entry, the file to be removed with the rm should ALWAYS ALWAYS ALWAYS be the EXECUTABLE (for PP#2, census) and NEVER NEVER NEVER a source file. CourseNana.COM

NOTE: You MUST use the lecture slide packets titled “C Introduction,” “Variables” and “Standard I/O” to complete this project. You should study every single slide CAREFULLY. You can also look at the “Software” and “Constants” packets, but the bulk of the crucial information will be in the “C Introduction,” “Variables” and “Standard I/O” packets. CourseNana.COM

Get in Touch with Our Experts

WeChat WeChat
Whatsapp WhatsApp
US代写,OU代写,The University of Oklahoma代写,CS 1313代写,Programming for Non-majors代写,Census代写,US代编,OU代编,The University of Oklahoma代编,CS 1313代编,Programming for Non-majors代编,Census代编,US代考,OU代考,The University of Oklahoma代考,CS 1313代考,Programming for Non-majors代考,Census代考,UShelp,OUhelp,The University of Oklahomahelp,CS 1313help,Programming for Non-majorshelp,Censushelp,US作业代写,OU作业代写,The University of Oklahoma作业代写,CS 1313作业代写,Programming for Non-majors作业代写,Census作业代写,US编程代写,OU编程代写,The University of Oklahoma编程代写,CS 1313编程代写,Programming for Non-majors编程代写,Census编程代写,USprogramming help,OUprogramming help,The University of Oklahomaprogramming help,CS 1313programming help,Programming for Non-majorsprogramming help,Censusprogramming help,USassignment help,OUassignment help,The University of Oklahomaassignment help,CS 1313assignment help,Programming for Non-majorsassignment help,Censusassignment help,USsolution,OUsolution,The University of Oklahomasolution,CS 1313solution,Programming for Non-majorssolution,Censussolution,