Create a way to make the user stop when the number of phones (array) is 10. Pop up a notification window, and disable the other buttons except for "save". The "save" button should still be functional. Submit the changes before the next class.
Added by Jordi M.
Step 1
We need to keep track of the number of phones in the array. We can do this by creating a variable that starts at 0 and increments every time a phone is added to the array. Show more…
Show all steps
Your feedback will help us improve your experience
John Incabo and 69 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Write an expression that executes the loop while the user enters a number greater than or equal to 0. Note: These activities may test code with different test values. This activity will perform three tests, with userNum initially 9 and user input of 5, 2, -1, then with userNum initially 0 and user input of -17, then with userNum initially -1. Also note: If the submitted code has an infinite loop, the system will stop running the code after a few seconds and report "Program end never reached." The system doesn't print the test case that caused the reported message. ```cpp #include <iostream> using namespace std; int main() { int userNum; userNum = 9; while (userNum >= 0) { cout << "Body" << endl; cin >> userNum; } cout << "Done." << endl; return 0; } ```
Aarya B.
In this exercise, you’ll create a form that accepts one or more scores from the user. Each time a score is added, the score total, score count, and average score are calculated and displayed. USING C# Start a new project named ScoreCalculator. Add labels, text boxes, and buttons to the default form and set the properties of the form and its controls so they appear as shown above. When the user presses the Enter key, the Click event of the Add button should fire. When the user presses the Esc key, the Click event of the Exit button should fire. Declare two class variables to store the score total and the score count. Create an event handler for the Add button Click event. This event handler should get the score the user enters, calculate and display the score total, score count, and average score, and reset the focus to the Score text box. You can assume that the user will enter valid integer values and that they will be positive. Create an event handler for the Click event of the Clear Scores button. This event handler should set the two class variables to zero, clear the text boxes on the form, and move the focus to the Score text box. Create an event handler for the Click event of the Exit button that closes the form. Test the application to be sure it works correctly.
Supreeta N.
You are working as a mobile app developer for a company and have been assigned to design the user interface for your company's mobile app. According to your boss, the user interface should look something like this. Your mobile app UI should have the following labels and textboxes: - Customer Name - Customer ID - Customer Address The mobile app UI should also contain a Submit button. The following validation should be executed as soon as the user clicks the Submit button: 1. Customer ID should be between 0-1000. If the user enters any value above 1000, then you need to display an error message. 2. Customer Name should not contain any numeric characters. If the user enters a customer name with numbers, then display an error message. 3. Customer ID, Name, and Address are required fields. If the user does not enter any of the values, then display the required field validation error message. Once you build the UI, then create an additional screen that shows the following things: - Customer OrderID(Label): __________ - Order_Name(Label): __________ - Order_Quantity: __________ - Order_FulfilledBy: __________ You need to submit the following items in a zip file as part of the submission: - Android Project - Output screenshots
Akash M.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
18,000,000+
Students on Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD