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

  Evaluating an ecommerce website

Create a check list that contains key point for evaluating an ecommerce website - Write a short, reflective report about website

  Gpc and runtime magic quotes

Create a script that lets you know whether Zeus or Helios has the GPC and Runtime Magic Quotes turned on or off. The output should have appropriate labels that define what output signified and should display 'ON' or 'OFF' depending on the setting.

  Creating functions through conditional operator

Use the conditional operator and the cal_days_in_month function, determine the number of days in the current month and output to browser whether it is normal month or a leap month.

  Web development projects with database

Since the vast majority of web-development projects involve a database, do you think that computational activities should be performed there, or do you think they belong in the XML page or stylesheet?

  Comparing shelf software packages

Required assistance with comparing and contrasting two main off the shelf software packages that could be implemented in an organization.

  Web based scams

Web phishing, pharming and vishing are popular web based scams. Talk about currently used tools and recommended measures to defeat this kind of attacks efficiently?

  Explanation of contextual links

The most powerful hypertext capabilities is the the contextual link. Wikipedia . com is a great example of a site that utilizes contextual links.

  How architectural and protocol changes occur

Discuss how architectural and protocol changes happen, the administrative organization that oversees the technical development of the Internet,

  Traditional approaches for training professionals

Webinars and other web conferencing techniques have proved most beneficial for the provision of affordable quality corporate training.

  Internet for business

Discuss how can a business use the Internet and give at least three examples with web links demonstrating your answer.

  It influences the behavior of organizations

Information technology influences the behavior of organizations. Name one effect of Information technology implementation and long-term usage you suppose having a positive contribution and one having a negative consequence.

  Importance of a guided navigation system

Explain the use and importance of a guided navigation system and shopping cart for a website designed for e-commerce and business purpose.

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