- Programming fundamentals in Python
- Object Oriented Programming in Python
- Fork and clone this repository.
- Change into the new directory.
- Fulfill the listed requirements.
Starter code is available in lib/app.py
. You are required to
turn in your submission by making a pull request on the original repository.
This is an optional pair programming assignment. If working in a pair, follow this simple Git Paired Programming workflow and be sure that both team members have equal commits on the repo. When turning in your assignment via pull request, please include a comment listing the names of BOTH contributors. Only one pull request required per pair.
Unless otherwise specified on the calendar or by an instructor, homework is due the next class day at 9AM Eastern.
You're starting your own web development school called Codebar! Everybody at
Codebar - whether they are attending workshops or teaching them - is
a Member
:
- Each member has a
full_name
. - Each member should be able to
introduce
themselves (e.g., "Hi, my name is Kevin!").
Each Member
is also either a Student
or an Instructor
:
- Each Student has a
reason
for attending Codebar (e.g., "I've always wanted to make websites!"). - Each Instructor a
bio
(e.g., "I've been coding in Python for 5 years and want to share the love!"). - Each Instructor also has a set of
skills
(e.g.,["Python", "Javascript", "C++"]
). - An Instructor can gain a new skill using
add_skill
.
Codebar also has Workshops. Each Workshop has:
- A
date
. - A
subject
. - A group of instructors.
- A roster of students.
- An
add_participant
method that accepts a member as an argument. If the Member is an Instructor, add them to the instructors list. If a Member is a Student, add them to the students list.
Create another method print_details
that outputs the details of the workshop.
Make your code work for the following calls and print out the response you can see in the comments below:
workshop = Workshop("12/03/2014", "Shutl")
jane = Student("Jane Doe", "I am trying to learn programming and need some help")
lena = Student("Lena Smith", "I am really excited about learning to program!")
vicky = Instructor("Vicky Python", "I want to help people learn coding.")
vicky.add_skill("HTML")
vicky.add_skill("JavaScript")
nicole = Instructor("Nicole McMillan", "I have been programming for 5 years in Python and want to spread the love")
nicole.add_skill("Python")
workshop.add_participant(jane)
workshop.add_participant(lena)
workshop.add_participant(vicky)
workshop.add_participant(nicole)
workshop.print_details()
# =>
# Workshop - 12/03/2014 - Shutl
#
# Students
# 1. Jane Doe - I am trying to learn programming and need some help
# 2. Lena Smith - I am really excited about learning to program!
#
# Instructors
# 1. Vicky Ruby - HTML, JavaScript
# I want to help people learn coding.
# 2. Nicole McMillan - Ruby
# I have been programming for 5 years in Ruby and want to spread the love
#
The print_details
method currently does a number of different things, like
printing out workshop details, the list of Students and the list of Coaches.
Create separate methods to print the workshop details (date and classroom),
a method to print out the students and one to print out the coaches. Call these
from print_details
instead of having all the code there.
Hint: look into defining private class methods.
Take a moment to refamiliarize yourself with the Plagiarism policy. Plagiarized work will not be accepted.
- All content is licensed under a CCBYNCSA 4.0 license.
- All software code is licensed under GNU GPLv3. For commercial use or alternative licensing, please contact [email protected].