首页 > > 详细

C++辅导订票系统 Introduction to Programming Techniques辅导留学生C/C++设计


Requirement
1
CMPSC 121 Name: ___
Introduction to Programming Techniques
Fall 2016
Due Date: Friday, October 21 st , 2016 (11:59 p.m.)
Instructions: Please create a Microsoft Visual Studio C++ project to solve the following problem. Submit
electronic (Canvas Dropbox) copies of your program source code and two or more sample runs to me by the
deadline. Submit printouts of your source code and runs by the start of the class immediately following the
due date at the absolute latest. Please note that printouts are required if you want your submission to be
considered for a grade. Documentation requirements follow the problem specification.
1. Write a C++ program that processes a customer’s order for movie tickets. The program begins by
welcoming the customer to the online movie ticket buying service. It then prompts the customer to enter
the information requested: name of movie, number of adult tickets, number of senior tickets, number of
child tickets. If the customer enters an invalid value for number of tickets (i.e. negative), the program
displays an error message, then prompts the customer to enter a valid value until s/he does so. (Please
note that you must validate the input for each of the three ticket categories.) The values for the number of
tickets of each type must then be passed to a function that determines the total cost of the tickets and
displays it as currency (preceded by a dollar sign and rounded to two decimal places). If the customer
enters a movie name but then orders no tickets, an appropriate message must be displayed (See third
sample run for an appropriate message.). As usual, your program output should resemble the sample runs at
the end of this document.
References:
• Chapter 6.4 – Sending Data into a Function (Programs Pr6-8.cpp and Pr6-8-Modified.cpp
demonstrate sending values into a function.)
• Chapter 5.3 – Using the while Loop for Input Validation (Program Pr5-5.cpp demonstrates using
a while loop for input validation.)
• Chapter 3.8 – Working with Characters and string Objects (Program Pr3-19.cpp demonstrates
using getline to read character input that contains spaces.)
2
Documentation Requirements:
1) Each program source code file must have a header at the beginning of the program containing the
following:
• Name of author, PSU e-mail address of author, name of course, assignment number and due date,
name of file, purpose of program, compiler and operating system used, references
• Example:
/
Author: Wanda Kunkle
E-mail:
Course: CMPSC 121
Assignment: Lab 6
Due date: 10/21/2016
File: TicketBuyingService.cpp
Purpose: This program processes a customer’s order for movie tickets.
Compiler: MS Visual Studio Professional 2015
Operating
system: MS Windows 7 Professional
References: Class demo programs (include any Web page references here)
/
2) The purpose of each function in the source code file much be documented as shown in the example
below:
// Function that accepts the number of tickets of each type as parameters,
// determines the total cost of the tickets, then displays the total cost
// as currency
void computeTicketCost(int adult, int senior, int child)
{
// Function definition (i.e., body)
}
3
Sample run #1 (User enters movie name and positive values for all of the different ticket categories.) :
Sample run #2 (User enters movie name and positive values for 2 of the different ticket categories.) :
4
Sample run #3 (User enters movie name and 0 for the values of each of the different ticket categories.) :
Sample run #4 (User enters movie name and an invalid value for one of the three ticket categories.) :
specified on each assignment. All assignments must be submitted electronically via Canvas by the due date. Please
note that e-mail submissions will NOT be accepted. Printouts of source code and sample runs must be submitted by
the start of the class immediately following the due date at the absolute latest. Important Note: Missed assignments
CANNOT be made up.
Regular attendance is expected. Please read the course attendance policy CAREFULLY.
GRADING
PROCEDURE :
Lab Projects and
Programming
Assignments
= 30% of course grade
Quizzes = 10% of course grade
Attendance = 5% of course grade
(You are allowed two absences. After that, you will lose one percentage point for each
additional absence up to five. Please note that, in general, only absences due to
participation in school sponsored activities (e.g., sports) will be excused.)
Exams (2) = 35% of course grade
(Each exam will account for 17.5% of your course grade.)
Final Exam = 20% of course grade
GRADING SCALE :
93 - 100 A 77 - 79 C +
90 - 92 A - 70 - 76 C
87 - 89 B + 60 - 69 D
83 - 86 B Below 60 F
80 - 82 B -
ATTENDANCE
POLICY :
Attendance is critical in any course. The topics covered in this course are cumulative and can only be learned
through hands-on practice at the computer. Consequently, frequent absences will adversely affect your grade. If you
miss a class (non-exam), it will be your responsibility to determine what you missed and to make up the work.
Attendance is REQUIRED, however, at scheduled testing sessions. Please note that, in general, only absences due
to participation in school sponsored activities (e.g., sports) will be excused. Visit
/class-attendance to view the Penn State University system’s policy on Class Attendance.
MISSED
EXAM/QUIZ/
ASSIGNMENT
POLICY :
All deadlines are firm. Students must plan accordingly, and keep up so as not to be vulnerable to problems at the
last moment. Please note that if a student waits until the last minute and a computer crashes, the Internet cannot be
accessed, or a similar catastrophic event occurs, it was the student’s decision to leave too little time to allow for
potential problems. Each student is responsible for keeping up with the coursework and for verifying that
assignments are properly submitted by the due date. I strongly recommend that you double-check that you can
view/download your submission once it has been uploaded to Canvas. Please note that missed assignments cannot
be made up.
In general, special accommodations for missing an exam or quiz are possible only if the student has documentation
in the form. of a letter or e-mail from the office of a healthcare professional (personal physician, for example) or an
appropriate Dean or Director (Students Affairs, for example) verifying the absence is due to a school sponsored
activity, family emergency, or serious health issue. (Please note that Student Health Services does not provide
documentation for visits.) This documentation must be provided at least one (1) week before the exam/quiz date if
the situation is not an emergency. In the rare event of a make-up exam or quiz, it is scheduled to take place at a
day/time agreed upon by the instructor and the student.
A student who misses the final exam will be assigned a zero. Exceptions to this policy will be made only if the
student has documentation in the form. of a letter or e-mail from the office of a healthcare professional (personal
physician, for example) or an appropriate Dean or Director (Students Affairs, for example) verifying the absence is
due to a school sponsored activity, family emergency, or serious health issue. (Please note that Student Health
Services does not provide documentation for visits.) This documentation must be provided at least two (2) weeks
before the final exam date if the situation is not an emergency.
CLASSROOM
BEHAVIOR
POLICY :
In this course all students are expected to conduct themselves in a professional manner to promote an effective
learning environment. This includes arriving on time, refraining from unnecessary talking, not interrupting others,
raising your hand and waiting to be recognized to speak, not packing up your belongings before class is over, and
turning off cell phones and pagers (or putting them on vibrate if it is mandatory that people be able to contact you).
Computers should only be used for classroom activities, not surfing the Web, reading e-mail, playing games, etc.,
as these activities are disruptive to other students. Classroom discussions should be civilized and respectful to all
involved. Penn State Harrisburg has a Code of Conduct () that
outlines appropriate student behavior. and sanctions for violations of such behavior.
ACADEMIC
INTEGRITY
My thoughts regarding academic integrity (honesty) can be summed up best by the following quote (paraphrased):
“While acknowledging the social and collaborative nature of learning, a university expects that grades awarded to its
students will reflect individual efforts and achievements.” Although I have no objection to you sharing ideas with one
another when working on assignments, your work must clearly show individual effort and must not be copied. Please
Fall 2016 Syllabus: Introduction to Programming Techniques
2 of 4 8/14/2016 3:30 PM
POLICY :
see MISC. POLICIES AND INFORMATION (below) for additional guidelines regarding working together on
assignments.
Please note that anyone cheating on an assignment, quiz, or exam (non-final) will receive a zero on that
assignment, quiz, or exam (non-final). Subsequent cheating will result in a failing grade for the course. Anyone
cheating on the final exam will automatically receive a failing grade for the course.
The Penn State Harrisburg Academic Integrity Policy can be viewed at:
integrity-policy. Please read this policy CAREFULLY so that you fully understand what constitutes academic
dishonesty (See Section E for examples of violations.). Academic dishonesty includes, but is not limited to: cheating,
plagiarizing, fabricating information or citations, facilitating acts of academic dishonesty by others, having
unauthorized possession of examinations, submitting the work of another person or work previously used without
informing the instructor, and tampering with the academic work of other students. Copying program source code
from the Web without citing the source and posting a solution to an assigned programming problem on the Web are
two examples of acts of academic dishonesty that have been committed in programming courses and for which the
perpetrators were penalized. Academic dishonesty could result in a grade of “XF” on your transcript.
ACCOMMODATION
POLICY :
Penn State Harrisburg welcomes students with disabilities into the University’s educational programs. If you have a
disability-related need for modifications or reasonable accommodations in this course, contact the Office for
Disability Services, located at 205 Student Enrichment Center, (717) 948-6025. Your disability and need for
accommodations have to be documented. If you qualify for accommodations, you will receive a letter that you will
present to your professors outlining the specific accommodations, but not your specific disability. For further
information, please visit the Penn State Harrisburg Disability Services Web site at:
/disability-services.
EMERGENCY
SITUATION
POLICY :
If experiencing an emergency situation at any time 24 hours a day, call 911 from any campus phone to contact the
Dauphin County Emergency Communications Center. Inform. them that you are calling from the Penn State
Harrisburg campus and follow their instructions. They will dispatch the University Police and other emergency
resources to your location. For more information, visit the Emergencies page at:
police-services/emergencies.
EMERGENCY
CLOSING POLICY :
To obtain school closing information visit the Penn State Harrisburg Web site: .
MISC. POLICIES
AND
INFORMATION :
Class Cancellation: If your instructor has to cancel class for any reason, you will be notified via e-mail. An
announcement may also be posted on the class Web page.
E-mail Communication: All students are required to check their PSU e-mail regularly to ensure that they receive
potential communication from various offices on campus regarding registration, student accounts, internships, class
cancellation, etc. Your instructor will also regularly send you e-mail with updates regarding assignments, exams,
exam reviews, etc. If you need to contact your instructor with questions about assignments, exams, etc., allow at
least 24 hours for a response. (In other words, if you wait until the last minute to ask for help, you probably won’t get
any.) Please note that your instructor will ONLY respond to student messages sent using PSU e-mail accounts.
Lab Assignments (Working Together, Coding Solutions): Discussing assignments with your classmates is
acceptable. Copying a classmate’s work is not. Your work must be unique. Assignments that exhibit undue similarity
(i.e., that are identical or nearly so) will each receive a grade of 0 (zero). If you use an idea from a classmate,
another instructor, Web site, etc., you must acknowledge that by citing your source (e.g., name of person, URL of
Web page, etc.). If you submit a solution to a lab assignment that employs programming techniques (undocumented,
more advanced) not covered in class prior to the time the assignment was made, you will automatically receive a
grade of 0 (zero) on that assignment. Should you have questions about what is acceptable/not acceptable when
conferring with others about assignments and coding your solutions, talk to me.
Learning Center: The Learning Center may have a peer tutor who can assist you in this course. Visit
or room 201 in the Student Enrichment Center for additional information.
Note: For additional syllabus information regarding important dates, academic integrity, the Learning Center,
students with disabilities, and the inclement weather policy, visit: .
DROP/ADD AND
WITHDRAWAL
DATES :
8/27/2016 (Saturday): Regular Drop period ends.
8/28/2016 (Sunday, 8:00 a.m.): Regular Add period ends.
11/11/2016 (Friday): Late Drop period ends.
Fall 2016 Syllabus: Introduction to Programming Techniques
3 of 4 8/14/2016 3:30 PM

 

联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!