加勒比久久综合,国产精品伦一区二区,66精品视频在线观看,一区二区电影

合肥生活安徽新聞合肥交通合肥房產生活服務合肥教育合肥招聘合肥旅游文化藝術合肥美食合肥地圖合肥社保合肥醫院企業服務合肥法律

代寫CSCE 240 – Programming

時間:2024-03-06  來源:合肥網hfw.cc  作者:hfw.cc 我要糾錯


Due: 11:59pm on Monday, March 18

Purpose – Implement the following two classes

Class 1 – MonetaryUnit

Create a MonetaryUnit class that holds the name (a string), monetary symbol (a string) and the amount of the monetary unit that is equivalent to one US dollar (a double) as private data members.

The class must include the following public member functions:

A SetName function that has a string as its parameter and sets the name of the monetary unit to the string as long as the string isn’t empty (has a length of at least 1). The function should return true if the name is set to the function’s argument, and false otherwise.

A GetName function that returns a copy of the name of the monetary unit.

A SetSymbol function that takes a has as its parameter and sets the monetary symbol to the string as long as the string isn’t empty (has a length of at least 1). The function should return true if the symbol is set to the function’s argument, and false otherwise.

A GetSymbol function that returns a copy of the monetary unit’s symbol.

A SetAmountEquivalentTo1Dollar function that has a double as its parameter and sets the double data member equal to the function’s argument as long as the argument is positive. The function should return true if the data member is set to the function’s argument, and false otherwise.

A GetAmountEquivalentTo1Dollar function that returns a copy of the double data member.

A constructor that takes a string for the name, a string for the symbol, and a double for the amount equivalent to one dollar as parameters. The parameters should have default arguments of “US dollars”, “$”, and 1, respectively.

The class must include the following overloaded operator:

Overload the == operator to return true if two MonetaryUnit objects hold the same private data member values.

Review initial tests for the functionality of the class in the following files:

testMonetaryUnitName.cc, testMonetaryUnitSymbol.cc,

testMonetaryUnitAmountEquivalentTo1Dollar.cc, testMonetaryUnitConstructor.cc, and

testMonetaryUnitEquivalent.cc.

If you place all of the attached files in the same directory, you can run the initial tests with the commands

make testMonetaryUnitName

make testMonetaryUnitSymbol

make testMonetaryUnitAmountEquivalentTo1Dollar

make testMonetaryUnitConstructor

make testMonetaryUnitEquivalent

You are strongly encouraged to create more rigorous tests.

Class 2 – MonetaryAmount

Create a MonetaryAmount class that has a value (a double) and a monetary unit (a MonetaryUnit object) as data members.

The class must include the following public member functions:

A GetValue and GetUnit accessor functions that return copies of the MonetaryAmount’s value and MonetaryUnit data members, respectively.

A constructor that takes a double and a constant reference to a MonetaryUnit as parameters. The parameters should have default arguments of 0 and US dollars (MonetaryUnit(“US dollars”, “$”, 1)), respectively. The constructor should set up the new MonetaryAmount object with the parameters’ values.

A ConvertToUnit function that has a constant reference to a MonetaryUnit as its parameter. The function should update the value and the MonetaryUnit data members so that the object holds an equivalent monetary amount in the updated units. For example, assume that an object originally holds 3 US dollars, and that 0.92 Euros is equivalent to 1 US dollar. Converting the object to Euros should update the monetary unit of the object to Euros and it should update the value of the object to 2.76. See testMonetaryAmountConvertToUnit.cc for additional examples.

The class must include the following public static data member:

A public static boolean data member named display_unit_name that holds the value true if monetary amounts are to display with the value followed by a space and the monetary unit name (e.g. “3.25 US dollars”) and false if monetary amounts display with the monetary symbol followed by the numeric value (e.g. “$3.25”). Initialize the value of this data member to false.

This data member is used by the << operator and will be tested in

The class must include the following overloaded operators:

Overload the == operator to return true if two MonetaryAmount objects hold the equivalent amounts, and false if they do not. See testMonetaryAmountEquivalent.cc for examples.

Overload the < operator to return true if the MonetaryAmount object on the left of the operator represents a smaller monetary amount than the MonetaryAmount on the right, and false otherwise. See testMonetaryAmountLessThan.cc for examples.

Overload the > operator to return true if the MonetaryAmount oject on the left of the operator represents a larger monetary amount than the MonetaryAmount on the right, and false otherwise. See testMonetaryAmountGreaterThan.cc for examples.

Overload the << operator to output a MonetaryAmount object in the format specified by the static data member display_unit_name. See testMonetaryAmountCreateOutput.cc and expectedoutput.txt for example output statements and the output they should create.

Overload the + operator to take two MonetaryAmount objects as operands and returns a MonetaryAmount object holding the sum of the two objects in the units of the left operand. See testMonetaryAmountAddition.cc for examples.

Review initial tests for the functionality of the class in the following attached files: testMonetaryAmountConstructor.cc, testMonetaryAmountConvertToUnit.cc, testMonetaryAmountEquivalent.cc, testMonetaryAmountLessThan.cc, testMonetaryAmountGreaterThan.cc, testMonetaryAmountCreateOutput.cc, expectedoutput.txt, and testMonetaryAmountAddition.cc

If you place all of the attached files in the same directory, you can run the initial tests with the commands

make testMonetaryAmountConstructor

make testMonetaryAmountConvertToUnit

make testMonetaryAmountEquivalent

make testMonetaryAmountLessThan

make testMonetaryAmountGreaterThan

make testMonetaryAmountOutput

make testMonetaryAmountAddition

You are strongly encouraged to create more rigorous tests.

Specifications

- Add all code for the definition of the MonetaryUnit class in a header file named MonetaryUnit.h

- Include all of the necessary code for the MonetaryUnit class, including the implementations of the public member functions and the overloaded == operator, in a source file named MonetaryUnit.cc

- Add all code for the definition of the MonetaryAmount class in a header file named MonetaryAmount.h

- Include all of the necessary code for the MonetaryAmount class, including the implementations of the public member functions and operators, in a source file named MonetaryAmount.cc

- You will submit a zip file (only a zip file will be accepted) containing MonetaryUnit.h, MonetaryUnit.cc, MonetaryAmount.h and MonetaryAmount.cc to the assignment in Blackboard.

- Source files must compile and run on a computer of the instructor’s choosing in the Linux lab (see your course syllabus for additional details).

- Your programming assignment will be graded with modified versions of the test files

Grade Breakdown

Style MonetaryUnit.h: 0.25 points

Style MonetaryUnit.cc: 0.25 points

Style MonetaryAmount.h: 0.25 points

Style MonetaryAmount.cc: 0.25 points

Documentation: 1 point

Clean compilation of MonetaryUnit.cc: 0.5 points

Clean compilation of MonetaryAmount.cc: 0.5 points

Passes instructor’s modified testMonetaryUnitName.cc tests: 0.5 points

Passes instructor’s modified testMonetaryUnitSymbol.cc tests: 0.5 points

Passes instructor’s modified testMonetaryUnitAmountEquivalentTo1Dollar.cc tests:

0.5 points

Passes

instructor’s modified

testMonetaryUnitConstructor.cc tests: 0.5 points

Passes

instructor’s modified

testMonetaryUnitEquivalent.cc tests: 0.5 points

Passes

instructor’s modified

testMonetaryAmountConstructor.cc tests: 0.5 points

Passes

instructor’s modified

testMonetaryAmountConvertToUnit.cc tests: 1 point

Passes

instructor’s modified

testMonetaryAmountEquivalent.cc tests: 0.5 points

Passes

instructor’s modified

testMonetaryAmountLessThan.cc tests: 0.5 points

Passes

instructor’s modified

testMonetaryAmountGreaterThan.cc tests: 0.5 points

Passes instructor’s modified MonetaryAmount << operator tests: 1 point

Passes instructor’s modified testMonetaryAmountAddition.cc.cc tests: 0.5 point

The penalty for late program submissions is 10% per day, with no submission accepted after 3 days.

請加QQ:99515681  郵箱:99515681@qq.com   WX:codehelp 

掃一掃在手機打開當前頁
  • 上一篇:代寫MMME1027、代做Matlab語言程序
  • 下一篇:代做CSCI 241 Data Structures
  • 無相關信息
    合肥生活資訊

    合肥圖文信息
    2025年10月份更新拼多多改銷助手小象助手多多出評軟件
    2025年10月份更新拼多多改銷助手小象助手多
    有限元分析 CAE仿真分析服務-企業/產品研發/客戶要求/設計優化
    有限元分析 CAE仿真分析服務-企業/產品研發
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    出評 開團工具
    出評 開團工具
    挖掘機濾芯提升發動機性能
    挖掘機濾芯提升發動機性能
    海信羅馬假日洗衣機亮相AWE  復古美學與現代科技完美結合
    海信羅馬假日洗衣機亮相AWE 復古美學與現代
    合肥機場巴士4號線
    合肥機場巴士4號線
    合肥機場巴士3號線
    合肥機場巴士3號線
  • 短信驗證碼 目錄網 排行網

    關于我們 | 打賞支持 | 廣告服務 | 聯系我們 | 網站地圖 | 免責聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥網 版權所有
    ICP備06013414號-3 公安備 42010502001045

    免费久久99精品国产自在现线| 青青国产91久久久久久| 国产一级成人av| 亚洲人成毛片在线播放女女| 免费在线看成人av| 久久中文亚洲字幕| 婷婷综合成人| 麻豆精品视频在线| 日韩夫妻性生活xx| 99亚洲一区二区| 精品免费av| 国产精品日韩精品在线播放| 91av一区| 丁香六月综合| 国产亚洲激情| 亚洲一级网站| 国产一级成人av| 日韩不卡一区二区三区| 久久精品三级| 成人不卡视频| segui88久久综合9999| 红桃视频国产一区| 亚洲午夜极品| 久久天天综合| 韩国女主播一区二区三区| 国内精品久久久久久久久电影网| 亚洲国产高清一区二区三区| av资源中文在线| 亚洲少妇在线| 亚洲欧洲一区| 婷婷成人综合| 99久久久久国产精品| 国产成人tv| 日本免费一区二区三区视频| 欧美黄色精品| 麻豆视频观看网址久久| 久久精品国产亚洲一区二区三区| 亚洲十八**毛片| 中文字幕成在线观看| 国产精品传媒精东影业在线| 国产免费成人| 欧美日韩视频一区二区三区| 欧美+亚洲+精品+三区| 久久精品国内一区二区三区水蜜桃| 动漫av一区| 国产精品宾馆| 精品视频亚洲| 久久激情av| 99精品电影| 欧美日韩在线观看视频小说| 91精品啪在线观看国产18 | 亚洲网站三级| 亚洲男女网站| 国产精品一区免费在线| av在线成人| 国产精品手机在线播放 | 天堂av在线| 日本免费一区二区三区四区| 日韩欧美高清| 亚洲日本在线观看视频| 久久久久伊人| 一区二区三区毛片免费| 91成人小视频| 日韩成人一区二区三区在线观看| 精品99re| 欧美sss在线视频| 香蕉视频一区二区三区| 欧美天天在线| 免费日韩视频| 亚洲黄色免费看| 国产乱子精品一区二区在线观看| 国产日韩精品视频一区二区三区 | 久久久夜精品| 99国产精品99久久久久久粉嫩| 黄色国产精品| 黑人巨大精品| 亚久久调教视频| 粉嫩一区二区三区在线观看| 欧美日本成人| 久久三级视频| 免费日韩av片| 日本精品另类| 一区二区三区国产盗摄| 国产成人免费av一区二区午夜| 日韩成人av在线资源| 999久久久亚洲| 黄色综合网站| 日韩电影免费网址| 日本不卡视频在线| 日韩va欧美va亚洲va久久| 精品久久中文| 日韩中文字幕区一区有砖一区| 黄色亚洲网站| 综合久久伊人| 久久蜜桃资源一区二区老牛| 中文亚洲免费| 四虎国产精品免费久久| 成人在线视频区| 日本精品影院| 色综合色综合| 亚洲人体av| 欧美三级午夜理伦三级小说| 中日韩视频在线观看| 色狠狠一区二区三区| 亚洲午夜精品一区 二区 三区| 97久久亚洲| 久久国产精品亚洲77777| 久久国产日韩欧美精品| 亚洲宅男网av| 亚洲黄色影片| 麻豆久久久久| 凹凸av导航大全精品| 99热在线精品观看| 欧美美女被草| 亚洲91网站| 男人天堂欧美日韩| 国产一区二区三区久久| 97色成人综合网站| 色88久久久久高潮综合影院| 影音先锋亚洲精品| 久久蜜桃精品| 蜜桃av在线| 一区视频网站| 久久久久看片| 欧美一级大片在线视频| 午夜精品影院| 久久精品五月| 欧美亚洲精品在线| 男人久久天堂| 福利欧美精品在线| 在线天堂新版最新版在线8| 欧美黄色一级| 亚洲综合不卡| 91精品在线免费视频| 欧美天堂亚洲电影院在线观看 | 国产精品99久久久久久动医院| 欧美日韩 国产精品| 激情婷婷综合| 日韩精品三区四区| 性欧美xxxx免费岛国不卡电影| 亚洲精品555| 欧美xxxx在线| 亚洲国产国产亚洲一二三| 久久天天综合| 国产一区二区三区的电影| 久久激情综合| 麻豆精品在线看| 黄色工厂这里只有精品| 中文字幕日韩一区二区不卡| 亚洲激精日韩激精欧美精品| 欧美激情综合| 免费人成在线不卡| 精品午夜视频| 日韩理论电影| 特黄特色欧美大片| 久久字幕精品一区| 日韩一级不卡| 婷婷亚洲成人| 日韩中文在线电影| 欧美日中文字幕| 欧美精品观看| 日本久久精品| 欧美国产不卡| 久久这里有精品15一区二区三区| 图片区亚洲欧美小说区| 国产精久久久| 92国产精品| 亚洲国内精品| 成人国产精品一区二区网站| 国产精品久久久久久影院8一贰佰 国产精品久久久久久麻豆一区软件 | 日韩免费精品| 欧美综合社区国产| 免费精品国产的网站免费观看| 中文字幕日韩欧美精品高清在线| 日韩在线观看一区二区| 91国内精品| 麻豆精品久久久| 免费人成在线不卡| 久久久久国产一区二区| 欧美日韩亚洲一区| 超级白嫩亚洲国产第一| 私拍精品福利视频在线一区| 欧美黄色免费| 亚洲一级少妇| 91久久视频| www国产精品| 亚洲综合色网| 欧美xxxx做受欧美护士| 不卡在线一区| 一区二区三区在线资源 | 老司机精品视频一区二区三区| 老鸭窝毛片一区二区三区| 国产精品115| 亚洲色图图片| 成人一级视频| 免费成人小视频| **女人18毛片一区二区| 久久精品一级| 999久久久国产999久久久| 午夜激情电影在线播放|