010-004-003
Overloading in Practice: Format Utility
Easy
Problem Description
Overloading in Practice: Format Utility
In this problem, you will create a program that defines multiple overloaded format methods for integer, decimal, and string types, and displays each value in the specified format to standard output.
Learning Objective: Understand practical use of overloading
Define multiple format methods to format and display integer, decimal, and string appropriately. Use same interface to handle different types.
Input
Line 1: Integer value
Line 2: Decimal value
Line 3: String
Output
Int format: [integer]
Double format: [decimal]
String format: [string]
Ready to Try Running Code?
Log in to access the code editor and execute your solutions for this problem.
Don't have an account?
Sign Up