1. Homepage
  2. Coding
  3. COMP2404AB (Fall 24) Introduction to Software Engineering - Assignment 1: Campground

COMP2404AB (Fall 24) Introduction to Software Engineering - Assignment 1: Campground

Chat with a Specialist
CarletonCOMP2404ABIntroduction to Software EngineeringC++CRUDCampgroundDatabase

COMP2404AB (Fall 24) -“Introduction to Software Engineering” Assignment 1 - Due Sunday September 22nd, 11:59 pm Assignment Writing Service

1 Submission Instructions Assignment Writing Service

Submit to Brightspace on or before the due date a compressed file (.zip) that includes Assignment Writing Service

Header and source files for all classes instructed below. Assignment Writing Service

A working Makefile that compiles and links all code into a single executable. The Makefile should be specific to this assignment - do not use a generic Makefile. Assignment Writing Service

A README file with your name, student number, a list of all files and a brief description of their purpose (where necessary), compilation and execution instructions. In addition, if you have done anything different from the specification, please detail it here. You may introduce functions, or change functions, as long as the tests still run correctly, and you do not use any libraries other than those permitted (iostream, string, sstream, iomanip) Assignment Writing Service

Learning Outcomes Assignment Writing Service

In this assignment you will make a basic CRUD (create, read, update, delete) application. You will learn the basics of classes, arrays, and static memory in C++. You will make a few simple classes, populate the members using constructors and write functions to process the data. You will learn how to provide a working Makefile, and implement a small amount of application logic. Assignment Writing Service

3 Overview Assignment Writing Service

You will make an app that manages reservations for a Campground. A Campground consists of Campsites. Each Campsite has a Category, which is an enum consisting of entries such as tent or cabin, and Campsites can be reserved by Campers. To manage the reservations, and ensure that we do not have Campsites reserved to more than one group on a given day, you will modify the Date class that we saw in class. Assignment Writing Service

We will be implementing a basic back-end of the application, but not a user-facing interface. Instead of a user-facing interface you will be supplied with a test suite for your application. Assignment Writing Service

4 Classes Overview Assignment Writing Service

This application will consist of 4 classes, and one Tester class. In addition it will have header and source files Category.h and Category.cc, as well as defs.h. A brief description of each class and the given files follows. Assignment Writing Service

1. Date - will store Date information and functions, modified to better manage Camper reservations. Assignment Writing Service

2. Camper - an entity class containing information about someone who has reserved a Campsite. Assignment Writing Service

3. Campsite - an entity class containing information about individual campsites, as well as a list of Campers staying at that site, organized by Date. Assignment Writing Service

  1. Campground - the main class. This class provides functions to add, remove, and print Campsites and Campers. Assignment Writing Service

  2. Tester - some functions used to test your code. Assignment Writing Service

  3. Category.h, Category.cc - compile these into Category.o and link to your executable. These contain a Category enum and a global function to convert a Category enum to an appropriate string, both in the cat namespace. Assignment Writing Service

7. defs.h - this has a preprocessor constant that you may use to initialize your arrays to a consistent size. Assignment Writing Service

All your classes should all be in separate header and source files that are compiled explicitly in your Makefile!!. In addition you should compile and link the Tester class into your executable. Assignment Writing Service

COMP2404AB (Fall 24) -“Introduction to Software Engineering” Assignment 1 - Due Sunday September 22nd, 11:59 pm Assignment Writing Service

5 Instructions Assignment Writing Service

Download the starting code from Brightspace. All member variables are private unless otherwise noted. All member functions are public unless otherwise noted. Some return values are not explicitly given. You should use your best judgment (they will often be void, but not always). ALL CLASSES MUST HAVE A PRINT FUNCTION UNLESS OTHERWISE NOTED. This prints metadata about the class like names or dates but not data contained in a data structure like an array (unless explicitly specified). Assignment Writing Service

All other objects should be passed by reference with one exception. You are allowed to pass string objects by value for this assignment only. Passing by string& does not work with string literals (and we will learn why in the lessons on Encapsulation). You may use string or const string&. For the purposes of this assignment they function the same, but the second version is more efficient, as we will learn. Assignment Writing Service

Your finished code should compile into a single executable called a1 using the command make a1, make, or make all, using a Makefile that you wrote yourself. Your submission should consist of a single zip file with a suitable name (e.g., assignment1.zip) that contains a folder containing all your files. This folder should also contain a README with your name, student number, a list of all files that are included. The main thing it should include is any changes to the specification. I don’t mind when you do things differently - I would encourage it, as long as it is code you write yourself, and not outside libraries - but you must document these changes. Assignment Writing Service

All data in the assignment must be statically allocated. That means no malloc, no new, and you will lose marks if there are pointers. Use references instead. Assignment Writing Service

5.1 Notes on Automated Marking Assignment Writing Service

Initially main.cc will not compile because it references classes and functions that do not exist. Feel free to comment out parts that are not working. Or you can write your classes with empty implementations that you complete as you go (which I would recommend, but it is up to you). You may also #include additional header files for classes other than Campground. You may make your own file with your own main function and write your own tests, and compile that separately. But the code provided in main.cc using the Tester class is what will be run to determine your application requirements mark. Assignment Writing Service

Most of your bugs will be in your code. However, some of you will likely find bugs or inconsistencies in the provided test code as well. Please bring them to my attention. Assignment Writing Service

When there is a conflict between this specification and the test code, the test code takes prece- dence. A rule of thumb: Assignment Writing Service

Working applications are always better than applications that don’t run, even if you break the rules. It is better to break a rule, or ignore the specification, and submit a working application than to submit something that doesn’t run but follows all the instructions. Assignment Writing Service

The specification is just a guide. Your assignment is to produce a running program that passes the tests, while following the specification as closely as possible. Making it run correctly, and do the things it is supposed to do is the highest priority! Assignment Writing Service

5.2 The defs.h file Assignment Writing Service

This file defines some handy preprocessor constants so that these values are consistent across our application. In this case it defines MAX ARRAY which you should use as the size to initialize your arrays to. Assignment Writing Service

5.3 Category.h and Category.cc Assignment Writing Service

These files are done for you. They contain a Category enum and a categoryToString(Category c) global function to convert a Category enum to an appropriate string (you will use this in your print functions). Both the enum and the function are in the cat namespace. You will need this in your Campsite class. Assignment Writing Service

COMP2404AB (Fall 24) -“Introduction to Software Engineering” Assignment 1 - Due Sunday September 22nd, 11:59 pm Assignment Writing Service

5.4 The Date Class Assignment Writing Service

You are given a Date class. To that you will add the following (suggested) members. 1. Member functions: Assignment Writing Service

  1. (a)  A bool equals(Date& d) function. This should return true if the Date in question and d are equal in value and false otherwise. Assignment Writing Service

  2. (b)  A bool lessThan(Date& d) function. This should return true if the Date in question comes before d and false otherwise. Assignment Writing Service

5.5 The Camper Class Assignment Writing Service

The Camper class contains the information of someone who has reserved a Campsite, including the Dates they have reserved. Assignment Writing Service

1. Data members: Assignment Writing Service

  1. (a)  A string: name. For the purposes of this assignment we will assume that the name serves as a unique identifier, i.e., no two Campers have the same name. You do not have to check for this - you can assume each name given as input is unique. Assignment Writing Service

  2. (b)  A string: plate number. This has the license plate of the Camper’s vehicle. Assignment Writing Service

  3. (c)  int num people. The number of people staying at the Campsite. You should ensure this is a number is Assignment Writing Service

    at least 1 and at most the maxPeople parameter of the Campsite they are staying at. Assignment Writing Service

  4. (d)  Date check in and Date check out. These are self-explanatory. Ensure that check-out is at least one Assignment Writing Service

    day later than check-in. Assignment Writing Service

2. Make a constructor that takes the information in the order and type given and initializes the member variables. Assignment Writing Service

3. Make a no-argument constructor that initializes the member variables with dummy data. 4. Member functions: Assignment Writing Service

(a) A print function that prints out the Camper data, including the check-in and check-out dates. (b) Any other function you might need (you will almost certainly need more functions). Assignment Writing Service

5.6 The Campsite Class Assignment Writing Service

The Campsite class stores data about the campsite, as well as an array of Campers who have reserved the site. Assignment Writing Service

  1. Data members: Assignment Writing Service

    (a) int site number; (b) Category category; Assignment Writing Service

    (c) string description; (d) int maxPeople; Assignment Writing Service

    (e) double price per day; Assignment Writing Service

  2. Make a constructor with the parameters given above in the order given, and use these parameters to initialize your Campsite member variables. You should do routine bounds checking, i.e., make sure the price is not 0 or negative and make sure maxPeople is at least 1. Assignment Writing Service

COMP2404AB (Fall 24) -“Introduction to Software Engineering” Assignment 1 - Due Sunday September 22nd, 11:59 pm Assignment Writing Service

3. In addition you will need the following to keep track of Campers;
(a) A statically allocated array of
Camper objects with size MAX ARRAY. Assignment Writing Service

(b) You should also make an int member that tracks the number of Campers in the array. 4. Member functions: Assignment Writing Service

  1. (a)  Make a bool addCamper function that takes a name, plate number, number of people, check-in date and check-out date as parameters, in that order. This should add a Camper to the Camper array according to the instructions given below. Return true if adding was successful and false otherwise. Assignment Writing Service

  2. (b)  Make a removeCamper(string name) function. This should remove a Camper from the array if the name parameter matches the camper name. Assignment Writing Service

5. You will make 3 different print functions. Assignment Writing Service

  1. (a)  Make a print() function. This function should print all the Campsite data nicely formatted. For example: Assignment Writing Service

             Site Number: 5
             Category: lodge
             Description: Lake front
             Max People: 5
             Price per Day: $50.00
    
  2. (b)  Make printCampers() function. This should print all Campers in the Camper array. Assignment Writing Service

  3. (c)  Make a printCamper(Date& date) function. This should print the Camper c for which date parameter is equal to or later than c.check in, but before c.check out. If no such Camper exists, print out an appropriate message. Assignment Writing Service

    To help clarify the behaviour, if we think of date, check in and check out as integers, then print the Camper c for which c.check in <= date and date < c.check out. Assignment Writing Service

Rules for storing Campers: the Campers should be stored in the order by Date that they are using the Campsite. There should never be two Campers using the Campsite on the same Date. The exception is that the check out Date of one Camper can be equal to the check in Date of the next Camper (one Camper moves on to the site on the same day as another Camper leaves the site - this is allowed). Assignment Writing Service

In addition, all Campers should be stored in the array consecutively (there should be no gaps in the array). 5.7 The Campground Class Assignment Writing Service

The Campground class will maintain an array of Campsites, as well as functions related to adding, removing, and displaying Campsites and Campers. A vanilla print function is not necessary - we will make multiple specialized print functions instead. Assignment Writing Service

1. Member variables: Assignment Writing Service

(a) Make a statically allocated array of Campsite objects.
(b) Make sure you track the number of elements in the above array.
Assignment Writing Service

2. Make a default (no-argument) constructor that initializes all member variables. 3. Member functions: Assignment Writing Service

(a) addCampsite: The parameters of this function are the same types in the same order as the Campsite constructor. If there is room in the Campsite array, and the site number is unique, add the Campsite to the back of the array. Print out an appropriate message to cout whether successful or not. Assignment Writing Service

COMP2404AB (Fall 24) -“Introduction to Software Engineering” Assignment 1 - Due Sunday September 22nd, 11:59 pm
Assignment Writing Service

  1. (b)  removeCampsite(int site number): If there is a Campsite with the given site number, remove it from the array. In either case, print out an appropriate message to cout. Assignment Writing Service

  2. (c)  addCamper(int site number, ...): Instead of ..., the remaining parameters should be the same type and order as the Camper constructor. Find a Campsite with the given site number and add a Camper with the given parameters to it. Print out a message to cout telling the user that the process succeeded, or else describe where it failed. Assignment Writing Service

  3. (d)  removeCamper(int site number, string name) - attempt to remove the Camper with the given name from the Campsite with the given number. Print out a message on cout describing that the operation succeeded, or else describe where and how it failed. Assignment Writing Service

4. print functions for displaying data: Assignment Writing Service

  1. (a)  printCampsites() - print all Campsites at this Campground. Assignment Writing Service

  2. (b)  printCampers(int site number) - print all Campers at the Campsite with the given site number. Assignment Writing Service

  3. (c)  void printCampers(Date& date) - print all Campers on any Campsite on the given date. The rules for this are the same as the rules described for Campsite::printCamper(Date& date). Assignment Writing Service

  4. (d)  void printCampsitesByCategory(Category category) - print all Campsites in the given category. Assignment Writing Service

6 Grading Assignment Writing Service

The marks are divided into three main categories. The first two categories, Requirements and Constraints are where you earn marks for making a working application that was done correctly. The third category, Deductions is where you are penalized marks. Assignment Writing Service

6.1 Specification Requirements Assignment Writing Service

These are marks for having a working application (even when not implemented according to the specification, within reason). These are the same marks shown in the test suite, repeated here for convenience. Marks are awarded for the application working as requested. Assignment Writing Service

You are still responsible for, and may be penalized for, any errors the test suite does not catch, or any drastic departure from the specification (such as using outside libraries). We reserve the right to modify the mark given by the test script in these cases. Assignment Writing Service

General Requirements Assignment Writing Service

All marking components must be called and execute successfully to earn marks. All data handled must be printed to the screen as specified to earn marks. Assignment Writing Service

Application Requirements: 31 marks Assignment Writing Service

1. (4 marks) Test print Campers
2. (3 marks) Test print Campsites
3. (7 marks) Test Campsite add, remove, and print Campers
4. (8 marks) Test add, remove, and print Campsites in Campground 5. (9 marks) Test add, remove, and print Campers in Campground
Assignment Writing Service

Requirements Total: 31 marks Assignment Writing Service

COMP2404AB (Fall 24) -“Introduction to Software Engineering” Assignment 1 - Due Sunday September 22nd, 11:59 pm
Assignment Writing Service

6.2 Constraints Assignment Writing Service

The previous section awards marks if your program works correctly. In this section marks are awarded if your program is written according to the specification and using proper object oriented programming techniques. This includes but is not limited to: Assignment Writing Service

6.2.1 Constraint marks: Assignment Writing Service

  1. 2 marks: Proper implementation of the Date class. Assignment Writing Service

  2. 2 marks: Proper implementation of the Camper class. Assignment Writing Service

  3. 2 marks: Proper implementation of the Campsite class. Assignment Writing Service

  4. 2 marks: Proper implementation of the Campground class. Assignment Writing Service

  5. 3 marks: Proper error messages in the Campground class. Assignment Writing Service

Constraints Total: 11 marks Assignment Writing Service

6.3 Deductions Assignment Writing Service

The requirements listed here represent possible deductions from your assignment total. In addition to the constraints listed in the specification, these are global level constraints that you must observe. For example, you may only use approved libraries, and your programming environment must be properly configured to be compatible with the virtual machine. This is not a comprehensive list. Any requirement specified during class but not listed here must also be observed and may be penalized if done incorrectly. Assignment Writing Service

COMP2404AB (Fall 24) -“Introduction to Software Engineering” Assignment 1 - Due Sunday September 22nd, 11:59 pm Assignment Writing Service

Packaging and file errors: Assignment Writing Service

5%: Missing README
10%: Missing Makefile (assuming this is a simple fix, otherwise see 4 or 5).
Assignment Writing Service

up to 10%: Failure to use proper file structure (separate header and source files for example), but your program still compiles and runs Assignment Writing Service

up to 50%: Failure to use proper file structure (such as case-sensitive files and/or Makefile instructions) that results in program not compiling, but is fixable by a TA using reasonable effort. Assignment Writing Service

up to 100%: Failure to use proper file structure or other problems that severely compromise the ability to compile and run your program. Assignment Writing Service

As an example, submitting Windows C++ code and Makefile that is not compatible with the Linux VM would fall under 4 or 5 depending on whether a reasonable effort could get it running. Assignment Writing Service

Incorrect object-oriented programming techniques: Assignment Writing Service

Up to 10%: Substituting C functions where C++ functions exist (e.g. don’t use printf, do use cout). Up to 25%: Using smart pointers. Assignment Writing Service

Up to 25%: Using global functions or global variables other than the main function and those functions and variables expressly permitted or provided. Assignment Writing Service

Unapproved libraries: Assignment Writing Service

Up to 100%: The code must compile and execute in the default course VM provided or Openstack. It must NOT require any additional libraries, packages, or software besides what is available in the standard VM or Openstack. Assignment Writing Service

Up to 100%: Your program must not use any classes, containers, or algorithms from the standard template library (STL) unless expressly permitted. Assignment Writing Service

Assignment Total (Requirements and Constraints): 42 Assignment Writing Service

联系辅导老师!
私密保护
WeChat 微信
Carleton代写,COMP2404AB代写,Introduction to Software Engineering代写,C++代写,CRUD代写,Campground代写,Database代写,Carleton代编,COMP2404AB代编,Introduction to Software Engineering代编,C++代编,CRUD代编,Campground代编,Database代编,Carleton代考,COMP2404AB代考,Introduction to Software Engineering代考,C++代考,CRUD代考,Campground代考,Database代考,Carleton代做,COMP2404AB代做,Introduction to Software Engineering代做,C++代做,CRUD代做,Campground代做,Database代做,Carletonhelp,COMP2404ABhelp,Introduction to Software Engineeringhelp,C++help,CRUDhelp,Campgroundhelp,Databasehelp,Carleton作业代写,COMP2404AB作业代写,Introduction to Software Engineering作业代写,C++作业代写,CRUD作业代写,Campground作业代写,Database作业代写,Carleton编程代写,COMP2404AB编程代写,Introduction to Software Engineering编程代写,C++编程代写,CRUD编程代写,Campground编程代写,Database编程代写,Carleton作业答案,COMP2404AB作业答案,Introduction to Software Engineering作业答案,C++作业答案,CRUD作业答案,Campground作业答案,Database作业答案,