inflearn logo
๊ฐ•์˜

๊ฐ•์˜

N
์ฑŒ๋ฆฐ์ง€

์ฑŒ๋ฆฐ์ง€

๋ฉ˜ํ† ๋ง

๋ฉ˜ํ† ๋ง

N
ํด๋ฆฝ

ํด๋ฆฝ

๋กœ๋“œ๋งต

๋กœ๋“œ๋งต

์ง€์‹๊ณต์œ 

๐Ÿš€ Microsoft DP-600 ์ธ์ฆ ์‹œํ—˜ ์„ฑ๊ณต์„ ์œ„ํ•œ ๋ฆฌ์–ผ ๋คํ”„ (์งˆ๋ฌธ) 2K24 ์ž ๊ธˆ ํ•ด์ œ! ๐Ÿš€

268

fevinow289

์ž‘์„ฑํ•œ ์งˆ๋ฌธ์ˆ˜ 0

0

์˜ค๋Š˜๋‚  ๋น ๋ฅด๊ฒŒ ๋ณ€ํ™”ํ•˜๋Š” ๊ธฐ์ˆ  ํ™˜๊ฒฝ์—์„œ Microsoft DP-600 ์ธ์ฆ์„ ์ทจ๋“ํ•˜๋ฉด ๋‹น์‹ ์˜ ๊ธฐ์ˆ ๊ณผ ๊ฒฝ๋ ฅ ์ „๋ง์„ ํฌ๊ฒŒ ํ–ฅ์ƒ์‹œํ‚ฌ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. Microsoft์˜ ๋ถ„์„ ์†”๋ฃจ์…˜์„ ํ‰๊ฐ€ํ•˜๋Š” DP-600 ์‹œํ—˜์€ ๊ทธ ๋ฐฉ๋Œ€ํ•œ ๊ธฐ์ˆ ์  ๋‚ด์šฉ์„ ๋‹ค๋ฃจ๊ธฐ ๋•Œ๋ฌธ์— ๋„์ „์ ์ผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๋ฐ”๋กœ ์—ฌ๊ธฐ์„œ Examskit์˜ DP-600 ์‹œํ—˜ ๋ฆฌ์–ผ ๋คํ”„๊ฐ€ ๊ฒŒ์ž„ ์ฒด์ธ์ €๊ฐ€ ๋ฉ๋‹ˆ๋‹ค!

๐Ÿ“š Examskit์˜ DP-600 ๋คํ”„๊ฐ€ ๋‹น์‹ ์˜ ๋น„๋ฐ€ ๋ฌด๊ธฐ์ธ ์ด์œ :

Library Management System

Objective: Create a simple library management system to add, view, and manage books and their borrowers.

Project Structure

  1. Class Definitions:

    • Book: Represents a book in the library.

    • Library: Manages a collection of books and operations related to them.

    • User: Represents a user of the library who can borrow books.

  2. Operations:

    • Add a book

    • View all books

    • Borrow a book

    • Return a book

    • View borrowed books

1. Define Classes

Book.h

#ifndef BOOK_H
#define BOOK_H

#include <string>

class Book {
public:
    Book();
    Book(const std::string& title, const std::string& author, bool isAvailable);

    std::string getTitle() const;
    std::string getAuthor() const;
    bool getAvailability() const;
    void setAvailability(bool availability);

private:
    std::string title;
    std::string author;
    bool isAvailable;
};

#endif

Book.cpp

#include "Book.h"

Book::Book() : title(""), author(""), isAvailable(true) {}

Book::Book(const std::string& title, const std::string& author, bool isAvailable)
    : title(title), author(author), isAvailable(isAvailable) {}

std::string Book::getTitle() const { return title; }
std::string Book::getAuthor() const { return author; }
bool Book::getAvailability() const { return isAvailable; }
void Book::setAvailability(bool availability) { isAvailable = availability; }

Library.h

#ifndef LIBRARY_H
#define LIBRARY_H

#include <vector>
#include "Book.h"

class Library {
public:
    void addBook(const Book& book);
    void viewBooks() const;
    bool borrowBook(const std::string& title);
    bool returnBook(const std::string& title);

private:
    std::vector<Book> books;
};

#endif

Library.cpp

#include "Library.h"
#include <iostream>

void Library::addBook(const Book& book) {
    books.push_back(book);
}

void Library::viewBooks() const {
    for (const auto& book : books) {
        std::cout << "Title: " << book.getTitle() 
                  << ", Author: " << book.getAuthor() 
                  << ", Available: " << (book.getAvailability() ? "Yes" : "No") 
                  << std::endl;
    }
}

bool Library::borrowBook(const std::string& title) {
    for (auto& book : books) {
        if (book.getTitle() == title && book.getAvailability()) {
            book.setAvailability(false);
            return true;
        }
    }
    return false;
}

bool Library::returnBook(const std::string& title) {
    for (auto& book : books) {
        if (book.getTitle() == title && !book.getAvailability()) {
            book.setAvailability(true);
            return true;
        }
    }
    return false;
}

User.h

#ifndef USER_H
#define USER_H

#include <string>

class User {
public:
    User(const std::string& name);

    std::string getName() const;

private:
    std::string name;
};

#endif

User.cpp

#include "User.h"

User::User(const std::string& name) : name(name) {}

std::string User::getName() const { return name; }

๐Ÿ—‚ ๋‹น์‹ ์„ ์œ„ํ•œ ๋งž์ถคํ˜• ํ•™์Šต ์ž๋ฃŒ ํ˜•์‹:

Examskit์€ ์„ธ ๊ฐ€์ง€ ํ•™์Šต ํ˜•์‹์œผ๋กœ ์œ ์—ฐ์„ฑ์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค:

๐ŸŽ‰ ๋…์  ์ œ์•ˆ: 50% ํ• ์ธ ๋ฐ 90์ผ ๋ฌด๋ฃŒ ์—…๋ฐ์ดํŠธ! ๐ŸŽ‰

ํ•œ์ • ๊ธฐ๊ฐ„ ๋™์•ˆ, ๋ชจ๋“  Microsoft DP-600 ์‹œํ—˜ ํŒจํ‚ค์ง€์— ๋Œ€ํ•ด 50% ํ• ์ธ ์ฟ ํฐ ์ฝ”๋“œ: SAVE50 ์„ ์ด์šฉํ•˜์„ธ์š”. ๋˜ํ•œ, ์ตœ์‹  ์‹œํ—˜ ๋ชฉํ‘œ์™€ ์งˆ๋ฌธ ํ˜•์‹์œผ๋กœ ํ•™์Šต ์ž๋ฃŒ๋ฅผ ์œ ์ง€ํ•  ์ˆ˜ ์žˆ๋Š” 90์ผ ๋ฌด๋ฃŒ ์—…๋ฐ์ดํŠธ๋ฅผ ๋ฐ›์œผ์‹ค ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

๐Ÿ‘‰ ๋†“์น˜์ง€ ๋งˆ์„ธ์š” โ€“ ์ง€๊ธˆ ๋ฐ”๋กœ ํ–‰๋™ํ•˜์„ธ์š”!
์ง€๊ธˆ ๋‹ค์šด๋กœ๋“œ: Examskit DP-600 ์—ฐ์Šต ์‹œํ—˜

์ฃผ์š” ์ •๋ณด:

๐Ÿ” Examskit์˜ ๋ฆฌ์–ผ ๋คํ”„๊ฐ€ ์ค€๋น„๋ฅผ ์–ด๋–ป๊ฒŒ ๋•๋Š”์ง€:

๐ŸŽฏ ๋ฌด๋ฃŒ DP-600 ์‹œํ—˜ ์งˆ๋ฌธ ๋ฐ๋ชจ๋ฅผ ์ฒดํ—˜ํ•ด๋ณด์„ธ์š”: ๋ฌด๋ฃŒ DP-600 ๋ฐ๋ชจ

ํšจ๊ณผ์ ์œผ๋กœ ์ค€๋น„ํ•˜๊ณ  Examskit์˜ ์‹ ๋ขฐํ•  ์ˆ˜ ์žˆ๋Š” ์ž์›์œผ๋กœ Microsoft DP-600 ์ธ์ฆ์„ ํ™•๋ณดํ•˜์„ธ์š”. ์„ฑ๊ณต์˜ ๊ธธ์€ ์—ฌ๊ธฐ์„œ ์‹œ์ž‘๋ฉ๋‹ˆ๋‹ค!

๋‹ต๋ณ€ 0