Thread: Need assistance on my assignment, kind of stuck.

  1. #1
    Registered User
    Join Date
    Jan 2017
    Posts
    9

    Need assistance on my assignment, kind of stuck.

    I am working on an assignment and would like an input if I am heading in a right direction. I am also stuck on specific guideline and I need assistance on how to complete it.

    Here's what my assignment asking us to do:
    Create a program that be used for keeping track of textbooks required and recommended for classes and the cost of those textbooks...
    Right now I am trying to do one of many line formats such as:
    "B<ISBN><Title>
    - Define a book. The ISBN is a 13 digit number. The Title is a string of arbitrary length(ending with line break).
    e.g : B 1234567890123 Programming for Dummies"

    And this is what I have so far:
    Code:
    #include <iostream>
    #include <string>
    using namespace std;
    
    
    
    
    int main() {
        
        char input;
        
        cout << "Please enter a single or double character that identifies the type of operation: "<< endl;
        cin >> input;
        
        string ISBN;
        string TITLE;
        
        switch ( input ){
            case 'B':
            //Stuck here...    
            break;
        }
        
        
        
    }
    Now I am lost as in what the format wants me to do, do I make my own books, and when the user input "B" they will get all the possible book outputs? Or I am not understanding the requirements correctly.

  2. #2
    Registered User
    Join Date
    May 2010
    Posts
    4,632
    You may want to consider a class or so to hold the required values.

    Jim

  3. #3
    Registered User
    Join Date
    Jan 2017
    Posts
    9
    Ah ok, I'll take that into consideration. Thanks. But did I interpreted the question correctly?

  4. #4
    Registered User
    Join Date
    Jun 2011
    Posts
    4,513
    You should ask whoever gave you this assignment for further explanation. The description you've provided is, to me at least, unclear.

  5. #5
    Registered User
    Join Date
    Jan 2017
    Posts
    9
    Yeah, it is best to ask my instructor for clarity, thanks.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Assignment assistance
    By jswatson0917 in forum Tech Board
    Replies: 2
    Last Post: 03-22-2013, 06:50 PM
  2. Assignment assistance
    By jswatson0917 in forum C Programming
    Replies: 0
    Last Post: 03-21-2013, 07:49 PM
  3. got stuck with assignment ..
    By FrozenMind in forum C Programming
    Replies: 6
    Last Post: 04-02-2011, 05:36 AM
  4. Replies: 3
    Last Post: 04-26-2009, 08:54 AM
  5. Stuck With C Assignment
    By adj123 in forum C Programming
    Replies: 1
    Last Post: 03-04-2008, 07:14 AM

Tags for this Thread