{"id":15261,"date":"2024-11-07T00:03:20","date_gmt":"2024-11-07T00:03:20","guid":{"rendered":"https:\/\/academicwritersbay.com\/solutions\/java-assistance\/"},"modified":"2024-11-07T00:03:20","modified_gmt":"2024-11-07T00:03:20","slug":"java-assistance","status":"publish","type":"post","link":"https:\/\/academicwritersbay.com\/solutions\/java-assistance\/","title":{"rendered":"Java Assistance"},"content":{"rendered":"<p>CMSC 330 Mission 1<br \/> The first programming project involves extending the Java skeleton program that it&#8217;s a long way equipped in<br \/> the linked .zip file. That skeleton program shows a scene of graphic photos contained in a<br \/> scene definition file. The grammar for that scene definition file is proven below:<br \/> scene \u2192 SCENE IDENTIFIER number_list photos END \u2018.\u2019<br \/> photos \u2192 image photos | image<br \/> image \u2192 right_triangle | rectangle<br \/> right_triangle \u2192<br \/> RIGHT_TRIANGLE COLOR number_list AT number_list HEIGHT NUMBER WIDTH<br \/> NUMBER \u2018;\u2019<br \/> rectangle \u2192<br \/> RECTANGLE_ COLOR number_list AT number_list HEIGHT NUMBER WIDTH<br \/> NUMBER \u2018;\u2019<br \/> number_list \u2192 \u2018(\u2018 numbers \u2018)\u2019<br \/> numbers \u2192 NUMBER | NUMBER \u2018,\u2019 numbers<br \/> In the above grammar, terminal symbols are upper case names or personality literals proven in blue<br \/> and nonterminal symbols are lower case names proven in red. EBNF metacharacters are proven in<br \/> sunless. Tokens can even be separated by any assortment of areas. Identifiers and key phrases are strings of<br \/> alphabetic characters. Identifiers are case soft. Numbers are unsigned integers.<br \/> That program reads within the scene definition file that defines the image objects in a scene and<br \/> creates these objects, inserts them into the scene and shows that scene.<br \/> You would possibly be to vary this system so that this is in a position to parse and prove the further photos defined by<br \/> the expanded grammar proven below with the additions to the grammar highlighted in yellow:<br \/> scene \u2192 SCENE IDENTIFIER number_list photos END \u2018.\u2019<br \/> photos \u2192 image photos | image<br \/> image \u2192<br \/> right_triangle | rectangle | parallelogram | regular_polygon | isosceles<br \/> | textual exclaim material<br \/> right_triangle \u2192<br \/> RIGHT_TRIANGLE COLOR number_list AT number_list HEIGHT NUMBER WIDTH<br \/> NUMBER \u2018;\u2019<br \/> rectangle \u2192<br \/> RECTANGLE_ COLOR number_list AT number_list HEIGHT NUMBER WIDTH<br \/> NUMBER \u2018;\u2019<br \/> parallelogram \u2192<br \/> PARALLELOGRAM COLOR number_list AT number_list number_list OFFSET<br \/> NUMBER \u2018;\u2019<\/p>\n<p>regular_polygon \u2192<br \/> REGULAR_POLYGON COLOR number_list AT number_list SIDES NUMBER RADIUS<br \/> NUMBER \u2018;\u2019<br \/> isosceles \u2192<br \/> ISOSCELES COLOR number_list AT number_list HEIGHT NUMBER WIDTH<br \/> NUMBER \u2018;\u2019<br \/> textual exclaim material \u2192<br \/> TEXT COLOR number_list AT number_list STRING \u2018;\u2019<br \/> number_list \u2192 \u2018(\u2018 numbers \u2018)\u2019<br \/> numbers \u2192 NUMBER | NUMBER \u2018,\u2019 numbers<br \/> The UML plot for all the project is proven below:<\/p>\n<p>The classes proven in sunless are included within the skeleton project. You wish to total the project<br \/> by writing these classes proven in red, modifying the Parser class so that this is in a position to parse the<br \/> expanded grammar, modifying the Lexer class to deal with string tokens, and modifying the<br \/> Tokens enumerated variety to add the total unusual tokens.. Under is a first-rate level opinion of every and each of the five<br \/> classes that you have to jot down:<br \/> The Textual exclaim material class must dangle a constructor that is equipped the color that defines the textual exclaim material color, a<br \/> level that specifies the textual exclaim material location and a string containing the textual exclaim material to be displayed. It must also<br \/> dangle a plan perform because it&#8217;s a long way extends the abstract class Describe. The plan perform must<br \/> plan the textual exclaim material the usage of the ability drawString in Graphics class.<br \/> The SolidPolygon class must dangle a constructor that is passed the assortment of vertices within the<br \/> polygon and its color. It must define the ability drawPolygon because it&#8217;s a long way extends the abstract<\/p>\n<p>class Polygon_. It would possibly name the fillPolygon technique of the Graphics class to plan a solid<br \/> polygon.<br \/> The IsoscelesTriangle class must have a constructor that is equipped the color of the triangle,<br \/> a degree that specifies the placement of the prime vertex, and the height and width of the triangle. It<br \/> must allocate the arrays of x and y coordinates that defines the triangle and it must compute their<br \/> values.<br \/> The Parallelogram class must have a constructor that is equipped the color of the parallelogram,<br \/> two aspects that specifies the placement of the upper left and lower lovely vertices besides to<br \/> an x offset tag that specifies the x distance between the upper and lower left vertices. It must<br \/> allocate the arrays of x and y coordinates that defines the parallelogram and it must compute their<br \/> values.<br \/> The RegularPolygon class must dangle a constructor that is equipped the color of the polygon,<br \/> the assortment of facets, a degree that specifies the placement of its center, and the radius, which defines<br \/> the space between the center and each of the vertices. It must allocate the arrays of x and y<br \/> coordinates that defines the customary polygon and it must compute their values.<br \/> Under is a pattern of a scene definition file that can provide input to this system:<br \/> Scene Polygons (500, 500)<br \/> RightTriangle Colour (255, 0, 0) at (50, 30) Top 100 Width 300;<br \/> Rectangle Colour (0, 128, 255) at (100, 100) Top 200 Width 100;<br \/> Isosceles Colour (255, 0, 0) at (120, 120) Top 100 Width 200;<br \/> Parallelogram Colour (0, 0, 255) at (340, 50) (440, 120) Offset 30;<br \/> RegularPolygon Colour(255, 0, 255) at (300, 300) Facets 6 Radius 80;<br \/> Textual exclaim material Colour(0, 0, 0) at (400, 200) \u201cHowdy World\u201d;<br \/> Cease.<br \/> Gape that the token names are all upper case and would possibly dangle underscores whereas the<br \/> corresponding lexemes at in title case without underscores. For instance the token<br \/> RIGHT_TRIANGLE has lexeme RightTriangle. The lexical analyzer within the skeleton handles the<br \/> obligatory conversion. Proven below is the scene that must be produced when this system is<br \/> equipped with the above scene definition.<\/p>\n<p>The deliverables for this project embrace the next:<br \/> 1. A .zip file containing the total provide code properly enforcing all required<br \/> functionality.<br \/> a. The total .java files equipped within the skeleton will must included in spite of whether<br \/> they required any changes<br \/> b. All unusual files must embrace a header with the student title, date, project and a<br \/> description of what the file incorporates<br \/> c. All modified files must embrace a header with the identical files<br \/> 2. A Word or PDF file that comes with the next:<br \/> a. A dialogue of the system you approached the project<br \/> b. A test intention that comes with test circumstances that embrace all further photos and test any<br \/> unusual functionality. For every and each test case, the output produced needs to be included.<br \/> c. A dialogue of lessons learned from the project and any improvements that can<br \/> be made<\/p>\n","protected":false},"excerpt":{"rendered":"<p>CMSC 330 Mission 1 The first programming project involves extending the Java skeleton program that it&#8217;s a long way equipped in the linked .zip file. That skeleton program shows a scene of graphic photos contained in a scene definition file. The grammar for that scene definition file is proven below: scene \u2192 SCENE IDENTIFIER number_list [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-15261","post","type-post","status-publish","format-standard","hentry","category-solutions"],"_links":{"self":[{"href":"https:\/\/academicwritersbay.com\/solutions\/wp-json\/wp\/v2\/posts\/15261","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/academicwritersbay.com\/solutions\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/academicwritersbay.com\/solutions\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/academicwritersbay.com\/solutions\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/academicwritersbay.com\/solutions\/wp-json\/wp\/v2\/comments?post=15261"}],"version-history":[{"count":0,"href":"https:\/\/academicwritersbay.com\/solutions\/wp-json\/wp\/v2\/posts\/15261\/revisions"}],"wp:attachment":[{"href":"https:\/\/academicwritersbay.com\/solutions\/wp-json\/wp\/v2\/media?parent=15261"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/academicwritersbay.com\/solutions\/wp-json\/wp\/v2\/categories?post=15261"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/academicwritersbay.com\/solutions\/wp-json\/wp\/v2\/tags?post=15261"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}