Find Jobs
Hire Freelancers

A practical assignment - Reading, displaying,adding & subtracting binary numbers

$30-40 USD

Completed
Posted about 21 years ago

$30-40 USD

Paid on delivery
Hi, I am a student, and I desperately seek help with the following program. Write a complete C++ program that will enable you to read, display, add up and subtract binary numbers. The program file should contain a class Binary that stores a binary number as a character string. (consisting of digits 0 and 1) You will need one or more constructors as well as member functions to set a number (assign it to private member), get a number, and add a number to the one stored as a private variable. Functions consisting of one line, should be inline. Use initializer lists, explicit constructors and constant member functions if required. Test your program by entering two binary numbers from the keyboard, adding them, subtracting them and displaying the answer. Adding and subtracting should take place digit by digit. Use functions of the string class to accomplish this. Your function should be able to accommodate number strings of different lengths. Also add the following: · Add functions to overload the += , -=, - and + operators to accomplish the required addition and subtraction. (An answer may be negative after subtracting) · Overload operators << and >> in order to read a binary string from the keyboard and write it to the screen. These functions should be friends of the class. · Add code to the input functions to check the validity of the input strings. A binary number consists of digits 0 and 1. An error message should result if invalid characters are included. Prompt the user to reenter the string until it is correct. Save program as one file ([login to view URL] or [login to view URL]) ## Deliverables 1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. ## Platform Windows 2000,in all 3.0+ versions of Internet Explorer and Netscape". Actually It just needs to be able to compile through C++ compilers.
Project ID: 2910018

About the project

11 proposals
Remote project
Active 21 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
See private message.
$7 USD in 14 days
3.9 (24 reviews)
2.8
2.8
11 freelancers are bidding on average $20 USD for this job
User Avatar
See private message.
$29.75 USD in 14 days
4.5 (144 reviews)
6.0
6.0
User Avatar
See private message.
$17 USD in 14 days
4.9 (138 reviews)
5.6
5.6
User Avatar
See private message.
$25.50 USD in 14 days
4.8 (34 reviews)
4.4
4.4
User Avatar
See private message.
$11.05 USD in 14 days
4.2 (111 reviews)
4.4
4.4
User Avatar
See private message.
$34 USD in 14 days
5.0 (17 reviews)
4.0
4.0
User Avatar
See private message.
$21.25 USD in 14 days
5.0 (17 reviews)
3.8
3.8
User Avatar
See private message.
$22.10 USD in 14 days
4.9 (23 reviews)
3.5
3.5
User Avatar
See private message.
$29.75 USD in 14 days
5.0 (7 reviews)
2.8
2.8
User Avatar
See private message.
$11.05 USD in 14 days
5.0 (5 reviews)
2.7
2.7
User Avatar
See private message.
$11.05 USD in 14 days
0.0 (2 reviews)
0.0
0.0

About the client

Flag of SOUTH AFRICA
South Africa
4.9
32
Member since Feb 24, 2003

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.