Create an array of slip objects

Assignment Help C/C++ Programming
Reference no: EM13915101

Note that each customer should own one boat (i.e. the ID number of the boat they own in the Customer instance should be associated with a valid boat identification number in the Boat instance). Also note that each customer will rent one slip (i.e. their slip rental number in the Customer instance should be associated with a valid slip identification number in the Slip instance). You may want to make sure the size of the boat will fit in the size of the slip; that will become an issue as this project progresses.

- Assumption: each customer will only be owner of one boat and will only rent one slip.

- As mentioned, in a production program you would need robust error checking and user input validation, to provide your user with a complete menu system, and to make sure that there were no conditions in which your program would end unexpectedly (i.e. you would want to catch and handle all error conditions). However, this program is a prototype of various tasks, not a production program. At this point I do not expect advanced error checking, complicated menus, etc.; just carry out the tasks asked of you, based on the requirements of the program.

- You are expected to follow the "General Directions" found in the "Course Project Instructions" link on our course page.

(1) Create Classes for each of the object types that need to be stored, as indicated above. (See Note in Programming Notes below.)

(2) Create an array of Customer objects. You should populate the array with 4 to 6 customers, entering information into all fields of the Customer object. Again they should be created in "non-alphabetical" and "non-numeric" order as far concerns their last name and customer ID. . (Again, see Note #3 in Programming Notes below to understand how to populate Objects with data.)

· Display the total number of customers that exist.
· Print Customer information about each customer. You can either print all information (fields), or print customer ID, last name, first name, boat number, and slip number (excluding address and phone number).(See Notes #4 and #5 in Programming Notes below.)

(3) Create an array of Boat objects. You should populate the array with as many boats as you have customers (since we assume one boat per customer), entering information into all fields of the Boat object. (The boat numbers in the Customer and Boat objects should match.)
· Present the "total" value of all boats moored at HVM as a sum (in dollar amount, formatted properly).

(4) Create an array of Slip objects. You should populate the array with 10 slips, entering information into all fields of the Slip object. (Make sure that all customers have a valid slip number in their information, and mark that slip as rented.)

· Display the total number of slips that exist.
· Print out all information for the slips that are currently rented (only).

Programming Notes:

1. Even though you will be submitting four separate .cs files (one for each class object and one "driver/test" program), it is suggested that you create them all as one Visual Studio Project, if that is what you are using for your C# programming.

2. See this diagram of the objects in this project and their relationships: U3-Object-Diagram.png. However, please note that in this example we are *not* doing a relational database query (like an SQL statement) as we would if this were a true database implementation. We have not yet learned the features of C# (such as LINQ) that will allow us to easily do this. Therefore, in this assignment, do not try to tie together the Boat_Number or SlipID in the Customer object, with the Boat_Number or SlipID in the Boat and Slip objects.

3. See the discussion on pages 269 through 274 to understand how Constructors are used to populate Objects with data. Also see "Create-Populate-Class-Object.txt", which is a file containing two separate .cs files, showing an example of how to create and populate a class object without creating getters/setters for each element; this is not real clear in chapter 7 of your textbook.

4. For printing elements of an object (or an entire object), you can either print the elements in the process shown on page 289, or you could override the ToString (as shown in Chapter 8).

5. In order to access elements of an object individually, you will need to assign "getters" and "setters", and set their protection levels properly. Consider using the auto-implemented property as explained on pp. 256-259.

Deliverables:

· A Customer Class file.
· A Boat Class file
· A Slip Class file.
· A C# test program that carries out the processes indicated above.

Reference no: EM13915101

Questions Cloud

Compare and contrast firewire 800 vs esata : Compare and contrast FireWire 800 vs eSATA
Compute income before income taxes under the lifo method : Compute income before income taxes under each of the following inventory cost flow assumptions: (a) the average-cost method, (b) the FIFO method, and (c) the LIFO method.
Prepare on a mass basis : 1. ________ is the ability of a company to prepare on a mass basis individually designed products, services, programs, and communications.
Define the regression equation : The Tons of Fun Hobby Company general manager knows she can use sales and payroll data to do an estimated regression equation and forecast sales for next year. Define the regression equation she is able to deduce from the table, and calculate her ..
Create an array of slip objects : Create an array of Slip objects. You should populate the array with 10 slips, entering information into all fields of the Slip object. (Make sure that all customers have a valid slip number in their information, and mark that slip as rented.)
Construct a scatter plot with calories on the x axis : The file VeggieBurger contains data on the calories and total fat (in grams per serving) for a sample of 12 veggie burgers. Construct a scatter plot with calories on the X axis and total fat on the Y axis.
Requirement analysis process- overcome these difficulties : The requirement analysis process is so difficult because this is the beginning of the process. Oftentimes, this step becomes a mess because the person may not understand the requirements. Or better yet does not have a plan, just image if a company..
Prepare schedule that estimates the amount of inventory lost : Prepare a schedule that estimates the amount of the inventory lost in the fire. What are some other reasons management might need to estimate the amount of inventory?
Term paper crowdsourcing : Crowdsourcing in the field of interface design takes tasks traditionally performed by specific individuals and spreads them out among a group of people or a community. These assignments are usually done through an open call. Crowdsourcing has beco..

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Compute the average of each row

Write a program that prompts the user to enter 15 double numbers from the keyboard and save them into a 3 by 5 array in the main ( ). Then call a user-define function to compute the average of each row and print the original matrix and average of ..

  Write cpp program that processes the data of retail company

Write a C++ program that processes the data of a retail company with following requirements: Define a new data type (struct) ofCustomer, with following members

  Write a hexadecimal integer literal

Write a hexadecimal integer literal representing the value fifteen.

  Write a function named sum-from-to that takes two integer

Write a function named "sum_from_to" that takes two integer arguments, call them "first" and "last", and returns as its value the sum of all the integers between first and last inclusive.

  Write a program to calculate a person''s net pay

Write a program to calculate a person's net pay after subtracting federal income tax.The program should ask the user to enter the person's name, social security number, gross pay, and the number of dependents.

  Write a program to find the middle element in a linked list

1. Write a program to check if there is a loop in a linked list. Create a loop in a linked list and use your method 'isLoop' to identify that the loop exists. The method isLoop should return a Boolean type.2.

  You will implement a simplified version of the set class

you will implement a simplified version of the set class. you must implement all functions defined in the provided file

  Computers have trended to larger word

Since the beginning, computers have trended to larger word sizes, 8 to 16 to 32 and now some 64 bit computers. Explain a pro or a con in a computer with a larger word size, or comment on someone else's pro or con.

  1 what is the output of the following c programsnbspinclude

1. what is the output of the following c programs?nbspinclude ltiostreamgtusing namespace stdint mainnbspnbspnbsp cout

  Determining the total number of employees

Write a computer program to print a report with employee name and total salary for those employees whose total salary is more than 10,000. Total Salary = BASIC + HRA. At the end, the program should also print the total number of employees whose to..

  What are a class and a structure?

What are a class and a structure?

  Write a class player that contains attributes for the player

Write a class player that contains attributes for the players name,average and team.write three functions to input change and display these attributes. also write a constructor that ask for input to initialize all the attributes.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd