首页 > > 详细

C++ operators 辅导讲解、C++讲解辅导、C++程序辅导讲解 辅导Web开发|辅导Python程序

Requirements
Write a class that represents a fraction number like 2/3.
Functions below have to be implemented for this class:
? default ctor
? ctor takes two integers as parameters
? copy ctor
? arithmetical operators: + - * /
? relational operators: < <= == != >= >
? type cast to double
? to string
? inserter and extractor for streams
? from a finite decimal string like: 1.414
Evaluation standard
1. c++ code quality (clean, compact and reasonable)
2. comments quality
Files to submit
Please prepare a .zip package including the following items:
1. the source code (including the Fraction class, and some typical usages for test)
2. makefile (for Mac or Linux users) or .exes (for Windows users) or CMakeLists.txt
联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!