program 4 assignment

User Generated

Anvsss

Programming

Description

please do everything in the instructions please

Unformatted Attachment Preview

10/29/2017 https://www.cs.montana.edu/paxton/classes/csci127/programs/program4/output.txt Student: Jalen Nelson Major: Generic, Major Troubles: False, Math Troubles: False No advising is necessary. Keep up the good work! -----------------------------Student: Jalen Nelson Major: Generic, Major Troubles: True, Math Troubles: True because you are having troubles with your major: --> visit your professor during office hours --> visit your academic advisor because you are having troubles with math: --> visit the Math Learning Center in Wilson 1-112 -----------------------------Student: Jalen Nelson Major: Generic, Major Troubles: True, Math Troubles: False because you are having troubles with your major: --> visit your professor during office hours --> visit your academic advisor -----------------------------Student: Jalen Nelson Major: Generic, Major Troubles: False, Math Troubles: True because you are having troubles with math: --> visit the Math Learning Center in Wilson 1-112 -----------------------------Student: Emma Phillips Major: College of Letters and Sciences, Major Troubles: False, Math Troubles: False No advising is necessary. Keep up the good work! -----------------------------Student: Emma Phillips Major: College of Letters and Sciences, Major Troubles: True, Math Troubles: True because you are having troubles with your major: --> visit your professor during office hours --> visit your academic advisor because you are having troubles with math: --> visit the Math Learning Center in Wilson 1-112 -----------------------------Student: Camden Miller Major: College of Engineering, Major Troubles: False, Math Troubles: False No advising is necessary. Keep up the good work! -----------------------------Student: Camden Miller Major: College of Engineering, Major Troubles: True, Math Troubles: True because you are having troubles with your major: --> visit the EMPower Student Center in Roberts 313 --> visit your professor during office hours --> visit your academic advisor because you are having troubles with math: --> visit the Math Learning Center in Wilson 1-112 -----------------------------Student: Gabriel Smith Major: Computer Engineering, Major Troubles: False, Math Troubles: False No advising is necessary. Keep up the good work! -----------------------------Student: Gabriel Smith Major: Computer Engineering, Major Troubles: True, Math Troubles: True https://www.cs.montana.edu/paxton/classes/csci127/programs/program4/output.txt 1/2 10/29/2017 https://www.cs.montana.edu/paxton/classes/csci127/programs/program4/output.txt because you are having troubles with your major: --> visit the EMPower Student Center in Roberts 313 --> visit your professor during office hours --> visit your academic advisor because you are having troubles with math: --> visit the Math Learning Center in Wilson 1-112 -----------------------------Student: Lena Hamilton Major: Physics, Major Troubles: False, Math Troubles: False No advising is necessary. Keep up the good work! -----------------------------Student: Lena Hamilton Major: Physics, Major Troubles: True, Math Troubles: True because you are having troubles with your major: --> visit the Physics Learning Center in Barnard Hall 230 --> visit your professor during office hours --> visit your academic advisor because you are having troubles with math: --> visit the Math Learning Center in Wilson 1-112 -----------------------------Student: Halley Jones Major: Computer Science, Major Troubles: False, Math Troubles: False No advising is necessary. Keep up the good work! -----------------------------Student: Halley Jones Major: Computer Science, Major Troubles: True, Math Troubles: True because you are having troubles with your major: --> visit the CS Student Success Center in Barnard Hall 259 --> visit a CS professional advisor in Barnard Hall 357 --> visit the EMPower Student Center in Roberts 313 --> visit your professor during office hours --> visit your academic advisor because you are having troubles with math: --> visit the Math Learning Center in Wilson 1-112 -----------------------------Student: Halley Jones Major: Computer Science, Major Troubles: True, Math Troubles: False because you are having troubles with your major: --> visit the CS Student Success Center in Barnard Hall 259 --> visit a CS professional advisor in Barnard Hall 357 --> visit the EMPower Student Center in Roberts 313 --> visit your professor during office hours --> visit your academic advisor -----------------------------Student: Halley Jones Major: Computer Science, Major Troubles: False, Math Troubles: True because you are having troubles with math: --> visit the Math Learning Center in Wilson 1-112 ------------------------------ https://www.cs.montana.edu/paxton/classes/csci127/programs/program4/output.txt 2/2 10/29/2017 # # # # # # # # https://www.cs.montana.edu/paxton/classes/csci127/programs/program4/program4.py ------------------------------------------------CSCI 127, Joy and Beauty of Data Program 4: Advising System Your Name(, Your Partner's Name) Last Modified: ------------------------------------------------A brief overview of the program. ------------------------------------------------- # Your solution goes here ... # ------------------------------------------------# Do not change anything below this line # ------------------------------------------------def advise(student): print("Student:", student.get_first_name(), student.get_last_name()) print("Major: " + student.get_major() + ", Major Troubles: " + str(student.get_major_troubles()) + ", Math Troubles: " + str(student.get_math_troubles())) print() if not student.get_math_troubles() and not student.get_major_troubles(): print("No advising is necessary. Keep up the good work!") else: student.major_advising() student.math_advising() print("------------------------------") # ------------------------------------------------def process(student): advise(student) student.set_major_troubles(True) student.set_math_troubles(True) advise(student) # ------------------------------------------------def main(): # Every student has a major, even if it is "undeclared" msu_student = Generic_Major("jalen", "nelson") process(msu_student) msu_student.set_math_troubles(False) advise(msu_student) msu_student.set_math_troubles(True) msu_student.set_major_troubles(False) advise(msu_student) # A CLS (College of Letters and Science) major is a subclass of a Generic major msu_student = CLS_Major("emma", "phillips") process(msu_student) # A COE (College of Engineering) major is a subclass of a Generic major msu_student = COE_Major("camden", "miller") process(msu_student) # A Computer Engineering major is a subclass of a COE major msu_student = Computer_Engineering_Major("gabriel", "smith") process(msu_student) https://www.cs.montana.edu/paxton/classes/csci127/programs/program4/program4.py 1/2 10/29/2017 https://www.cs.montana.edu/paxton/classes/csci127/programs/program4/program4.py # A Physics major is a subclass of a CLS major msu_student = Physics_Major("lena", "hamilton") process(msu_student) # A Computer Science major is a subclass of a COE major msu_student = Computer_Science_Major("halley", "jones") process(msu_student) msu_student.set_math_troubles(False) advise(msu_student) msu_student.set_math_troubles(True) msu_student.set_major_troubles(False) advise(msu_student) # ------------------------------------------------main() https://www.cs.montana.edu/paxton/classes/csci127/programs/program4/program4.py 2/2 10/29/2017 CSCI 127, Program 4 Program 4: Advising System Logistics Due Date: Tuesday, October 31st no later than midnight. Partner Information: You may complete this assignment individually or with exactly one partner. If you work with a partner, you must both be enrolled in the same lab section or you will both lose 10 points. Submission Instructions: Upload your solution, renamed to YourFirstName-YourLastNamePartnerFirstName-PartnerLastName.py to the BrightSpace Program 4 Dropbox. If you work with a partner, only one person should submit the solution. However, to avoid losing 10 points, write both names in the BrightSpace Dropbox comment box. Deadline Reminder: Once the submission deadline passes, BrightSpace will no longer accept your Python submission and you will no longer be able to earn credit. Thus, if you are not able to fully complete the assignment, submit whatever you have before the deadline so that partial credit can be earned. Learning Outcomes To solve this problem, you need to understand the following new Python concept: object oriented programming. Background Information: A Few MSU Advising Resources If a generic major is having difficulties with courses in the major, that student can visit a professor during office hours. If a generic major is having difficulties with math, that student can visit the Math Learning Center in Wilson 1-112. A CLS major has a major in the College of Letters and Science. A CLS major has the same resources available as a generic major. A COE major has a major in the College of Engineering. In addition to the resources that are available to a generic major, a COE major having difficulties with courses in the major can also visit the EMPower Center in Roberts 313. A Physics major is a major in the CLS. In addition to the resources that are available to a CLS major, a Physics major having difficulties with course in the major can also visit the Physics Learning Center in Barnard Hall 230. A Computer Engineering major is a major in the COE. A Computer Engineering major has the same resources available as a COE major. A Computer Science major is a major in the COE. In addition to the resources that are available to a COE major, a CS major having difficulties with courses in the major can also (1) visit the CS Student Success Center in Barnard Hall 259 or (2) visit a CS professional advisor in Barnard Hall 357. Assignment Using program4.py as a starting point, supply the missing classes and methods so that this output is produced when the program is run. Be sure to utilize inheritance so that your solution is concise and elegant. Helpful Hints https://www.cs.montana.edu/paxton/classes/csci127/programs/program4/ 1/2 10/29/2017 CSCI 127, Program 4 Study the starting program and output transcript carefully until you understand what each missing class and method does. Once that is understood, work out a solution using the following steps: 1. Make the program work for just a Generic_Major. Comment out all references to other majors in the main function. You can complete this task after lecture on Friday, October 20th. 2. Add functionality to handle a CLS_Major. You can complete this task and all subsequent tasks after the lecture on Wednesday, October 25th. 3. Add functionality to handle a COE_Major. 4. Add functionality to handle a Computer_Engineering_Major. 5. Add functionality to handle a Physics_Major. 6. Add functionality to handle a Computer_Science_Major. Grading - 100 points 10 points. The output is correct for a Generic Major who has neither major troubles nor math troubles. 10 points. The output is correct for a Generic Major who has both major troubles and math troubles. 10 points. The output is correct for a Generic Major who has major troubles but not math troubles. 10 points. The output is correct for a Generic Major who has math troubles but not major troubles. 5 points. The output is correct for a CLS major. 5 points. The output is correct for a COE major. 5 points. The output is correct for a Computer Engineering major. 5 points. The output is correct for a Physics major. 5 points. The output is correct for a Computer Science Major who has neither major troubles nor math troubles. 5 points. The output is correct for a Computer Science Major who has both major troubles and math troubles. 5 points. The output is correct for a Computer Science Major who has major troubles but not math troubles. 5 points. The output is correct for a Computer Science Major who has math troubles but not major troubles. 15 points. Object oriented programming is used correctly (3 points for each type of improvement up to 15 points). 5 points - The Python solution is properly commented, easy to understand and does not contain unnecessary code. (1 point for each type of improvement up to 5 points.) Honor's Lab The points you earn from the grading scale above will be multiplied by .9 for a maximum of 90 points. The other 10 points can be earned by enhancing the assignment in a creative, non-trivial manner. In the BrightSpace Dropbox comment box, describe your enhancement clearly. (You must include this comment to earn the additional points.) https://www.cs.montana.edu/paxton/classes/csci127/programs/program4/ 2/2
Purchase answer to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

Hey buddy, I am through with the q...


Anonymous
Great! 10/10 would recommend using Studypool to help you study.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4

Related Tags