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
  • 無相關信息
    合肥生活資訊

    合肥圖文信息
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    出評 開團工具
    出評 開團工具
    挖掘機濾芯提升發動機性能
    挖掘機濾芯提升發動機性能
    海信羅馬假日洗衣機亮相AWE  復古美學與現代科技完美結合
    海信羅馬假日洗衣機亮相AWE 復古美學與現代
    合肥機場巴士4號線
    合肥機場巴士4號線
    合肥機場巴士3號線
    合肥機場巴士3號線
    合肥機場巴士2號線
    合肥機場巴士2號線
    合肥機場巴士1號線
    合肥機場巴士1號線
  • 短信驗證碼 豆包 幣安下載 AI生圖 目錄網

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

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

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

          9000px;">

                色综合天天综合网天天看片| 欧美午夜精品久久久久久孕妇| 欧美三级韩国三级日本一级| 在线观看国产一区二区| 欧美性感一类影片在线播放| 亚洲一区二区美女| 精品一区二区三区日韩| 国产成人自拍高清视频在线免费播放| 国产成人精品免费| 欧美国产成人在线| 免费观看在线综合色| 国产成人精品免费网站| 国产日韩视频一区二区三区| 亚洲一区免费视频| 欧美日韩的一区二区| 日本一区二区三区在线观看| 9色porny自拍视频一区二区| 欧美福利视频一区| 亚洲猫色日本管| 国产乱理伦片在线观看夜一区| 91视视频在线直接观看在线看网页在线看| 91蜜桃网址入口| 亚洲成av人片一区二区梦乃| 国产精品一区二区无线| 一区二区三区四区在线| 97超碰欧美中文字幕| 久久亚洲一区二区三区四区| 视频一区在线视频| 欧美在线一区二区三区| 久草精品在线观看| 亚洲小说欧美激情另类| 色噜噜狠狠色综合中国| 亚洲男帅同性gay1069| 日韩欧美国产电影| 日韩精品免费视频人成| 欧美国产乱子伦 | 99久久99久久久精品齐齐| 蜜桃在线一区二区三区| 欧美性猛片xxxx免费看久爱| 国产一区二区电影| 色偷偷成人一区二区三区91| 欧美国产1区2区| 欧美一区二区三区在线电影| 日韩高清不卡在线| 91精品国产综合久久福利| 色综合天天综合色综合av| 激情成人综合网| 欧美一区二区三区不卡| 色88888久久久久久影院按摩| 国产乱子轮精品视频| 奇米一区二区三区av| 性做久久久久久久免费看| 亚洲欧美日本在线| 亚洲一区二区三区在线播放| 亚洲永久精品国产| 午夜视黄欧洲亚洲| 国产三级一区二区| 国产成人av一区二区三区在线 | 国产成人午夜视频| 国产一二三精品| 精品一区二区在线观看| 国产一区二区不卡在线| 国产福利视频一区二区三区| 国产成人啪免费观看软件| 成人免费毛片app| 亚洲午夜激情网页| 亚洲成人福利片| 日韩vs国产vs欧美| 国产一区二区三区免费观看| 国产91色综合久久免费分享| 亚洲电影一级片| 亚洲国产综合在线| 精品影视av免费| av电影在线观看一区| 欧美午夜免费电影| 91精品国产综合久久国产大片| 欧美日韩久久久久久| 日韩欧美激情在线| 国产精品三级av| 亚洲精品一线二线三线无人区| 一本高清dvd不卡在线观看| 91久久国产最好的精华液| 91精品国产综合久久小美女| 成人免费视频视频| 色综合天天视频在线观看| 制服丝袜亚洲色图| 国产精品视频观看| 一区二区三区四区乱视频| 天堂蜜桃91精品| 中文字幕乱码一区二区免费| 日本精品一区二区三区四区的功能| 色综合久久88色综合天天免费| 欧美日韩视频在线第一区| 日韩视频123| 91蜜桃婷婷狠狠久久综合9色| 91成人免费在线视频| 欧美成人乱码一区二区三区| 欧美日韩一区二区三区四区| 欧美亚洲日本一区| 久久久综合视频| 日韩一区二区在线免费观看| 精品电影一区二区| 一区二区在线观看视频在线观看| 国产精品天美传媒| 亚洲成人你懂的| 91网站在线观看视频| 精品久久久久久久久久久久久久久| 亚洲视频一区二区在线| 日本一区二区三区国色天香| 欧美无乱码久久久免费午夜一区| 日本精品一区二区三区四区的功能| 欧美精品丝袜中出| 成人免费小视频| 中文字幕亚洲综合久久菠萝蜜| 午夜精品久久久久久久99水蜜桃| 99久久精品国产精品久久 | 91香蕉视频污| 亚洲国产电影在线观看| 国产真实乱偷精品视频免| 日韩欧美激情在线| 另类小说图片综合网| 久久99国产精品久久| 欧美日韩亚洲综合在线 | 亚洲精品一区二区三区在线观看| 丝袜国产日韩另类美女| 欧美私人免费视频| 亚洲成年人网站在线观看| 欧美日韩五月天| 午夜天堂影视香蕉久久| 欧美日本一区二区在线观看| 亚洲国产aⅴ成人精品无吗| 欧美日韩综合在线免费观看| 亚洲国产综合在线| 欧美一区日韩一区| 国内成+人亚洲+欧美+综合在线| 久久影音资源网| 成人国产免费视频| 欧美日韩一区在线观看| 一区二区三区在线播| 欧美伊人精品成人久久综合97| 亚洲欧美日韩小说| 欧美亚洲一区三区| 美美哒免费高清在线观看视频一区二区 | 在线免费精品视频| 亚洲一区二区视频在线观看| 欧美日韩aaaaaa| 久久丁香综合五月国产三级网站| 日韩欧美的一区| 成人免费av资源| 一区二区三区国产| 精品毛片乱码1区2区3区| 成人晚上爱看视频| 亚洲一区二区免费视频| 精品国产一区a| 色综合久久久久综合体桃花网| 五月激情丁香一区二区三区| 精品成人私密视频| 91在线免费视频观看| 亚洲一二三四区不卡| 日韩视频在线一区二区| 成人av中文字幕| 青青草原综合久久大伊人精品| 欧美精品一区二区蜜臀亚洲| 99热精品国产| 国内精品久久久久影院薰衣草| 综合久久国产九一剧情麻豆| 日韩三级免费观看| 色av综合在线| 国产成人av一区二区三区在线| 五月天欧美精品| 国产精品激情偷乱一区二区∴| 秋霞国产午夜精品免费视频| 国产精品另类一区| 欧美电影在哪看比较好| 99精品视频中文字幕| 国产在线精品一区二区| 成人免费高清视频在线观看| 成人欧美一区二区三区小说| 欧美日韩国产成人在线免费| 国产激情一区二区三区桃花岛亚洲| 亚洲日本电影在线| 欧美一级xxx| 男人操女人的视频在线观看欧美| 日本一区中文字幕| 91精品国产综合久久久久久久久久 | 日韩免费性生活视频播放| 91久久线看在观草草青青| 国产99精品视频| 国产米奇在线777精品观看| 26uuu精品一区二区在线观看| 久久99精品国产麻豆婷婷洗澡| 日韩欧美一二区| 在线观看av一区| 国产精品麻豆视频| 在线视频欧美精品| 青青草原综合久久大伊人精品 | 国产精品乱人伦| 精品人在线二区三区| 成人国产免费视频| 成人一区二区三区在线观看|