Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

java code with JUNIT test cases don't worry about the third class see example below for java on left and junit test cases on the

image text in transcribed

java code with JUNIT test cases

don't worry about the third class

see example below for java on left and junit test cases on the right

image text in transcribed

Description: We have been tasked with writing a basic HEXIDECIMAL to DECIMAL conversion program. When provided with a HEX number we are to convert it into its DECIMAL equivalent. If any of the provided "HEX" characters are not in fact valid, we need to throw a custom exception, HexFormatException, with the description being: "Ilegal hex character". If all characters are valid, we simply return the decimal result. Required Methods: public static int parseHex(String hexString) throws HexFormatException o Need to implement the HexFormatException class which should extend the Exception Packaging: Fully qualified class names are listed below: . edu.ben.homeworks.homework3.Homework3.java edu.ben.homeworks.homework3.Homework3Test.java . edu.ben.homeworks.homework3.HexFormatException.java Homeworko.java | D HomeworkOTest.java33 " in..in packagehomeworks. homeworke; 1 package e 3 public class Homeworke 5 public static void main(Stringll args) f homeworks. homeworke; 3+ import org. junit.Test: public class HomeworkeTest extends TestCase t System.out.print n("Helto wortd) @Test public void test) f String expected:,'"Hello, world! "; Homeworke.main nulu) String actual systemout.getHistory); assertEquals (expected, actua): 10 12 h 16

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions