-
May 7th, 2017, 10:07 PM
#1
c++ code snippet requiring conversion to java
I have a need for someone to translate this language to java that way I can use the example to apply what I have learned to the rest of the code. I have almost 2000 line of codes. This logic I think I should get help with changing into java. I am using eclipse neon for java and code::blocks 13.12 for c++ Thanks.
Code:
void RiskScore::setNumDevices(double numDevices_sum)
{
numDevices = numDevices_sum;
bool r_int = false;
cout<<"\n(2)Enter the number of devices affected or damaged:";
while (!(cin>>numDevices_sum))
{
cin.clear();
cin.ignore(numeric_limits<streamsize>::max(),'\n');
cout <<"Please enter whole numbers; no decimal numbers e.g 0 or 1 or 2 or 10 or 11 etc: " << endl;
}
while (!r_int)
{
if (numDevices_sum>=1.0)
{
r_int = true;
numDevices = numDevices_sum;
cout<<"\nThe number of devices here are"<<" "<< numDevices_sum<<endl;
}
else if(numDevices_sum==0.0)
{
r_int = true;
numDevices=numDevices_sum;
cout<<"The number of devices are"<<" "<<numDevices_sum<<endl;
}
else
{
cout <<"\nMust re-enter a whole number to continue.\n";
cin>>numDevices_sum;
cout << "\n thank you!\n " << endl;
}
}
}
double RiskScore::getNumDevices()
{
return numDevices;
}
-
May 9th, 2017, 01:35 AM
#2
Re: c++ code snippet requiring conversion to java
Originally Posted by lokdon
I have almost 2000 line of codes.
Why not try a C++ to Java converter,
https://www.tangiblesoftwaresolution...r_details.html
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|