How JustAnswer Works:

  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.

Ask LogicPro Your Own Question

LogicPro
LogicPro, Engineer
Category: Homework
Satisfied Customers: 9341
Experience:  Expert in Java C++ C C# VB Javascript Design SQL HTML
Type Your Homework Question Here...
LogicPro is online now
A new question is answered every 9 seconds

Exercise P1.1. Write a program that prints the message, “Hello,

Resolved Question:

Exercise P1.1. Write a program that prints the message, “Hello, my name is Hal!”
Then, on a new line, the program should print the message “What would you like
me to do?” Then it’s the user’s turn to type in an input. You haven’t yet learned how
to do it—just use the following lines of code:
string user_input;
getline(cin, user_input);
Finally, the program should ignore the user input and print the message “I am sorry,
I cannot do that.”
This program uses the string data type. To access this feature, you must place the
line
#include
before the main function.

Here is a typical program run. The user input is printed in boldface.
Hello, my name is Hal!
What would you like me to do?
Clean up my room
I am sorry, I cannot do that.
When running the program, remember to hit the Enter key after typing the last
word of the input line.


P1.3. Write a program that computes the sum of the first ten positive integers,
1 + 2 + … + 10. Hint: Write a program of the form
int main()
{
cout <<
return 0;
}




Exercise P2.3. Write a program that prompts the user for two integers and then
prints
• The sum
• The difference
• The product
• The average
• The distance (absolute value of the difference)
• The maximum (the larger of the two)
• The minimum (the smaller of the two)
Hint: The max and min functions are defined in the algorithm header.



Exercise P2.30. Your boss, Juliet Jones, is getting married and decides to change her
name. Complete the following program so that you can type in the new name for
the boss:
int main()
{
Employee boss("XXXXX, XXXXXt", 45000.00);
// Your code goes here; leave the code above and below unchanged

cout << "Name: " << boss.get_name() << "\n";
cout << "Salary: " << boss.get_salary() << "\n";
return 0;
}
The problem is that there is no set_name member function for the Employee class.
Hint: Make a new object of type Employee with the new name and the same salary.
Then assign the new object to boss.



Exercise P3.3. Write a program that reads in three floating-point numbers and prints
the largest of the three inputs. For example:
Please enter three numbers: 4 9 2.5
The largest number is XXXXX



Exercise P3.16. Write a program that first asks the user to type in today’s exchange
rate between U.S. dollars and Japanese yen, then reads U.S. dollar values and converts
each to Japanese yen. Use 0 as the sentinel value to denote the end of dollar
inputs. Then the program reads a sequence of yen amounts and converts them to
dollars. The second sequence is terminated by the end of the input file.



Exercise P4.2. Write a procedure void sort2(int& a, int& b) that swaps the values
of a and b if a is greater than b and otherwise leaves a and b unchanged. For example,
int u = 2;
int v = 3;
int w = 4;
int x = 1;
sort2(u, v); // u is still 2, v is still 3
sort2(w, x); // w is now 1, x is now 4


Exercise P4.8. Write a function
double get_double(string prompt)
that displays the prompt string, followed by a space, reads a floating-point number
in, and returns it. (In other words, write a console version of cwin.get_double.)
Here is a typical usage:
salary = get_double("Please enter your salary:");
perc_raise =
get_double("What percentage raise would you like?");
If there is an input error, abort the program by calling exit(1). (You will see in
Chapter 5 how to improve this behavior.)


Exercise P4.15. Consider the following buggy function:
Employee read_employee()
{
cout << "Please enter the name: ";
string name;
getline(cin, name);
cout <> salary;
Employee r(name, salary);
return r;
}
When you call this function once, it works fine. When you call it again in the same
program, it won’t return the second employee record correctly. Write a test harness
that verifies the problem. Then step through the function. Inspect the contents of
the string name and the Employee object r after the second call. What values do you
get?


Exercise P5.1. Implement all member functions of the following class:
class Person
{
public:
Person();
Person(string pname, int page);
void get_name() const;
void get_age() const;
private:
string name;
int age; // 0 if unknown
};
Submitted: 9 months ago.
Category: Homework
Expert:  LogicPro replied 9 months ago.
Hi,
Welcome here.
My name is XXXXX XXXXX X will help you.
What is the deadline?
Customer: replied 9 months ago.

Hey logicpro ,


deadline is going to be 12th october 8 am. Therefore you would have about 2 days to work on it. If you need I have some answers for these questions. Not all of them a re correct.


Thanks

Expert:  LogicPro replied 9 months ago.
If you have any file(s), Zip all files; upload the zipped file to http://wikisend.com or http://ge.tt and post download link here.
Customer: replied 9 months ago.

http://wikisend.com/download/406494/documents-export-2013-10-10.zip


 


They all might not be right..please kindly make sure you give me the right answers. I am sure you would just making it more obvious.

Expert:  LogicPro replied 9 months ago.
ok, I will review these and reply you ASAP.
Customer: replied 9 months ago.

ok.

Expert:  LogicPro replied 9 months ago.
ok, please check back in 24 hours.
Customer: replied 9 months ago.

i will, thanks.

Expert:  LogicPro replied 9 months ago.
Welcome
Expert:  LogicPro replied 9 months ago.
Download this zip file C++ 10 Programs.zip
Unzip to get all the answers.

You can ask me again using "For LogicPro only" at the start of your questions like other customers to get instant answers.
It will ensure that question is for me.
Please bookmark my profile page:
http://www.justanswer.com/computer/expert-logicpro/
so you can come back and ask me a question anytime.

Remember, if you need anything else, we can continue the conversation until you’re satisfied and rate my answer as excellent. I can address follow up questions at no extra charge and I’m always here to help.
Thank you for using this site!
LogicPro, Engineer
Category: Homework
Satisfied Customers: 9341
Experience: Expert in Java C++ C C# VB Javascript Design SQL HTML
LogicPro and 2 other Homework Specialists are ready to help you
Customer: replied 9 months ago.

I was trying to post new question and say "-to logic pro" but when I click "answer my question"it shows me a message "Access denied on this server" message. It is very annoying. I have these questions for which I would need .java files. If you could do the 1st 10 questions by sunday and the rest by wednesday-thursday than I could give your about another set of 70$ through "add bonus" button.


Let me know asap.------------------------>


 


 

Customer: replied 9 months ago.

It not letting me post any questions. I can post normal replies but when I copy-paste question it gives me the same error... I am posting the download link for the questions on notepad. http://wikisend.com/download/523854/java II lab questions.txt


 


Hope this works.

Expert:  LogicPro replied 9 months ago.
If you are having problems in posting a new question, I will provide you answer here.
Customer: replied 9 months ago.

yes please that would perfect, So I see these questions have been asked before to you by someone else..so is it possible you would somehow have the answers in your stored files and could give me the answers asap? like I need the 1st 4 honestly by sunday if by chance you dont have the answers already.

Expert:  LogicPro replied 9 months ago.
I will review these and reply you ASAP.
Expert:  LogicPro replied 9 months ago.
Do you need answers for all of these questions?
Customer: replied 9 months ago.

yes.

Expert:  LogicPro replied 9 months ago.
There are total 28 questions, some of which are very complicated.
Customer: replied 9 months ago.

i understand that, so can you do it or what else would you recommend?

Expert:  LogicPro replied 9 months ago.

These are a lot and will take time. I am sending an email indicating new and fair price for this question. You may increase the price of the question. Please check inbox/spam/junk folder of the email address registered with JustAnswer and let me know.

Customer: replied 9 months ago.

I gave you 50$ worth of bonus by now. once i get the answers I could give you 50 more. Let me know if you desire certain changes.

Expert:  LogicPro replied 9 months ago.
Thank you but still it would not be as per the underpriced report.
Customer: replied 9 months ago.

how much are desiring for these questions?

Expert:  LogicPro replied 9 months ago.
Have you checked the email?
Customer: replied 9 months ago.

ok I agree. When I click on the link the same page opens up as when I clickon "reply to expert" tab...I dont realise how do I edit the price so I clicked on "add bonus" buttonand gave you extra 50..that makes it 110. What do you want me to do now?

Expert:  LogicPro replied 9 months ago.
I have asked this price only for the Java questions since these are very complicated. If you are not able to edit the price you can add rest of the amount as bonus once I provide you answer.
Please let me know.
Customer: replied 9 months ago.

I will surely add bonus for 190 $ one I get the answers. :)

Customer: replied 9 months ago.

or actually 250$ sorry my bad.

Expert:  LogicPro replied 9 months ago.
Thank you. I will provide you answer ASAP.
Customer: replied 9 months ago.

appreciated

Expert:  LogicPro replied 9 months ago.
thank you.
Customer: replied 9 months ago.

are you going to be done by today or tommorow?!

Expert:  LogicPro replied 9 months ago.
Please check back in 15-16 hours for first 4 answers.
Expert:  LogicPro replied 9 months ago.
Here are first 4 answers:
http://wikisend.com/download/508912/FirstFour.zip
You will have to rate again in order to leave bonus
LogicPro, Engineer
Category: Homework
Satisfied Customers: 9341
Experience: Expert in Java C++ C C# VB Javascript Design SQL HTML
LogicPro and 2 other Homework Specialists are ready to help you
Customer: replied 9 months ago.

I will be waiting for other questions's answers to give you the rest the of the balance.

Expert:  LogicPro replied 9 months ago.
Ok :)
Customer: replied 9 months ago.

Hey logic pro,


I just notices this "NOTICE" while about to submit files, "


Please use the following main test files to test your classes. Submit the screenshots with the results from these test files.


Need not submit the given test files. "


This is the download link for the tester file.


http://wikisend.com/download/479400/Student Java Lab Test File(1) (1).zip


 


I am pasting further instructions from my Prof. to undertand:


" Please use my test files to produce the output and make a screenshot of them for grading. You need not submit the given main() test files. For grading purpose, I only need two files: Java class you designed in .java extension and screenshot of the ouput from the given test files in .docx extension, You are required to create source codes in .java extension format based on the assignment requirements, then compile and test the outcome. You should submit each lab assignment with two files: a .java file of your program design (source code) and a screenshot of its successful program execution output in Word format (.docx). Each source program should have a program header which includes your name, the number of lab assignment, program name, program description, and date of completion. Each source program should have embedded code documentations for code blocks and functions, Please refer the sample source code and sample screenshots under Additional Resources at Student Center."


 


I am also pasting the link to screenshot and pasting sample code below.


 



// Name: JohnDoe


// Assignment: Lab 1


// Program: Using an Array


// Description: The program uses an array to sum up all the values stored in the array. The program will display the sum


// Date of Complete: July 1, 2013


package UsingAnArray;


//Total the values of the elements of an array.


 


import javax.swing.*;


public class


SumArray { public static void main( String args[] ) { // Declare and array and assign values int array[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; int total = 0; // add each element's value to total for ( int counter = 0; counter < array.length; counter++ ) total += array[ counter ]; // Display the total value JOptionPane.showMessageDialog( null, "Total of array elements: " + total, "Sum the Elements of an Array", JOptionPane.INFORMATION_MESSAGE ); System.exit( 0 ); } // end main } // end class SumArray


 


The download link to screenshot: http://wikisend.com/download/515090/Sample Output of a Successful Execution (1).docx


 


My name isXXXXX and you the lab number as it says next to each question. I hope you could do the necessary changes for the 1st 4 labs and resend me the link today itself asap.


Thanks

Expert:  LogicPro replied 9 months ago.
I will review and reply
Customer: replied 9 months ago.

waiting.

Expert:  LogicPro replied 9 months ago.
ok. I will put header. You can fill all information. Please wait
Customer: replied 9 months ago.

sure also make sure that you provide me with successful screenshots for the codes as well on .docx file like the word document.

Expert:  LogicPro replied 9 months ago.
ok. Please wait
Customer: replied 9 months ago.

no problem.

Expert:  LogicPro replied 9 months ago.
There is no tester java file for 14.10 (fourth)
Customer: replied 9 months ago.

actually that was my bad. I am sorry the p14.10 is actually


 


P14.13 Sort an array list of strings by increasing length. Hint: Supply a Comparator.


 


so this is the question for which you would have to code and test.


 


I am so sorry I just realised that the question number was wrong that I noted from book. UHH :( I could wait for few more hours I guess.

Customer: replied 9 months ago.

rest I checked all of the questions that I provided you with and everything else is correct.

Expert:  LogicPro replied 9 months ago.
Download:

http://www.wikisend.com/download/323222/FirstFour.zip
LogicPro, Engineer
Category: Homework
Satisfied Customers: 9341
Experience: Expert in Java C++ C C# VB Javascript Design SQL HTML
LogicPro and 2 other Homework Specialists are ready to help you
Customer: replied 9 months ago.

I would need the rest of the codes by this friday please, Its your call If you would like submit them all at once or upload different files till you submit 100%. Thanks

Expert:  LogicPro replied 9 months ago.
ok
Expert:  LogicPro replied 9 months ago.
Hi again,
Just following up with you to see how everything is going and if you have more questions for me.
You can ask me again using "For LogicPro only" at the start of your questions like you do to get instant answers.
It will ensure that question is for me.
Please bookmark my profile page:
http://www.justanswer.com/homework/expert-logicpro/
so you can come back and ask me a question anytime.
If you need any additional information on this answer, please don't hesitate to ask by clicking on 'Reply to Expert', and I will reply as soon as possible.
I hope you found the information in my answer helpful, and if so, please let me know, here. Thank you!
Thanks very much for using Just Answer!
Best wishes
LogicPro
Customer: replied 9 months ago.

Hello,


This is just a friendly reminder that I am expecting answers to the rest of the left questions by late Friday or early Saturday morning. Please do not disappoint me or make me inquire multiple times regarding my answers.


I expect a on time answers policy from you.


Thanks

Expert:  LogicPro replied 9 months ago.
ok, I will try my best.
Expert:  LogicPro replied 9 months ago.
Please provide WebGet.java for P21.1
It says:
Modify the WebGet program to print only the HTTP header of the returned HTML
page.
Customer: replied 9 months ago.

The link is for notrpad file where I have copy-pasted stuff from the book which describes information about webget.


 


http://wikisend.com/download/493110/logicpro.txt


 


Since justanswer in not allowing me to paste anything.

Expert:  LogicPro replied 9 months ago.
Thanks Karan.
Also, I checked. I won;t be able to do following 5:
P21.9
P22.7
P22.10
P23.7
P24.6

Please let me know
Customer: replied 9 months ago.

no problem, please update me with the rest of the answers for java. Since you wont be able to answer 5 question, I was wondering if you could answer the questions for c++ which I see you have been asked before. The text file iam uploading has question pool. You have already done till P5.1, therefore You have to start from P5.2 till end. I have no problem if you take 1-2 days since I am assuming you have the answers for them already.


I yes, let me know I will pay you extra with the rest of the balance. If not I'll post it to some other expert.


 


 


http://wikisend.com/download/367934/lab questions ofr c++1.txt

Expert:  LogicPro replied 9 months ago.
Thanks karan. I will check and reply
Customer: replied 9 months ago.

Hello, I am still waiting for java labs and your decision for c++ labs.

Expert:  LogicPro replied 9 months ago.
Check back in 1 hour
Expert:  LogicPro replied 9 months ago.
karan,
I can provide here rest of the java programs here and you can leave agrred bonus.
For cpp questions, you can create a new thread using "For Logicpro only" I will let you know the price there.
Let me know I have the java answers ready
Customer: replied 9 months ago.

The deal was for "ALL" the java programs and you are expecting me to pay you the full 250$ remaining? WHat do you mean by "I can provide here rest of the java programs here", I MENTIONED THAT TODAY IS THE DEADLINE !! and said that by saturday you will provide me with answers!!


I gave you one week to provide me with answers the very morning, not keep me pending the whole freaking night.


You SHOULD have provided me with answers first and than left this comment of yours regarding .cpp files.


Give me the codes for java and dont worry about .cpp codes as I would prefer finding a honest and punctual expert.


 

Expert:  LogicPro replied 9 months ago.
Karan,
No worries. You can pay what you want. I never said to pay full amount.
I am always punctual in giving answers.
I was waiting for you to come online.
Download answer from here:
http://wikisend.com/download/184194/18Progs.zip
Customer: replied 9 months ago.

Logicpro,


 


Just the way i explained you for the 1st four questions you gave me the answers for, like wise I would need a successful snapshot for each program and its .java file. (copy-pasted our earlier conversation/ requirement below)


 


 


Please use the following main test files to test your classes. Submit the screenshots with the results from these test files.


 


Need not submit the given test files. "


 


This is the download link for the tester file.


 


http://wikisend.com/download/479400/Student Java Lab Test File(1) (1).zip


 


 


 


I am pasting further instructions from my Prof. to undertand:


 


" Please use my test files to produce the output and make a screenshot of them for grading. You need not submit the given main() test files. For grading purpose, I only need two files: Java class you designed in .java extension and screenshot of the ouput from the given test files in .docx extension, You are required to create source codes in .java extension format based on the assignment requirements, then compile and test the outcome. You should submit each lab assignment with two files: a .java file of your program design (source code) and a screenshot of its successful program execution output in Word format (.docx). Each source program should have a program header which includes your name, the number of lab assignment, program name, program description, and date of completion. Each source program should have embedded code documentations for code blocks and functions, Please refer the sample source code and sample screenshots under Additional Resources at Student Center."


 


 


 


I am also pasting the link to screenshot and pasting sample code below.


 


 


 



// Name: JohnDoe


 


// Assignment: Lab 1


 


// Program: Using an Array


 


// Description: The program uses an array to sum up all the values stored in the array. The program will display the sum


 


// Date of Complete: July 1, 2013


 


package UsingAnArray;


 


//Total the values of the elements of an array.


 


 


 


import javax.swing.*;


 


public class


 


SumArray { public static void main( String args[] ) { // Declare and array and assign values int array[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; int total = 0; // add each element's value to total for ( int counter = 0; counter < array.length; counter++ ) total += array[ counter ]; // Display the total value JOptionPane.showMessageDialog( null, "Total of array elements: " + total, "Sum the Elements of an Array", JOptionPane.INFORMATION_MESSAGE ); System.exit( 0 ); } // end main } // end class SumArray


 


 


 


The download link to screenshot: http://wikisend.com/download/515090/Sample Output of a Successful Execution (1).docx


 


 


 


My name isXXXXX and you the lab number as it says next to each question. I hope you could do the necessary changes for the 1st 4 labs and resend me the link today itself asap.


 


Thanks


 


 

Expert:  LogicPro replied 9 months ago.
Karan,
All the required items are in folders you get after unzipping the file.
There are test files too. Let me know if you want me to delete them.
Customer: replied 9 months ago.

p15.1 and p15.14 dosent have the screenshots?! Surprised

Customer: replied 9 months ago.

neither does p16.6, p17.7,

Expert:  LogicPro replied 9 months ago.
THIS ANSWER IS LOCKED!
You can view this answer by clicking here to Register or Login and paying $3.
If you've already paid for this answer, simply Login.

JustAnswer in the News:

 
 
 
Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.
JustAnswer.com...has seen a spike since October in legal questions from readers about layoffs, unemployment and severance.
Web sites like justanswer.com/legal
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.
 
 
 

What Customers are Saying:

 
 
 
  • Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C. Freshfield, Liverpool, UK
< Last | Next >
  • Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C. Freshfield, Liverpool, UK
  • This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!! Alex Los Angeles, CA
  • Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult. GP Hesperia, CA
  • I couldn't be more satisfied! This is the site I will always come to when I need a second opinion. Justin Kernersville, NC
  • Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around. Esther Woodstock, NY
  • Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know. Robin Elkton, Maryland
  • He answered my question promptly and gave me accurate, detailed information. If all of your experts are half as good, you have a great thing going here. Diane Dallas, TX
 
 
 

Meet The Experts:

 
 
 
  • Manal Elkhoshkhany

    Tutor

    Satisfied Customers:

    4520
    More than 5000 online tutoring sessions.
< Last | Next >
  • http://ww2.justanswer.com/uploads/BU/BusinessTutor/2012-2-2_115741_Kouki2.64x64.jpg Manal Elkhoshkhany's Avatar

    Manal Elkhoshkhany

    Tutor

    Satisfied Customers:

    4520
    More than 5000 online tutoring sessions.
  • http://ww2.justanswer.com/uploads/LI/lindaus/2012-6-10_04811_IMG20120609164157.64x64.jpg Linda_us's Avatar

    Linda_us

    Finance, Accounts & Homework Tutor

    Satisfied Customers:

    3121
    Post Graduate Diploma in Management (MBA)
  • http://ww2.justanswer.com/uploads/ComputersGuru/2010-02-13_051118_Photo41.JPG LogicPro's Avatar

    LogicPro

    Engineer

    Satisfied Customers:

    3035
    Expert in Java C++ C C# VB Javascript Design SQL HTML
  • http://ww2.justanswer.com/uploads/lanis/2009-4-1_233717_phput9xef_c1pm.jpg Lani S.'s Avatar

    Lani S.

    Tutor

    Satisfied Customers:

    2457
    Registered Nurse, Internet Researcher, Private Tutor
  • http://ww2.justanswer.com/uploads/chooser77/2009-08-18_162025_Chris.jpg Chris M.'s Avatar

    Chris M.

    M.S.W. Social Work

    Satisfied Customers:

    2341
    Master's Degree, strong math and writing skills, experience in one-on-one tutoring (college English)
  • http://ww2.justanswer.com/uploads/JawaadAhmed/2009-6-27_12137_SIs_SHadi.jpg F. Naz's Avatar

    F. Naz

    Chartered Accountant

    Satisfied Customers:

    1975
    Experience with chartered accountancy
  • http://ww2.justanswer.com/uploads/JK/jkcpa/2011-1-16_182614_jkcpa.64x64.jpg Bizhelp's Avatar

    Bizhelp

    CPA

    Satisfied Customers:

    1873
    Bachelors Degree and CPA with Accounting work experience