Programming

1.      Plan your logic before working on the project and review the syntax you will use in the project. Think about how you want the output to be displayed to the user. You might want to tell the user what the program does and what type of input you expect from the user. You interface structure could do this. Select names of the variables you will use in the program.

2.      Create a JAVA project Using NetBeans IDE. And have the code window open to write the project code. Here are some instructions on creating the project.

·         Declare variables to hold input information.

·         Using the JOptionPane Concept. (Some programs might need just the Scanner.

·         Ask the user to enter some information requested and save the response to a variable. This could look like: name = JOptionPane.showInputDialog (“Enter your name”).

·         Use line spacing (i.e. n) to separate lines of output to make it easy for the user to read the information and have proper line length.

3.   Documentation: All lines of code must be documented.

·         Use the syntax to designate lines in code as comments (//)

·         These comments can be at the end of a line of code or in a group definition at the beginning of a section of code. All methods and function need a group heading document.

4.   Run the program using Run Project menu item.Debug the code, making sure all calculations are correct and the line spacing is suitable for readability.

Assignment

A movie theater only keeps a percentage of the revenue earned from ticket sales. The remainder goes to the movie company. Create an application that calculates and displays the following figures for one night’s box office business at a theater:

Create a GUI application that allows the user to enter the following data into text fields:

·         Price per adult ticket

·         Number of adult tickets sold

·         Price per child ticket

·         Number of child tickets sold

The application should calculate and display the following data for one night’s box office business at the theater:

  • Gross revenue for adult tickets sold. This is the amount of money taken in for all adult tickets sold
  • Net revenue for adult tickets sold. This is the amount of money from adult ticket sales left over after the payment to the movie company has been deducted.
  • Gross revenue for child tickets sold. This is the amount of money taken in for all child tickets sold.
  • Net revenue for child tickets sold. This is the amount of money from child tickets sales left over after the payment to the movie company has been deducted.
  • Total gross revenue. This is the sum of gross revenue for all adult and child tickets sold.
  • Total net revenue. This is the sum of net revenue for adult and child tickets sold.

Assume the theater keeps 20% of the box office receipts. Use a named constant in your code to represent this percentage.

Use the following set of test data to determine whether the application is calculating properly.

Leave a Comment

Your email address will not be published. Required fields are marked *

programming

  • Q1 Sequential coding: @ 50 points = 25 + 25Scenario: A client wants an estimate from her painter of the cost to paint one exterior wall of her condo. The wall is 20 ft long and 10 feet high. The painter says the paint she wants will cost $25 per gallon and each gallon will cover 125 ft**2. What would be his estimate for this job ? As part of his estimate he will print out how many gallons needed ( fractions are acceptable), as well as the total cost.A) Pseudocode @25 pts:Write apseudo code solution to this question that includes the following:a) a module for variable initializationb) a module that does the required calculationc) a module that outputs the result ( a print in this case)(Note: a ‘module’ here simply means a list of variablesKeep in mind that you will need to give your variables ‘domain’ terminology names. That is, make your names transparent to your client, like translating 20 ft long into a pseudocode variable like:length = 20 ft , alternatively, you might also say ‘wallLength’ = 20 ft( also include the correct units for your variables as above)B) PyCode @25 pts:Write the Python code to effect this task using the variables you constructed in partA.Cut and paste in the code and your results into your word doc.Include the variable units in a comment following the variablee.g, length = 20 #ftRun your Python code and cut and paste your code and your results into the word document.
  • TODO: The filepicker assumes it is inside a list.. faking it out but maybe we should actually be inside another tag (datacollection?) even though we can’t use that here depending on how we’re invoked
    • Attach File

50 points  

QUESTION 2

  • Scenario: Jo expects her store to increase its profits by 56% next year.Currently Jo has 10000 in profita. Write the algebraic ( that is, without numbers) equation to express her total end of year profit. Use appropriate domain terminology to create your variables. Think Domain Driven Design!b. write the algebraic Python equation using the variables of part a. Note I am not asking you to run the code but  just to write  down the equation(s)c. write the numeric result of the total end of year profit, show the numeric equation

15 points  

QUESTION 3

  • Scenario:Place  parentheses to indicate precedence and grouping.a. A/B/C*D+Cb. A/B^3*4 /Dc. A ^ 3 ^ 2 * 5

15 points  

QUESTION 4

  • Given the api of a module Calc(X, Y) where part of the api says that X, Y must be numeric.Explain the difference between X, Y and a, b in their usage ? How would you characterize these variables and why?a = 10b = 30 Calc( a, b)

Leave a Comment

Your email address will not be published. Required fields are marked *

Is this question part of your Assignment?

Get expert help

Girl in a jacket


We are a team of academic consultants with extensive experience in writing academic papers for college students in the US, Canada, UK, AU, and other parts of the world.

We help students with both technical and non-technical assignments across all majors & academic disciplines.

Unlike what our name suggests, we research and draft everything word for word. We do not use AI or any rewriting tool! We provide Turnitin reports for AI & Turnitin alongside every paper.

Need help? Send us your assignment now!

description here description here description here