0% found this document useful (0 votes)
2 views

CS_Part_2_Module08Asssignment

The document outlines a Module 8 assignment for a Computer Science course, focusing on a library management system project. It includes details on team roles, project functionality, user interaction, and pseudocode for implementation. The project aims to enable users to manage books through various functions such as adding, searching, displaying, sorting, and removing books from a library database.

Uploaded by

ibnmahammoud1
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

CS_Part_2_Module08Asssignment

The document outlines a Module 8 assignment for a Computer Science course, focusing on a library management system project. It includes details on team roles, project functionality, user interaction, and pseudocode for implementation. The project aims to enable users to manage books through various functions such as adding, searching, displaying, sorting, and removing books from a library database.

Uploaded by

ibnmahammoud1
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

CTE

Computer Science, Part 2


Module 8 Assignment

Note: Make sure your links are live and will go to the URL when
clicked. To do this, after pasting the URL, add a space. The URL will
automatically become a live hyperlink.
Code HS Lessons
CodeHS Lesson 8.5: Creating and Altering Data Structures Quiz (2 points)
URL:
https://codehs.com/student/1298751/section/268463/assignments

Python Program 8 Project


Program 6 (Module 3) URL: https://codehs.com/sandbox/id/python-
program-6-project-C8EMZY
Program 7 (Module 6) URL: https://codehs.com/sandbox/id/python-
program-7-project-cINKLw
Program 8 (Module 8) URL: https://codehs.com/sandbox/id/python-
program-8-project-1o191t
Copy and paste your project Python code for Module 8 below.

library = []

def add_book(book_name):
if book_name not in library:
library.append(book_name.title())
print(f"'{book_name}' has been added to the library!")
else:
print(f"'{book_name}' is already in the library.")

def search_book(book_name):
if book_name.title() in library:
CTE
Computer Science, Part 2
Module 8 Assignment

index = library.index(book_name.title())
print(f"'{book_name}' is in the library at position {index + 1}.")
else:
print(f"'{book_name}' is not in the library.")

def display_library():
if len(library) == 0:
print("The library is empty!")
else:
print("\nBooks in the Library:")
for book in library:
print(f"- {book}")

def sort_library():
library.sort()
print("\nThe library has been sorted alphabetically!")

def remove_book(book_name):
try:
library.remove(book_name.title())
print(f"'{book_name}' has been removed from the library!")
except ValueError:
print(f"'{book_name}' is not in the library!")

def main():
while True:
CTE
Computer Science, Part 2
Module 8 Assignment

print("\nLibrary Menu:")
print("1. Add a Book")
print("2. Search for a Book")
print("3. Display All Books")
print("4. Sort the Library")
print("5. Remove a Book")
print("6. Exit")
try:
choice = int(input("Enter your choice (1-6): "))
if choice == 1:
book_name = input("Enter the name of the book to add:
").strip()
add_book(book_name)
elif choice == 2:
book_name = input("Enter the name of the book to search for:
").strip()
search_book(book_name)
elif choice == 3:
display_library()
elif choice == 4:
sort_library()
elif choice == 5:
book_name = input("Enter the name of the book to remove:
").strip()
remove_book(book_name)
elif choice == 6:
print("Goodbye!")
CTE
Computer Science, Part 2
Module 8 Assignment

break
else:
print("Please enter a valid choice (1-6).")
except ValueError:
print("Invalid input. Please enter a number between 1 and 6.")

main()
CTE
Computer Science, Part 2
Module 8 Assignment

Capstone Project Team


Who is on your team? List your team members below. Each team member
can take on one or two roles. You must be a programmer.
Client: Joe
Project Manager: Daniel
Programmer: Abdirahman
Beta Tester: Zack

Capstone Project Plan


Note: This is your initial project plan and is part of earning the
Idea Design and Refinement micro-credential.
Be sure you work with your client and project manager to
clarify the features of the program and the constraints or
limitations you will be working under. Describe how the
program and the user will interact.
As you design your program, consider different ways to meet the project
requirements. Make sure you understand what you need to do to get the
program to run. Your pseudocode or outline is your model of the program.

Brief project description

The project is to develop a libraryManagement System. This system allows


users to manage books, including adding, searching, displaying, sorting, and
removing books from a library database. This system will provide an intuitive
interface to help users organize library collections effectively.

User interaction and interface


CTE
Computer Science, Part 2
Module 8 Assignment

1. Users will interact with the program through a menu displayed in the
console
2. The console will display clear instructions
3. The program will prompt users to enter their choices of 1-6 to navigate
the system
4. The system will do functions such as adding, searching, or removing
books

User needs

● The ability to add and remove books in the library


● A way to search for specific books
● To contain all books in an organized list
● The option to sort books alphabetically for easier management

Program functionality

Add a book - adds a book to the list


Search for a book - Finds a specific book in the list
Display books - List of all books currently in the library
Sort Library - Sorts the library collection alphabetically
Remove a book - Removes a specific book from the list

Pseudocode or outline
CTE
Computer Science, Part 2
Module 8 Assignment

Create a global list of books for the library


Create functions for each feature
design a function to display the menu & process user input
Use loops & string methods to process input & give correct outputs

Module sequence outline

Main Module -
Add Book Module
Search Module
Display Module
Sort Module
Remove Book Module
CTE
Computer Science, Part 2
Module 8 Assignment

Capstone Team Reflection


What part did each team member play in preparing the Capstone Project
Plan? Write one or two sentences to explain what they did to help. At this
point, the beta tester likely has not done anything.
Client: John - 2% Making the request for the program
Project Manager: Daniel - 5% of the work with managing everything
Programmer: Abdirahman - 90% of the work with coding the program
Beta Tester: Zack 0% after the program is finished he will help

Creativity: Idea Design and Refinement


Describe how you have met the Clarify criteria for the Idea
Design and Refinement micro-credential.

I worked closely with the client and project manager to clarify


the requirements for the program. THis included understanding the desired
functionality and brainstorming features that would enhance the user
experience.

Describe how you have met the Design criteria for the Idea
Design and Refinement micro-credential.

The program was designed to be user friendly. I implemented a


module by module approach to divide the program into manageable
sections that will fulfill the users needs.

You might also like