Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Help needed please, can you resolve this java project I provide the instruction and the java codes sources! please explain each step end give explanation.

Help needed please, can you resolve this java project I provide the instruction and the java codes sources! please explain each step end give explanation. Thanks

 

The first programming project involves extending the Java skeleton program that it is provided in the attached .zip file. That skeleton program displays a scene of graphic images contained in a scene definition file. The grammar for that scene definition file is shown below: 

scene → SCENE IDENTIFIER number_list images END '.' 

images → image images | image 

image → right_triangle | rectangle 

right_triangle → 

        RIGHT_TRIANGLE COLOR number_list AT number_list HEIGHT NUMBER WIDTH NUMBER ';' 

rectangle → 

        RECTANGLE_ COLOR number_list AT number_list HEIGHT NUMBER WIDTH NUMBER ';' 

number_list → '(' numbers ')' 

numbers → NUMBER | NUMBER ',' numbers 

In the above grammar, terminal symbols are upper case names or character literals shown in blue and nonterminal symbols are lower case names shown in red. EBNF metacharacters are shown in black. Tokens can be separated by any number of spaces. Identifiers and keywords are strings of alphabetic characters. Identifiers are case sensitive. Numbers are unsigned integers. 

That program reads in the scene definition file that defines the image objects in a scene and creates those objects, inserts them into the scene and displays that scene.

 You are to modify the program so that it will parse and display the additional images defined by the expanded grammar shown below with the additions to the grammar highlighted in yellow: 

scene → SCENE IDENTIFIER number_list images END '.' 

images → image images | image

 image → 

     right_triangle | rectangle | parallelogram | regular_polygon | isosceles | text 

right_triangle → 

RIGHT_TRIANGLE COLOR number_list AT number_list HEIGHT NUMBER WIDTH NUMBER ';' 

rectangle → 

RECTANGLE_ COLOR number_list AT number_list HEIGHT NUMBER WIDTH NUMBER ';' 

parallelogram → PARALLELOGRAM COLOR number_list AT number_list number_list OFFSET NUMBER ';' regular_polygon → 

REGULAR_POLYGON COLOR number_list AT number_list SIDES NUMBER RADIUS NUMBER ';' 

isosceles → I

SOSCELES COLOR number_list AT number_list HEIGHT NUMBER WIDTH NUMBER ';' 

text → 

TEXT COLOR number_list AT number_list STRING ';'

 number_list → '(' numbers ')' 

numbers → NUMBER | NUMBER ',' numbers 

The UML diagram for the whole project is shown below...

 

Please see the link to access the instructions (Pdf doc name Project 1 (1) and the Java skeleton programs  

https://drive.google.com/drive/folders/1PSfPMeNuVgFVBVoAlMP1-i5Hy_Voc9gW?usp=drive_link 


Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Applying Communication Theory For Professional Life A Practical Introduction

Authors: Marianne Dainton, Elaine D. Zelley

4th Edition

150631547X, 978-1506315478

More Books

Students also viewed these Algorithms questions