Question

In: Mechanical Engineering

The purpose of this problem is to use graphic user interface (GUI) to interactively store grades...

The purpose of this problem is to use graphic user interface (GUI) to interactively store grades in a text file, rather than adding them manually to a script. Follow these steps to complete the program:

Step 1. Use a question dialog box and ask the user “Do you want to run this Program?” with two options for “yes” and “no”. If the user’s answer is “yes”, go to the next step, otherwise, go to Step 6.

Step 2. Create a file using fopen command to store the data.

Step 3. Use a while loop and create an input dialog box similar to that of Figure 1 inside the loop.

Step 4. Every time that the users enters the values, check whether the grade is -1 or not. If the grade is not -1, store the name, student ID, and grade in one line in the file using fprintf command. If the Student ID was shorter or longer than 7 digits, an error dialog box should appear and give an appropriate error message and display a fresh input dialog box. If the entry was correct, make sure to separate the data at each line by using horizontal tabs (this can be done by typing \t in the fprintf argument). Remember that the output of an input dialog box is a cellular array and you have to convert it into a string (by using curled brackets to access a specific element of the input dialog result) before storing it in a file.

Step 5. Close the file.

Step 6. Output a message using a message dialog box indicating that the problem is terminated. If you would like to use strcmp function, you may.

Step 7. Write the same code in a way that it stores the data in an Excel spreadsheet with proper formatting

Solutions

Expert Solution


Related Solutions

Use the below info to create a java program A GUI interface to ensure a user...
Use the below info to create a java program A GUI interface to ensure a user is old enough to play a game. Properly formatted prompts to input name, address, phone number, and age. Remember that name, address, phone number, etc. can be broken out in additional fields. Refer to the tutorial from this week’s Reading Assignment Multiple vs. Single Field Capture for Phone Number Form Input for help with this. Instructions to ensure that the information is displayed back...
Develop a JavaFX GUI application called Registration that implements a user interface for registering for a...
Develop a JavaFX GUI application called Registration that implements a user interface for registering for a web site. The application should have labeled text fields for the Full Name, User Name, Password, Student Id, and a TextAreafor About Me. Include a button labeled Send. When the Send button is clicked, your program should print the contents of all fields (with labels) to standard output using println()statements.
Using matlab: Build a graphical user interface (GUI) the will read the two corners of a...
Using matlab: Build a graphical user interface (GUI) the will read the two corners of a rectangle (from the GUI interface) and show the following: A plot of the rectangle (you should have display for it) Show the centroid (the center of the rectangle) on the graph. Calculate the area and the circumference of the triangle (you need to write a function for that). The interface should have at least the following: Four textboxes to read the ( 2 for...
*In JAVA and JavaFX please!! CSE1322 – Assignment 8 – GUI General User Interface Assignment 8...
*In JAVA and JavaFX please!! CSE1322 – Assignment 8 – GUI General User Interface Assignment 8 Objectives • Build a GUI application similar to a calculator. • Create an application that acts as a simple calculator. Create buttons for 0-9 and a text field that displays the concatenation of the current digits as they are clicked. • Add buttons for operators “+”, “-“, “*”, and “/”. • Add a final button for “=” that calculates the computed value with the...
Purpose For many users, the system is the user interface. Everyone wants a system that is...
Purpose For many users, the system is the user interface. Everyone wants a system that is easy to learn and use. It is the analyst’s responsibility to ensure that the user interface will be designed in a way to support the user’s interface needs.   In this milestone you will explore the guidelines for user interface design. The analyst must consider a variety of interface formats. These include how data gets entered into the system (input design) and how data or...
Use pseudo code to plan a programming solution for the following: A GUI interface to ensure...
Use pseudo code to plan a programming solution for the following: A GUI interface to ensure a user is old enough to play a game. See additional resources above for additional resources. Properly formatted prompts to input name, address, phone number, and age. Instructions to ensure that the information is displayed back to the user. Also, the user must be 21. So, include instructions to display an appropriate message about whether or not the user can continue. Instructions that will...
Use a for loop to ask a user to enter the grades of 5 courses. The...
Use a for loop to ask a user to enter the grades of 5 courses. The user should enter character values, e.g., A. Calculate the GPA of the user Hint: Convert the character values entered to numerals, e.g., A to 4 c programming help me please
Create in java an interactive GUI application program that will prompt the user to use one...
Create in java an interactive GUI application program that will prompt the user to use one of three calculators, label project name MEDCALC. You can use any color you want for your background other than grey. Be sure to label main java box with “MEDCALC” and include text of “For use only by students” On all three calculators create an alert and signature area for each user. The alert should be something like “All calculations must be confirmed by user...
[Linux quiz] Explain the purpose of MIME. How does it facilitate the use of a GUI?
[Linux quiz] Explain the purpose of MIME. How does it facilitate the use of a GUI?
C Programming use notes Start by asking the user how many grades are to be entered....
C Programming use notes Start by asking the user how many grades are to be entered. Then ask for each one of theses grades. Calculate the average grade and the number of failing grades (grade less than 70). Display on the screen the average grade and the number of failing grades
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT