Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

in java please , only D and E need to be solved. thank you c. if ( x > y); { System.out.println(X is bigger); What

in java please , only D and E need to be solved. thank you

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

c. if ( x > y); { System.out.println("X is bigger"); What is the output if x = 10, and y = 5? What is the output if x = 5, and y = 10? Are the answers correct? If NOT correct, how do you correct the code (Write the corrected code below)? Refer to the program in #7 in Common ProgrammingErrors document. Without running the program, guess the output of the program? Output Run the program in #8 in Common Programming Errors document. Explain why the error occurred? Eclipse IDE is available on Lab machines: START>ALL PROGRAMSCIS-CPS-CSC>Eclipse At first it will ask you for a "workspace - and it will give you a default option. I suggest that you all have a "thumb"-drive (also called flash-drive, or pen-drive) and create a folder called "workspace" in it, and use it as the workspace for the whole of this semester. You may also create your workspace on your "P:" drive (filecity) if you wish - Create a folder called "205 workspace" under P: . Once you have created the workspace, and selected it, Eclipse will appear to re-start (you may have to wait a bit), but once you see the new "default screen, you have to click "Workbench on the top right to get to a place where you can do the next steps 1. First create a project Project is a collection of many packages. A package is a collection of classes and maybe) other projects me. Enter: File/New Project Select "Java Project" - It will ask for a project 205 This is your project name for this class (We will have just one Project and many packages) If applicable (ie, if Eclipse "throws" a screen at you). click on the "Open Perspective button on that screen to get to the point where you can create a Java package and class(es) 2. Create a package: A package is a collection of classes and maybe) other projects. Right click on the sic label in the Package Explorer" tab on the left of your Eclipse screen, then select 'New', then package Creating new Package - It will ask for package name. Enter: numconvert We will create a stack package which will contain various implementations of the data Sirku: Stack. 3. Now create a new Java class called Number Converter: First click on the numeonvert package in the Package Explorer" tab. Right click on numrenent (package symbol (hox) and chose new/class- In the dialog that appears, type Number Converter for the class name (By default it will helic package nunconvert: public class Number Converter ( Copy Paste the code from here follows NumberConverter: Converts numbers from decinal to binary, octal Nauthor (TUR) * version (2017) public class NumberConverter Converts a single hex (or octal) to decimal public int convertToInt(char hexDigit) // An array of hex digits, both upper and lower Case for A-F char) hexDigits = ('e','1', '2', '3', '4', '5', '6', '7', '8', '9'. e! " ) 1/Corresponding decimal values int) decValues = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 10, 11, 12, 13, 14, 15); // Search through the hexbigits array to find the hex digit // When fai=ubd, return the corresponding decinal value from // decvalues array for (int k e; k 15) return ; //empty string if in 15) return ; //empty string if in

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