COMP 1405 Lecture Notes - Lecture 1: Toonie, Dime (United States Coin), Super Ball

92 views4 pages

Document Summary

Comp1405 - assignment #1 (due: friday, october 9th @ 4:30pm (afternoon)) In this assignment, you will practice doing i/o using system. out as well as the. You will gain experience using primitive variables as well as object variables. You will define a toy object, a company object and a history object and use these objects together. (1) the change calculator. You are off to the candy store with a bill to buy some candies. Changecalculatorprogram that allows you to enter the total cost of the candies that you are buying (i. e. , use the scanner class) in cents (i. e. , 275 cents is . 75). The program should then tell you how many toonies, loonies, quarters, dimes, nickels and pennies that you should get as your change (assuming that you always pay with a bill). Your program should return the least amount of coins possible. All your calculations should be in terms of cents so that you can use just int variables.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers