91精品国产91久久久久久_国产精品二区一区二区aⅴ污介绍_一本久久a久久精品vr综合_亚洲视频一区二区三区

合肥生活安徽新聞合肥交通合肥房產(chǎn)生活服務(wù)合肥教育合肥招聘合肥旅游文化藝術(shù)合肥美食合肥地圖合肥社保合肥醫(yī)院企業(yè)服務(wù)合肥法律

代寫CSCE 240 – Programming

時間:2024-03-06  來源:合肥網(wǎng)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
  • 無相關(guān)信息
    合肥生活資訊

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

    關(guān)于我們 | 打賞支持 | 廣告服務(wù) | 聯(lián)系我們 | 網(wǎng)站地圖 | 免責聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥網(wǎng) 版權(quán)所有
    ICP備06013414號-3 公安備 42010502001045

    91精品国产91久久久久久_国产精品二区一区二区aⅴ污介绍_一本久久a久久精品vr综合_亚洲视频一区二区三区
    成人一区二区三区在线观看| 国产精品99久久久久久久女警| 欧美电影免费观看高清完整版在线观看| 在线精品视频一区二区| 欧美日韩极品在线观看一区| 乱码第一页成人| 久久日韩精品| 在线不卡中文字幕播放| 日韩小视频在线观看专区| 日韩写真欧美这视频| 26uuu精品一区二区在线观看| 亚洲综合色丁香婷婷六月图片| 日韩一区二区在线播放| 色噜噜夜夜夜综合网| 色婷婷综合在线| 欧美视频日韩视频在线观看| 欧美一级xxx| 亚洲综合免费观看高清完整版| 麻豆国产一区二区| 国产在线观看一区| 欧美日韩视频第一区| 亚洲欧美日本韩国| 精品一区二区国语对白| 亚洲精品日本| 日韩三级在线免费观看| 一区二区三区.www| 欧美 日韩 国产在线| 久久久久久久高潮| 国产精品国产自产拍在线| 久久精品国产精品亚洲综合| 欧美精品麻豆| 欧美mv日韩mv国产| 日韩中文字幕不卡| 欧美日韩亚洲一区| 欧美精品一区二区三区四区| 亚洲综合精品自拍| 午夜久久黄色| 国产日韩欧美不卡在线| 精品在线播放免费| 久久爱另类一区二区小说| jlzzjlzz亚洲女人18| 老**午夜毛片一区二区三区| 中文字幕在线视频一区| 成人免费观看av| 欧美一三区三区四区免费在线看 | 欧美激情资源网| 亚洲精品日韩一| 972aa.com艺术欧美| 91精品国产综合久久久久久久| 久久成人麻豆午夜电影| 性刺激综合网| 日韩不卡手机在线v区| 国产美女诱惑一区二区| 亚洲国产精品影院| 久久精品日产第一区二区 | 婷婷成人激情在线网| 日本高清视频一区二区| 麻豆一区二区三| 91精品国产aⅴ一区二区| 丁香一区二区三区| 亚洲国产精品传媒在线观看| 欧美成人日韩| 一区二区高清免费观看影视大全| 在线观看欧美一区| 日韩欧美激情四射| 欧美日韩国产不卡在线看| 国产精品家庭影院| 欧美亚洲国产怡红院影院| 成人激情校园春色| 国产亚洲成aⅴ人片在线观看 | 久久香蕉国产线看观看99| 欧美日韩成人一区二区三区| 国产精品福利一区| 性一交一乱一区二区洋洋av| 精品午夜一区二区三区在线观看 | 亚洲国产一区在线| 天堂久久一区二区三区| 亚洲欧洲性图库| 欧美美女网站色| 亚洲第一毛片| 欧美精品99| 国产不卡视频在线播放| 亚洲人成在线播放网站岛国| 9191成人精品久久| 亚洲一区二区三区四区中文| av亚洲产国偷v产偷v自拍| 亚洲黄色小说网站| 亚洲欧美在线视频| 久久久国产精品午夜一区ai换脸| 欧美日韩精品专区| 国产精品扒开腿做爽爽爽软件| 国产精品久久网站| 欧美电影免费观看高清完整版| 一本大道综合伊人精品热热| 欧美亚州在线观看| 欧美a级片一区| 国产乱码精品一区二区三| 毛片一区二区三区| 午夜国产不卡在线观看视频| 亚洲免费av网站| 亚洲一区二区三区在线| 亚洲丝袜另类动漫二区| 中文字幕av资源一区| 日韩欧美亚洲另类制服综合在线| 国产精品美女诱惑| 香蕉久久夜色精品| 久久精品在线| 欧美午夜精品久久久久久孕妇| 色欧美片视频在线观看在线视频| 久久中文在线| 欧美日韩亚州综合| 日韩免费视频线观看| 久久综合九色综合97婷婷女人 | 国产精品一区二区久激情瑜伽| 热久久免费视频| 91在线观看美女| 亚洲激情综合| 欧美性videosxxxxx| 日韩欧美精品在线视频| 国产精品久久久久久一区二区三区| 中文字幕精品—区二区四季| 肉丝袜脚交视频一区二区| 久久在线观看免费| 久久久久久久免费视频了| 一区二区三区欧美在线观看| 久热成人在线视频| av不卡免费在线观看| 亚洲成人自拍视频| 欧美美女喷水视频| 一区二区三区日韩精品视频| 久久精品免费观看| 在线日韩av| 欧美变态口味重另类| 亚洲成a人片在线不卡一二三区 | 99视频在线精品| 一本在线高清不卡dvd| 欧美亚洲日本国产| 国产亚洲1区2区3区| 日韩av一区二区三区| 欧美日韩在线观看一区二区三区| 色av成人天堂桃色av| 亚洲欧美一区二区久久| 国产精品一二三| 久久精品国产清高在天天线 | 一区二区三区免费| 丰满白嫩尤物一区二区| 中文一区二区| 久久奇米777| 日韩国产在线观看一区| 欧美精品三级| 久久久久久久国产精品影院| 久久国内精品视频| 亚洲经典视频在线观看| 久久人人爽人人爽| 丁香六月综合激情| 欧美视频一区在线| 精品一区二区在线看| 久久精品国产清高在天天线 | 亚洲国产成人va在线观看天堂| 国产综合精品一区| 亚洲国产经典视频| 国内精品久久国产| 亚洲色图在线视频| 裸体一区二区| 国产精品一线二线三线精华| 欧美美女一区二区三区| 国产999精品久久久久久| 日韩亚洲欧美在线观看| 成人免费不卡视频| 欧美精品一区二区三区很污很色的 | 欧美精品 日韩| 99国产精品久| 亚洲一本大道在线| 欧美日韩和欧美的一区二区| 国产成人免费在线视频| 欧美色手机在线观看| 麻豆国产精品视频| 日韩亚洲欧美成人一区| 91免费视频观看| 久久亚洲综合色| aa亚洲婷婷| 99精品欧美一区二区三区小说| 亚洲日本在线a| 欧美日韩一区小说| 国产一区成人| 成人激情综合网站| 亚洲三级久久久| 欧美高清性hdvideosex| av动漫一区二区| 一区二区三区波多野结衣在线观看| 欧美高清dvd| 国产精品日韩| 欧美激情精品久久久六区热门| 三级一区在线视频先锋| 久久精品一区二区三区av| 日本精品裸体写真集在线观看| 午夜一区二区三视频在线观看| 成人午夜伦理影院| 国产一区欧美日韩| 五月综合激情日本mⅴ|