Question: Implement the following for a 2 dimensional object ( do not worry about overflow for this lab ) : 1 ) Ask the user for

Implement the following for a 2 dimensional object (do not worry about overflow for this lab):
1) Ask the user for the coordinates of a line with two endpoints. Have the user input, as ONE string input, x and y values. You can use the default format (x,y);(x,y) or you can adopt a different formatting. Let the user know the formatting. If you dont let the user know, the grade will be based on user entering in default format. The input will be unsigned Do not worry about zero. Parse user input.
2) Pack the x and y values, using the following format. All of the x values are packed into one 32 bit register, where each value is represented by 16 bits. All of the y values are packed into one 32 bit register, where each value is represented by 16 bits. For example, if the user inputted (2,3); (3,1), then the contents of the two registers would look like figures 4 and 5.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!