Find Jobs
Hire Freelancers

C++ Object Oriented Programming

$10-30 USD

Ditutup
Dibuat sekitar 9 tahun yang lalu

$10-30 USD

Dibayar ketika dikirim
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 Proyek: 7318774

Tentang proyek

Proyek remot
Aktif 9 tahun yang lalu

Ingin menghasilkan uang?

Keuntungan menawar di Freelancer

Tentukan anggaran dan garis waktu Anda
Dapatkan bayaran atas pekerjaan Anda
Uraikan proposal Anda
Gratis mendaftar dan menawar pekerjaan

Tentang klien

Bendera UNITED STATES
United States
0,0
0
Anggota sejak Mar 16, 2015

Verifikasi Klien

Terima kasih! Kami telah mengirim Anda email untuk mengklaim kredit gratis Anda.
Anda sesuatu yang salah saat mengirimkan Anda email. Silakan coba lagi.
Pengguna Terdaftar Total Pekerjaan Terpasang
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Memuat pratinjau
Izin diberikan untuk Geolokasi.
Sesi login Anda telah kedaluwarsa dan Anda sudah keluar. Silakan login kembali.