\$20 Bonus + 25% OFF

# ICT159 Foundations Of Programming

0 Download2 Pages / 486 Words Add in library Click this icon and make it bookmark in your library to refer it later. GOT IT

## Questions:

### 1.

You should read this question as if the change giver is a bank teller who has to give amounts of money to customers but can’t count very well so needs you program to help them.

You are asked to write a simple C program that will accept an integer value in the range of 5-95 and as a multiple of 5 representing the number of cents to give to a customer in their change. The program should calculate how many coins of each denomination and display this to the user. Valid coin values are 50, 20, 10 and 5. Your solution (program and algorithm) should be modular in nature. This requires the submission of a high-level algorithm and suitable decompositions of each step.

Note that for this problem the principle of code reuse is particularly important and a significant number of marks are allocated to this.  You should attempt to design your solution such that it consists of a relatively small number of functions that are as general in design as possible and you should have one function in particular that can be reused (called repeatedly) in order to solve the majority of the problem.  If you find that you have developed a large number of functions which each perform a similar task (or have a lot of repeated code) then attempt to analyse your design to generalise the logic so that it may be reused.

### 2.

You are to extend your solution to Question 1 above by allowing the user to enter the amount of change as dollars and cents as a double (real number). Valid dollar values are 100, 50, 20, 10, 5, 2 and 1. You program should output the correct combination of dollar and cent denominations required and should be able to work for any valid dollar amounts. Cents amounts may be should be multiples of 5 as in the previous question.

In this question you will need to explicitly convert a double to an integer to break the inputted double down to its component parts as integers. You can use the following code as the basis for doing this:

float change;

int dollar, cents;

...

dollar = (int) change;

cents = (int) (((change – dollar)*100) + 0.5);

Again your solution for this problem should be modular.

### Cite This Work

My Assignment Help (2020) Foundations Of Programming [Online]. Available from: https://myassignmenthelp.com/free-samples/ict159-foundations-of-programming/value-of-n-as-integer.html
[Accessed 27 July 2021].

My Assignment Help. 'Foundations Of Programming' (My Assignment Help, 2020) <https://myassignmenthelp.com/free-samples/ict159-foundations-of-programming/value-of-n-as-integer.html> accessed 27 July 2021.

My Assignment Help. Foundations Of Programming [Internet]. My Assignment Help. 2020 [cited 27 July 2021]. Available from: https://myassignmenthelp.com/free-samples/ict159-foundations-of-programming/value-of-n-as-integer.html.

### Latest Programing Samples

#### ITC561 Cloud Computing

Answers 1. a) Different approaches for offering the facility of office automation to the staff of  civil engineers The approaches that can be utilized by SoftArc Engineering to access office automation effectively include Big Data as well as cloud computing. b. Major benefits as well as issues related with the approach Benefits as well as issues for using cloud computing The advantages of  using cloud computing include: Easy Imple...

#### CSCI 5413 Ethical Hacking

Answer Introduction  The report talks about the internal testing methods OSSTMM and PTES. The report explains that how OSSTMM and PTES play a significant role in internal testing, operational security testing, and business testing. It also explains the various penetration testing methods. Open source security methodology manual and penetration testing execution standard are the important method of penetration testing. These techniques so...

#### ITECH1000 Programming

Answer: The program which is given in the JAVA assignment emphasise on HOTEL RECOMMENDATION SYSTEM. This JAVA program helps me to learn and practice lot of things by giving me a platform to use my JAVA skills effectively. In this program, User can see the list of the hotels available with their room price, star rating, occupancy etc. User can also find the cheap hotel from the list of the hotels with a press of a button only. This program also...

#### ITC568 Cloud Privacy And Security

Answer Introduction:  The part of the Smart Nation Plan of the Singapore Government has been the deploying a network of smart sensors and cameras at various places. They have also been implementing a sensor box series acting as the Wi-Fi hotspot across the city. The report has discussed what has been seen as the implication of the privacy of the Smart Sensor Network of Singapore Government. This is estimated to permit the introducing of...

Read More Tags: Australia Melbourne Computer Science Information Security and Privacy University of Melbourne Engineering
Next

### We Can Help!

Are you confident that you will achieve the grade?

### Refer & earn

Just refer 5 friends to earn more than \$2000.

## Still in Two Minds? The Proof is in Numbers!

33845 Genuine Reviews With a Rating of 4.9/5.

19 Jul 2021

#### Mechanical Engineering

Assignment: 8 Pages, Deadline: 8 days

Passed my subject because of you. Thank you........................................................................

User ID: 2***76 Sydney, Australia

19 Jul 2021

#### Healthcare

Essay: 1 Page, Deadline: 17 days

The depression rate has been increased by 31% among teenagers in America as a consequence of the excessive us ...

User ID: 6***41 Campbell River, Canada

19 Jul 2021

#### English

Assignment: 0 Pages, Deadline: 4 days

Grate job on my assignment. I got a 100 on it. thank you. I have two questions? 1)Whats The distance from Clarksville,TN to Dayton, Ohio? What's the ...

User ID: 7***74 United States

19 Jul 2021

#### Assignment

Essay: 5 Pages, Deadline: 6 days

Great job by an incredible organization that truly goes above and beyond to assist in any matter. I truly thank you again for your help.

User ID: 5***89 Hillsborough, United States

19 Jul 2021

#### Networking

Programming: 4 Pages, Deadline: 30 days

Very Good Team and they attend to you whenever u need them and make all the changes required as soon as possible.

User ID: 6***7 Brisbane, Australia

19 Jul 2021

#### It Write Up

Assignment: 4 Pages, Deadline: 16 days

This was short assignment but i was satisfied with the work. I got good grades and passed the assignment. The assignment was overall good. I ordered i ...

18 Jul 2021

#### Healthcare

Essay: 4 Pages, Deadline: 6 days

the revised version of the assignment was ok, based on the feedback for all the parts.

User ID: 5***77 Australia

18 Jul 2021

#### Nursing

Home Work: 4 Pages, Deadline: 4 days

My assignment always done on time sometime before the given time. MY ASSIGNMENT team is very responsive.

User ID: 4***34 United States

18 Jul 2021

#### Nursing

Assignment: 4.8 Pages, Deadline: 5 days

My Assignment was done very good. Good work and it was delivered on time. Very responsive.

User ID: 4***34 United States

18 Jul 2021

#### HRM

Thesis: 6 Pages, Deadline: 9 days

YOU WORKED HARD ON THIS ASSIGNMENT AND DID EXACTLY WHAT WAS ASKED. THANKS, AND I CAN'T WAIT FOR YOU TO DO WELL ON THE NEXT WORK.

User ID: 4***64 United States

19 Jul 2021

#### Mechanical Engineering

Assignment: 8 Pages, Deadline: 8 days

Passed my subject because of you. Thank you........................................................................

User ID: 2***76 Sydney, Australia

19 Jul 2021

#### Healthcare

Essay: 1 Page, Deadline: 17 days

The depression rate has been increased by 31% among teenagers in America as a consequence of the excessive us ...

User ID: 6***41 Campbell River, Canada

19 Jul 2021

#### English

Assignment: 0 Pages, Deadline: 4 days

Grate job on my assignment. I got a 100 on it. thank you. I have two questions? 1)Whats The distance from Clarksville,TN to Dayton, Ohio? What's the ...

User ID: 7***74 United States

19 Jul 2021

#### Assignment

Essay: 5 Pages, Deadline: 6 days

Great job by an incredible organization that truly goes above and beyond to assist in any matter. I truly thank you again for your help.

User ID: 5***89 Hillsborough, United States

19 Jul 2021

#### Networking

Programming: 4 Pages, Deadline: 30 days

Very Good Team and they attend to you whenever u need them and make all the changes required as soon as possible.

User ID: 6***7 Brisbane, Australia

19 Jul 2021

#### It Write Up

Assignment: 4 Pages, Deadline: 16 days

This was short assignment but i was satisfied with the work. I got good grades and passed the assignment. The assignment was overall good. I ordered i ...

18 Jul 2021

#### Healthcare

Essay: 4 Pages, Deadline: 6 days

the revised version of the assignment was ok, based on the feedback for all the parts.

User ID: 5***77 Australia

18 Jul 2021

#### Nursing

Home Work: 4 Pages, Deadline: 4 days

My assignment always done on time sometime before the given time. MY ASSIGNMENT team is very responsive.

User ID: 4***34 United States

18 Jul 2021

#### Nursing

Assignment: 4.8 Pages, Deadline: 5 days

My Assignment was done very good. Good work and it was delivered on time. Very responsive.

User ID: 4***34 United States

18 Jul 2021

#### HRM

Thesis: 6 Pages, Deadline: 9 days

YOU WORKED HARD ON THIS ASSIGNMENT AND DID EXACTLY WHAT WAS ASKED. THANKS, AND I CAN'T WAIT FOR YOU TO DO WELL ON THE NEXT WORK.

User ID: 4***64 United States

## Order on the go!

Say hello to our new app