Find Jobs
Hire Freelancers

C++ Beginner/Intermediate simple homework questions. DUE JUNE 30 11:59pm

$30-250 CAD

Completed
Posted almost 10 years ago

$30-250 CAD

Paid on delivery
Hi everyone! So I'm struggling to finish my course work for a beginners C++ course before midnight June 30th eastern north american time, there are a few questions which I can't figure out so I have resorted to your help :) Each question should be made in a separate .cpp file, because each is a separate program. The deadline to submit is June 30th at 11:59pm eastern north american time so I know it is short notice and that only leaves you with a day and a half at best to do these. Even if you can complete 90% of this that would be awsome! The questions are below: 1: Write a program that creates an array of 100 string objects. Fill the array by having your program open a (text) file, and read one line of the file into each string until you have filled the array. Display the array using the format âline #: <string>â, where # is the actual line number (you can use the array counter for this value), and <string> is the stored string. 2: Create a makefile for the above exercise that allows the user to type make for a production build of the program, and make debug for a build of the program that includes debugging information. 3: Write a program to manage DVD rental in a âvideoâ rental store. Create an abstract data type that represents a DVD in this store. Consider all the data and operations that may be necessary for the DVD type to work well within a rental management system. Include a print() member function that displays all the information about the DVD. Test your data type by creating an array of 10 DVD instances and filling them using information read from a test input file that you create. Display the DVD information. 4:Write a program in which you create a Hen class. Inside this class, nest a Nest class. Inside Nest, place an Egg class. Each class should have a display() member function. For each class, create a constructor and a destructor that prints an appropriate message when it is called. In main(), create an instance of each class using new, and call the display() function for each one. After calling display(), free the storage using delete. 5: Write a program in which you create a Text class that contains a string object to hold the text of a file. Give it two constructors: a default constructor, and a constructor that takes a string argument that is the name of the file to open. When the second constructor is used, open the file and read the contents of the file into the string member object. Add a member function contents() to return the string so that you can display it. In main(), open a file using Text, and display the contents. 6:Write a program in which you create a const whose value is determined at runtime by reading the time when the program starts (Hint: use the <ctime> standard header). In a separate function, have the program create two arrays of 10 000 doubles. Initialize the first array with sequential integral values starting with 100, and initialize the second array with the same numbers, but in reverse order (i.e., the first array would contain 100, 101, 102⦠while the second array contains 10099, 10098, 10097â¦). Loop through both arrays using a single loop, multiply the corresponding array elements from each array together, and display the result. Read the time when the program completes the multiplication, then compute and display the elapsed time. Do not use inline functions in this program. 7:Rewrite program #1 using an inline function to perform the calculation. In the test plan for this program (actual results section), compare the time required by this program to execute against the time required by the first (non-inline) program. 8:Create a simple class (DoStuff) containing an int, and overload the operator+ as a member function. Also, provide a print() member function that takes an ostream& as an argument and prints to that ostream&. Add a binary operator- and operator+ to the class as member functions. You should be able to use the objects in complex expressions such as a + b â c. Now add the operator++ and operator--, both prefix and postfix versions. Overload the << operator to provide the same functionality as the print() member function. Test the class to show that all requirements work correctly. 9:Write a program that creates a class hierarchy for simple geometry. Start with a Point class to hold x and y values of a point. Overload the << operator to print point values, and the + and â operators to add and subtract point coordinates (Hint: keep x and y separate in the calculation). Create a pure abstract base class Shape, which will form the basis of your shapes. The Shape class will contain abstract functions to calculate area and circumference of the shape, plus provide the coordinates (Points) of a rectangle that encloses the shape (a bounding box). These will be overloaded by the derived classes. Create a display() function that will display the name of the class, and all stored information about the class (including area, circumference, and bounding box). Build the hierarchy by creating the Shape classes Circle, Square, and Triangle. For these derived classes, create default constructors, and constructors whose arguments can initialize the shapes appropriately using the correct number of Point objects (i.e., Circle requires a Point center and a radius, Square requires four Point vertices, while Triangle requires three Point vertices). In main(), create one instance each of the following: Circle (10, -5) with a radius of 23; Square (5, -5)(-10,7)(4,23)(-6,12); and Triangle(0,0)(10,10)(-15,15). Display the information from each object. 10: Create an inheritance hierarchy of Rodent: Mouse, Gerbil, Hamster, etc. In the base class, provide methods that are common to all Rodents, and refine these in the derived classes to perform different behaviours depending on the specific type of Rodent. Rodent must be created as a pure abstract base class. Create an array of pointers (10) to Rodent, and fill it with different specific types of Rodents. Call your base class methods, and display the results. 11: Using the Standard C++ Library vector as an underlying implementation, create a Set template class that accepts only one of each type of object that you put into it. Make a nested iterator class that supports the âend sentinelâ concept in Unit 16. Write test code for your Set in main(), using both your Set template class and the Standard C++ Library set template to verify that the behaviour is correct.
Project ID: 6128843

About the project

6 proposals
Remote project
Active 10 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
Hi! I am professional C++ programmer. I can do this project with highest satisfaction. Best Regards, Szymszteinsl
$100 CAD in 1 day
4.9 (20 reviews)
6.0
6.0
6 freelancers are bidding on average $186 CAD for this job
User Avatar
hi mate this is Asad, i have a lot of experience in c++ programming,would surely help you out with this,cheers :)
$133 CAD in 1 day
5.0 (6 reviews)
3.1
3.1
User Avatar
Hi Vision Digital Solutions (VDSols) is a provider of custom web development, mobile app & digital marketing with expertise in PHP/ASP.NET, iOS/Android app, CMS, E-commerce, SEO/PPC, ROR, Portal, CMS, Drupal, Joomla, Magneto, SharePoint, C#, Social Networking Application. Catering result oriented & cost competitive solutions. Why Choose VDSols - Top IT Services provider with Skilled IT Experts -- Strong technology competency and its ongoing updates - Flexible engagement models with seamless communication - Competitive in cost while ZERO compromise in quality - Strive day in and out to meet client's Satisfaction VDSols has pool of 1. Web Developers 2. ASP.NET Developers 3. Codeigniter/PHP Developers 4. Apple/iPhone/Android App Developer 5. Website coder 6. Web Programmers 7. Zend/Cakephp Developer 8. Ruby on Rails Developers 9. Drupal Developers 10. Magento e-commerce Developers Services and solutions ~~~~~~~~~~~~~~~~~~~~~~~~ - Web Development Services - Custom Web Development - Web Application Development - Enterprise Portal Development - Open Source Development - E-commerce Solutions - CRM/CMS Solutions - Mobile Apps Development - iPhone Apps Development - Android Apps Development - iOS Apps Development - Search Engine Optimization (SEO) - Social Media Optimization (SMO) - Pay Per Click Services (PPC) - Reputation & Brand Management - Offshore Software Development - Software Outsourcing - Testing & QA Services Kindly give us a chance to show our talent. Regards
$210 CAD in 3 days
0.0 (0 reviews)
0.0
0.0
User Avatar
Hello, I have read through your project and I am incredibly interested in taking on your project. I am an experienced developer with a diploma in the field of web development. I have been working in the field of web development for roughly 7 years. I take great pride in my work and deliver only the best quality. My skill-set includes... -PHP -HTML5 -CSS -Responsive Design -Wordpress -Joomla I look forward to hearing from you and hopefully we will have the opportunity to work together. Thank you, Meagan S.
$315 CAD in 3 days
0.0 (0 reviews)
0.0
0.0
User Avatar
Propunerea nu a fost încă furnizată
$111 CAD in 1 day
0.0 (0 reviews)
0.0
0.0

About the client

Flag of CANADA
CALGARY, Canada
5.0
1
Payment method verified
Member since Jun 29, 2014

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.