Find Jobs
Hire Freelancers

C++ Object Oriented Programming

$10-30 USD

已关闭
已发布大约 9 年前

$10-30 USD

货到付款
Please create the pseudocode, and then code, debug, and create the submittal files for following problem: Design an inventory class that can hold information and calculate data for prints created and sold by the large format photography dude (see Lesson 11 Assignment. All the variables will be private and all the member functions will be public. Variable Name: Description (all are private) imageNumber an int that holds the item's image number imageName a string that holds the image name (up to 50 characters) filmType a string that holds the film type used (string - up to 10 characters) numberPrints an int that holds the number of prints created pricePrints a double that holds the sales price of each print printsSold an int that holds the number of prints sold to date totalIncome a double that holds the total income (calculated as pricePrints * printsSold) Member Functions Description (all are public) Default Constructor sets all the member variables to 0 or to " " Constructor #2 accepts a print's imageNumber, imageName, filmType, numberPrints, pricePrints, printsSold. The function should copy these values to the appropriate variables and then calls the setTotalIncome function. setImageNumber accepts an integer argument that is copied to the imageNumber variable - validate for >0 setImageName accepts a string argument that is copied to the imageName variable - validate for not empty setFilmType accepts a string argument that is copied to the filmType variable - validate for not empty setNumberPrints accepts an integer argument that is copied to the numberPrints variable - validate for >=0 setPricePrints accepts a double argument that is copied to the pricePrints variable - validate for >0 setPrintsSold accepts an int argument that is copied to the printsSold variable - validate for >= 0 setTotalIncome calculates the total income made from sales (pricePrints * printsSold) getImageNumber returns the value in imageNumber variable getImageName returns the value in imageName variable getFilmType returns the value in filmType variable getNumberPrints returns the value in numberPrints variable getPricePrints returns the value in pricePrints variable getPrintsSold returns the value in printsSold variable getTotalIncome returns the value in totalIncome variable *** The mutator functions should have an additional layer of validation protection as described in the list above. Creating this bottom-level layer of protection does not negate the need to validate the user input in whatever function calls the mutator function. Make sure to review page 744, "contents of [login to view URL](Version 2)" for an example of exit_failure. Remember, your data is protected by it's member functions. You can't trust anybody! -------- Demonstrate the class in main() as follows: 1. create an array of 3 print objects 2. use member constructor functions to initalize the objects 3. get user input, validate the user input (the way we did last for the assignment for chapter 11) and then set the variables (using the mutator functions). 4. display the data (using the accessor functions). As usual, make your display look good. This should be pretty easy by now, right? Submit to me the following files and URL**note that the pdf has changed in scope. For this assignment, no pseudocode, but I've added other things. 1. [login to view URL] 2. inventory.h 3. [login to view URL] 4. PDF containing a UML diagram ---------------- I already started some of it, I need it done ASAP
项目 ID: 7318774

关于此项目

远程项目
活跃9 年前

想赚点钱吗?

在Freelancer上竞价的好处

设定您的预算和时间范围
为您的工作获得报酬
简要概述您的提案
免费注册和竞标工作

关于客户

UNITED STATES的国旗
United States
0.0
0
会员自3月 16, 2015起

客户认证

谢谢!我们已通过电子邮件向您发送了索取免费积分的链接。
发送电子邮件时出现问题。请再试一次。
已注册用户 发布工作总数
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
加载预览
授予地理位置权限。
您的登录会话已过期而且您已经登出,请再次登录。