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

Aim of assessmentone important way that infants and young

Aim of assessment: One important way that infants and young children learn about their world is through their psychosocial devel- opment. This assessment item aims to provide you with an opportunity to explore the psycho ...

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. ...

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 ...

Company law assignment question -hi tech supplies pty ltd

COMPANY LAW: ASSIGNMENT QUESTION - Hi Tech Supplies Pty Ltd is a company formed by two friends, Bill and Sue who met while studying computer studies at University. The company has very little assets and Bill and Sue have ...

Growth development and ageing for exercise scientists

Growth, Development and Ageing for Exercise Scientists Assessment Task - Video Critique Instructions This assessment task will assess your ability to apply key concepts of growth, development and ageing to a series of ca ...

Importance of communicable disease surveillanceword

Importance of communicable disease surveillance. word count:300

Case - adidasquestions1 analyse the importance of using

Case - ADIDAS QUESTIONS 1. Analyse the importance of using both above-the-line and below-the-line communication for Adidas. 2. Justify how effective you feel the high cost use of sponsorship has been to Adidas? 3. Evalua ...

Question 1requiredwhat is the major environmental or

QUESTION 1 Required: WHAT is the major environmental or resource issue, HOW is it caused and WHERE is it occurring? WHAT is the main resource involved and HOW is it being impacted or developed? WHO are the primary stakeh ...

Answer the questions using volkswagen group- write on this

Answer the questions using Volkswagen Group- write on this topic Case Assignment Please select a company from among the ones listed below (see Articles for Case Assignment) or else select an organization of choice facing ...

Fever case study -elena is a 74-year-old hispanic f who was

Fever Case Study - Elena is a 74-year-old Hispanic F who was recently discharged one week ago from a local rehabilitation center after status post left hip replacement (one month ago). Negative for any complications. PMH ...

  • 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