CS- C/ C++ Program Design – Project 1 Solution

$30.00 $24.00

Please implement a calculator which can multiply two integers. Requirements: When you run the program as follows: $./mul Please input two integers 2 3 2*3=6 It will output 6. If you input two integers by the command line arguments, it can handle. $./mul 2 3 2*3=6 It will output 6. If you input some non-integer…

5/5 – (2 votes)

You’ll get a: zip file solution

 

Description

5/5 – (2 votes)

Please implement a calculator which can multiply two integers.

Requirements:

  1. When you run the program as follows: $./mul

Please input two integers 2 3

2*3=6

It will output 6.

  1. If you input two integers by the command line arguments, it can handle. $./mul 2 3

2*3=6

It will output 6.

  1. If you input some non-integer numbers, the program can tell the user that the input is

wrong.

./mul

Please input two integers

a 2

  1. If you input some big integers as follows

./mul

Please input two integers

1234567890 1234567890

What will happen? Please describe some possible solutions.

5. Some others which can improve the program.

Rules:

  1. Please submit your project report before its deadline. After the deadline (even 1 second), 0 score!

(For students who enroll in this course before Sep. 6, they should submit their project reports by 23:59 on Sep. 19. For the rest students they should submit their project reports in one week or by Sep. 19 (the later one) after they enroll in the course.)

  1. Please submit two separated files: report.pdf and source.cpp. Please do NOT put the two files into a compressed one.

  1. You score will also depend on the quality of your source code and your report. Your report should be easy to understand and describe your work well, especially the highlights of your work.

  1. Please pay more attention to your code style. After all this is not ACM-ICPC contest. You have enough time to write code with both correct result and good code style. You will get deduction if your code style is terrible. You can read Google C++ Style Guide (http://google.github.io/styleguide/cppguide.html ) or some other guide for code style.

CS- C/ C++ Program Design - Project 1 Solution
$30.00 $24.00