Define the grid layout

Assignment Help Web Project
Reference no: EM131103050

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.

Reference no: EM131103050

Questions Cloud

Discuss how each of these potential changes : Discuss how each of these potential changes would affect the relative volume of leasing versus conventional debt in the U.S. economy.
Summarize the article including what industry it pertains to : Summarize the article, including what industry it pertains to and other important facts. Describe 3 ways you would reduce negligent training.
Acquisition of a private company by a public company : Where could you find positive and negative information about the acquisition of a private company by a public company?
Complete the function drawtriangle : Complete the function drawTriangle in the above program as well as printADU function - Complete the draw program
Define the grid layout : 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.
What other means are there of communicating information : According to CON 1, ". . . financial reporting includes not only financial statements but also other means of communicating information." What other means are there of communicating information?
Why some restrictions should be imposed : Suppose there were no IRS restrictions on what constituted a valid lease. Explain, in a manner that a legislator might understand, why some restrictions should be imposed. Illustrate your answer with numbers.
Discuss the pros and cons of capitalizing leases : This raised the question of whether or not both the lease obligation and the asset involved should be capitalized and shown on the balance sheet. Discuss the pros and cons of capitalizing leases and related assets.
Find the maximum price : Use the variable-growth DVM and a required rate of return of 9% to find the maximum price you should be willing to pay for this stock.

Reviews

Write a Review

Web Project Questions & Answers

  Locate the web site for barrister winery

You must save the worksheet document again before you attempt to submit it via the Assignments tool.This assignment will be due February 21 and will be graded.

  How to create a dynamic dropdown list in html

How to Create a dynamic Dropdown list in html with php and getting data from a MySQL server?

  Create the application and web site for a business

Create the application and/or a web site for a business (choice is yours). You must use five (5) programming techniques discussed in this class.

  Develop an e-commerce website prototype for a small business

Develop an e-commerce website prototype for a small business enterprise in the NEUROSCIENCE INDUSTRY (IMPORTANT: no other industry may be chosen for this assignment).

  Draw one data flow diagram depicting the logical equivalent

Draw one data flow diagram depicting the logical equivalent for the business process description provided: You are assigned the role to develop a new system based on the project case study.

  Difference between web applications and a static web site

What is the difference between Web Applications and a static web site and what are the main functions of Web Application Pool Administration?

  Create a website that showcases the skills

You will create a website that showcases the skills you have gained throughout your psychology program. Your website will consist of the following elements: a homepage, a literature review, expert opinions, résumés, a case study, and a list of pe..

  Human factors to consider when building a web site

What are some human factors to consider when building a Web site and what are some technical factors to consider when building a Web site?

  Linking to super encyclopedia or dictionary

It is possible to link every term and item in a website page to one super encyclopedia or dictionary so that you could expand on its definition or content?

  Computer engineering design project

Computer Engineering Design Project

  Crearte web page can use embedded css or separate css file

Create a page named "index.html" as the following figure. The page should be with the formatted, styles, colors as in the figure. You can use embedded CSS or separate CSS file.

  Creating web page named taxes.html

Build a Web page named taxes.html and enter the Income Tax function into the HEAD. In the BODY of the page, prompt user to enter values representing his or her income and itemized deduction.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd