Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Case Study Expert

Project 1

Instructions

The first programming project involves writing a program that parses, using recursive descent, a GUI definition language defined below and generates the GUI that it defines. The grammar for this language is defined below:

gui ::=
Window STRING '(' NUMBER ',' NUMBER ')' layout widgets End '.'
layout ::=
Layout layout_type ':'
layout_type ::=
Flow |
Grid '(' NUMBER ',' NUMBER [',' NUMBER ',' NUMBER] ')'
widgets ::=
widget widgets |
widget
widget ::=
Button STRING ';' |
Group radio_buttons End ';' |
Label STRING ';' |
Panel layout widgets End ';' |
Textfield NUMBER ';'
radio_buttons ::=
radio_button radio_buttons |
radio_button
radio_button ::=
Radio STRING ';'

In the above grammar, the red symbols are nonterminals, the blue symbols are tokens and the black punctuation symbols are BNF metasymbols. Among the tokens those in title case are keywords. The character literals are punctuation tokens.

Below is an explanation of the meaning of some of the symbols in the above productions that should help you understand the actions that are to be performed when each of the productions is parsed:

In the window production the string is name that is to appear in the top border of the window and the two numbers are the width and height of the window

Languages (2165) - UMUC Learning Management System

In the production for layout_type that define the grid layout, the first two numbers represent the number of rows and columns, and the optional next two the horizontal and vertical gaps

In the production for widget that defines a button, the string is the name of the button
In the production for widget that defines a label, the string is text that is to be placed in the label
In the production for widget that defines a text field, the number is the width of the text field
In the production for radio_button, the string is the label of the button

You parser should properly handle the fact that panels can be nested in other panels. Recursive productions must be implemented using recursion. Syntactically incorrect input files should detect and report the first error.

Below is an example of an input file:

Window "Calculator" (200, 200) Layout Flow:

Textfield 20;
Panel Layout Grid(4, 3, 5, 5):
Button "7";
Button "8";
Button "9";
Button "4";
Button "5";
Button "6";
Button "1";
Button "2";
Button "3";
Label "";
Button "0";
End;
End.

The above input file should produce the GUI shown below:

You may use any programming language of your choice, examples are Java, or C++, or C# etc.

Submit the following as the task requirement:

1. Write up, or explanation on your approach. Write a paragraph, or two on this.

2. Write up, or explanation on any assumption that you have made. Write a paragraph, or two on this.

3. Write up, or explanation on functions that you were not able to implement. Explain challenges faced, and effort you made to resolve it. Write a paragraph, or two on this. Consider this your way to defend yourself and explain the effort made.

4. Write up on lessons learned. Write a paragraph, or two on this.

5. Write up on ways to improve it. Improvement could be something you could have done different, but was not able to do because of scope, or time did not permit, functions that you were not able to implement and the reason for not doing so, a different way of approaching the problem etc. Write a paragraph, or two on this.

6. Include the source code that you have written. Copy and paste it in the MS Word document.

7. Write up test conditions that you have tested. If you have tested for any positive condition (conditions that pass the program), or negative test (conditions that will make the program not perform), explain those scenarios.

8. Include screen shots of user interfaces generated while you tested the program. For example, when you run the program, you will receive GUI output, or console output. Include screen shot of each test run of the GUI output to support successful running of the program.

In a single MS Word file, include:

1. Above answers, number your answers please.
2. Include relevant screen shots showing test runs
3. Copy and paste of the source code that you have written

Name the MS Word document as lastname_firstname_project1 and upload that single MS Word document in the submission area.

Also, upload separate file (e.g. a zip file ) containing your source code in the submission area. For example, if you wrote the code in Java, only include the .java files, do not include .class files. It is understood that you are doing both upload of the source code and copy and paste of it MS Word file.

You may use StringTokenizer class, if you are using Java. Radio buttons are just those calculator buttons with number 1, 2, 3 etc. Those numbers in calculator are defined as buttons. As a user would press a button, it will get displayed on the text box on the top. Understand that it is NOT a full blown implementation of a calculator in this project 1. Project 1 only lays out the foundation of the calculator. For that matter, we do not implement buttons as "Add", "Subtract" etc. in Project 1 yet. We leave them for project 2. The input will be read from keyboard only, not from any input file.

Case Study, Writing

  • Category:- Case Study
  • Reference No.:- M91856437
  • Price:- $40

Priced at Now at $40, Verified Solution

Have any Question?


Related Questions in Case Study

Task 1 just the factsinstructions- read the statement below

Task 1: Just the Facts Instructions - Read the statement below carefully. - Conduct some research and write down your answers in the space provided. An Australian Culture Overview Australia is a vast island continent sit ...

Rationalesafety and risk management are critical aspects of

Rationale Safety and Risk Management are critical aspects of a workplace and breaches are punishable under Work Health and Safety Law. This task encourages students to analyse and conceptualise responses to safety breach ...

This case study relates to the firestone tyre company in

This case study relates to the Firestone Tyre Company in the United States in 2000, and refers to the now famous tyre recall that took place during August of that year. You have been provided with case study details in t ...

Assignment - media evolution analysisassignment details

Assignment - Media Evolution Analysis Assignment details: Following our lectures and discussions in class, choose one media technology or phenomenon and research its historical trajectory. In particular, you should focus ...

Safety management planwrite and submit for assessment a

Safety Management Plan Write and submit for assessment a Safety Management Plan for an organisation of your choice. There are many models that you can use to base your Safety Management Plan on. Some models include the m ...

Importance of communicable disease surveillanceword

Importance of communicable disease surveillance. word count:300

Clapham rail disastercritical analysis of disaster

Clapham Rail Disaster Critical analysis of disaster event Critical analysis of disaster response Recommendations for improving the effectiveness of response Linkage of disaster response to professional role

This paper will consist of an ethical analysis of the bp

This paper will consist of an ethical analysis of the BP oil spill. There is one source provided to start this research, cite at least four other sources. This source has a particular case because it has an interesting a ...

Assignment - solve the given case using below stepscase -

Assignment - Solve the given case using below steps. Case - The South African Wine Industry in 2016: Where Does It Go from Here? Steps - 1. Identify the Article/Topic/Situation. 2. Gather Info (Company website). 3. Sort. ...

Assessment task - reflectiona reflection on growth

Assessment Task - Reflection A reflection on growth, development and ageing in exercise science careers Unit Learning Outcome (s) assessed This assessment task will assess your ability to apply key concepts of growth, de ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As