99爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

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

代寫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爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

          9000px;">

                欧美日韩一区二区三区在线看| 欧美激情自拍偷拍| av成人动漫在线观看| 精一区二区三区| 婷婷久久综合九色综合伊人色| 国产精品丝袜一区| 久久午夜色播影院免费高清| 日韩一级免费观看| 欧美一区二区久久久| 91精品国产综合久久小美女| 3d动漫精品啪啪一区二区竹菊 | 亚洲人成精品久久久久久| 国产欧美视频在线观看| 国产日韩精品一区| 国产欧美精品一区aⅴ影院 | 亚洲国产日韩一区二区| 一区二区三区免费| 亚洲大尺度视频在线观看| 亚洲成人一区二区| 麻豆一区二区三| 国产剧情一区二区三区| 国产精品18久久久久久久久| 成人性视频免费网站| 91在线云播放| 欧美一区二区三区影视| 久久久精品国产免大香伊| 1024亚洲合集| 日本美女一区二区三区| 国产一区二区三区高清播放| 风间由美一区二区三区在线观看| fc2成人免费人成在线观看播放| 日本乱人伦一区| 欧美本精品男人aⅴ天堂| 中文字幕亚洲在| 蜜桃av噜噜一区二区三区小说| 国产成人精品免费一区二区| 色婷婷综合久久久久中文一区二区 | 极品少妇xxxx精品少妇| 国产成人免费av在线| 91福利精品第一导航| 精品国产免费一区二区三区四区| 国产免费久久精品| 视频一区视频二区中文| 国产成人综合亚洲91猫咪| 欧美三级日韩在线| 久久婷婷综合激情| 亚洲成av人片一区二区| 岛国一区二区三区| 精品国产乱码久久久久久老虎 | 欧美色区777第一页| 欧美国产日韩在线观看| 免费av网站大全久久| av福利精品导航| 国产性天天综合网| 日韩电影免费在线看| 91国模大尺度私拍在线视频| 26uuu亚洲| 美女诱惑一区二区| 欧美亚洲动漫制服丝袜| 中文字幕永久在线不卡| 国产九色精品成人porny| 欧美日本一道本在线视频| 1024亚洲合集| 99国产欧美久久久精品| 亚洲精品一区在线观看| 亚洲成av人片| 精品视频123区在线观看| 亚洲色图清纯唯美| 99久久er热在这里只有精品66| 欧美精品一区二区久久婷婷| 蜜臀精品一区二区三区在线观看| 欧美日韩一区二区三区四区五区| 综合电影一区二区三区| 成人免费毛片高清视频| 中文字幕欧美国产| www.欧美精品一二区| 国产精品久久久久aaaa樱花| 成人app下载| 国产精品美日韩| 99精品视频在线免费观看| 亚洲欧洲成人自拍| av午夜精品一区二区三区| 欧美高清在线一区| 99精品欧美一区二区三区小说| 欧美韩日一区二区三区| 99久久精品99国产精品| 亚洲品质自拍视频| 欧美三日本三级三级在线播放| 亚洲在线中文字幕| 欧美日本免费一区二区三区| 日本一区中文字幕| 久久这里只有精品6| 国产成人亚洲精品狼色在线| 国产欧美日韩久久| 色综合咪咪久久| 亚瑟在线精品视频| 日韩精品中文字幕在线一区| 精品一区二区国语对白| 国产精品全国免费观看高清| 99久久久国产精品免费蜜臀| 亚洲chinese男男1069| 欧美成人福利视频| 成人黄页在线观看| 亚洲一区二区三区自拍| 91精品国产综合久久久蜜臀图片| 美女在线视频一区| 国产精品女同一区二区三区| 欧美视频精品在线| 麻豆91在线看| 最新成人av在线| 欧美一级二级三级蜜桃| 9色porny自拍视频一区二区| 日韩精品一二区| 国产午夜精品一区二区三区嫩草| 色老汉av一区二区三区| 麻豆精品视频在线观看视频| 18成人在线视频| 精品国偷自产国产一区| 欧美日韩在线直播| 丰满亚洲少妇av| 秋霞国产午夜精品免费视频| 欧美国产欧美亚州国产日韩mv天天看完整| 欧美偷拍一区二区| 国产69精品久久久久777| 日韩va欧美va亚洲va久久| 国产日韩欧美亚洲| 欧美一二三在线| 欧美三级一区二区| 91在线观看污| 国产福利一区二区三区视频在线| 五月激情六月综合| 亚洲欧美另类图片小说| 久久精品这里都是精品| 91精品国产91热久久久做人人| 色综合色狠狠天天综合色| 成人国产一区二区三区精品| 国内成人精品2018免费看| 午夜视频一区在线观看| 亚洲精品国产第一综合99久久| 久久综合九色欧美综合狠狠 | 国产精品美女一区二区| 久久久久97国产精华液好用吗| 欧美一区二区三区白人| 欧美精品国产精品| 欧美性猛片aaaaaaa做受| 99re热这里只有精品视频| 国产精品综合网| 国产中文一区二区三区| 国产在线精品一区二区不卡了| 日韩av在线播放中文字幕| 亚洲第一精品在线| 偷偷要91色婷婷| 亚洲综合久久久| 亚洲亚洲精品在线观看| 一区二区三区欧美在线观看| 一区二区三区四区乱视频| 亚洲色欲色欲www| 亚洲美女少妇撒尿| 一卡二卡欧美日韩| 亚洲大片免费看| 美国精品在线观看| 国产乱国产乱300精品| 国产乱人伦偷精品视频免下载| 国产精品一区二区三区99| 国产91精品露脸国语对白| 成人动漫中文字幕| 91美女片黄在线观看| 欧美日韩在线亚洲一区蜜芽| 91 com成人网| 久久精品夜夜夜夜久久| 国产精品久久久久一区| 亚洲区小说区图片区qvod| 偷拍与自拍一区| 国内精品国产成人国产三级粉色| 成人性生交大片免费看在线播放| 成人av在线电影| 欧美体内she精高潮| 欧美一级久久久| 国产精品私房写真福利视频| 亚洲一区二区三区四区五区黄| 日韩国产精品大片| 国产福利91精品一区二区三区| av电影一区二区| 91精品国产综合久久福利| 久久久久久久久久久久久夜| 国产精品成人一区二区艾草| 亚洲国产视频直播| 黄色日韩三级电影| 91麻豆免费视频| 精品奇米国产一区二区三区| 成人欧美一区二区三区白人| 三级久久三级久久久| 国产成人精品一区二| 精品视频在线免费观看| 久久嫩草精品久久久久| 一区二区三区欧美| 成人h精品动漫一区二区三区| 欧美久久久久久久久中文字幕| 中文字幕制服丝袜成人av| 久久99精品久久久久婷婷|