Concept explainers
The TidBit Computer Store (Chapter 3, Project 10) has a credit plan for computer purchases. Inputs are the annual interest rate and the purchase price. Monthly payments are 5% of the listed purchase price, minus the down payment, which must be 10% of the purchase price.
Write a GUI-based program that displays labeled fields for the inputs and a text area for the output. The program should display a table, with appropriate headers, of a payment schedule for the lifetime of the loan. Each row of the table should contain the following items:
- The month number (beginning with 1)
- The current total balance owed
- The interest owed for that month
- The amount of principal owed for that month
- The payment for that month
- The balance remaining after payment
The amount of interest for a month is equal to ((balance * rate) / 12) / 100. The amount of principal for a month is equal to the monthly payment minus the interest owed.
Your program should include separate classes for the model and the view. The model should include a method that expects the two inputs as arguments and returns a formatted string for output by the GUI.
Trending nowThis is a popular solution!
Step by stepSolved in 4 steps with 2 images
- Computer Science for Java Write a GUI program in the language(Java) you have chosen for your SOS project. The GUI of your programmust include text, lines, a check box, and radio buttons. While you are recommended to consider theGUI for the SOS game board, it is not required. In this assignment, any GUI program of your own workis acceptable.Attach here (1) the screenshot of your program execution and (2) the source code of your program.arrow_forwardImplement a graphical application that displays a list of courses. Briefly, this GUI will take the inputs (i.e., course information), store them in an array list, and display course information in the output area. Figure 1 shows the layout ofthe CourseDisplay GUI. You should have three Java files: 1. CourseDisplayFrame class that extendsJFrame class (The main part of your program). 2.CourseDisplayViewer class, which contains the main method where a CourseDisplay object will be created, and the GUI will pop up (Suggested frame width of 450, and frame height of 400). 3.Course class, which is the class that models the Course objects (This file will be given to you). In your CourseDisplayFrame class file, you should have the followings: •Input area: –A text label and a text field (suggested width of 30) for course code; –A text label and a text field (suggested width of 30) for course name; –A text label and a text field (suggested width of 30) for course credit; –A text label and a text…arrow_forwardGive an example of a program that creates a GUI with at least one button and several textfields. Some of the textfields should be for input and others for output. Make the output textfields uneditable. When the button is clicked, the input fields should be read, some calculation performed and the result displayed in the output textfield(s).arrow_forward
- Imagine that you own a flower store and you need to display a menu of all the item categories, items and prices you sell for your customers. Display the prices for each product and category. The flowers are {"Rose", "Carnation", "Tulips", "Sunflowers"}, the price in order are {1.15, 1.5, 2.5, 2.75} the second category is vase sizes, {"Small", "Medium", "Large", "XLarge"}, the prices in order are {1.25, 2.5, 3.75, 4.5}. The last category is add ons, {"Teddy Bear" , "note", "ballon", "choclates"}. The prices are in order {10.0, 2.5, 5.75, 8.75} The list of products and the list of prices should be stores in 2 separate arrays. Create a method "display" that accepts 2 arrays as parameters and displays the product and the prices in receipt form. Create another method "sum" that displays the total for each category.arrow_forward3. For this question, you will need to design a simple interface for a microwave without any digital display. The microwave has only FIVE functions: START/STOP Microwave power mode (LOW/MED/HIGH) Microwave heating time for up to 30 minutes Open door Overheat warning (a) Sketch an interface design (with appropriate annotations on its usage) that includes approximately designed menu interface for the five functions above.arrow_forwardTHIS NEEDS TO BE DONE IN C#!! The Tourtise and The Hair In this lab, we will be simulating the classic race of the tourtise and the hare. The race will take place on two paths of 70 tiles, which spans from left to right. The path will have two lanes, one for each animal. The path will be represented as an array of 70 characters, where each character will be the following: · A dash(i.e, “-“), which represents an empty tile. · An “h”, which represents the hare on the hare lane. · A “t”, which represents the tourtise on the tortise lane. All tiles will be “empty” (i.e. set to the dash) with the exception of the tiles that are occupied by the animals. As the animals move, the previous tile the animal was on will be set to empty, and the new tile will be changed to either “h” or “t”. Tile 70 will be the finishing tile, and the first animal to that tile will be declared the winner of the race. We will use randomization to determine how far each animal will move. Since this race will be…arrow_forward
- An interesting GUI component in Java is the Slider. Indeed, sliders allow a user to specify a numeric value within a bounded range.Write a program in Java using sliders to simulate the measurement of the temperature in Celsius using a digital thermometer. The following must be achieved: Design the thermometer using an appropriate shape and include the slider inside the shape with tick marks. Use proper layout managers and containers. The thermometer will measure temperatures between -20 oC and 110 oC upon sliding the GUI slider component. The temperature will be displayed in a text field or label. Using another label, a message will be displayed when the temperature reaches a certain value. For example, at -20 oC, the message “It’s ice cold” is displayed, at +10 oC, the message “It’s quite cold” is displayed, at +35 oC, the message “It’s hot” is displayed, etc.arrow_forwardTrue or False An interface must be instantiated before it can be used.arrow_forwardA software company sells a package that retails for $99. Quantity discounts are given according to the following table: Quantity Discount 10-19 10% 20-49 20% 50-99 30% 100 or more 40% Write a GUI program that asks the user to enter the number of packages purchased. The program should then display the amount of the discount (if any) and the total amount of the purchase after the discount. A successful test run of the program for different inputs is as shown below:arrow_forward
- Write some C++ code to sort an array of predefined data types using a template function.arrow_forwardfinal big report project for java. 1.Problem Description Student information management system is used to input, display student information records. The GUI interface for inputing ia designed as follows : The top part are the student imformation used to input student information,and the bottom part are four buttonns, each button meaning : (2) Total : add java score and C++ score ,and display the result; (3) Save: save student record into file named student.dat; (4) Clear : set all fields on GUI to empty string; (5) Close : close the winarrow_forwardcreate a simple game of your choice in java. Requirements must include: 1. There will need to be a game window implemented as a JFrame.2. Your game must provide instructions to the player.3. You must have at least two different visual elements (buttons, labels, text fields, etc.) – at a minimum!4. There must be a way for the user to interact with the game that causes some visual elements to change their appearance.For example, clicking on a button that represents a playing card could flip the card over to show its value, or correctlytyping in the answer to a riddle could cause a smiley face to appear.5. Your game should have some sort of score or goal. The level of success/total points should be displayed.6. Be sure to design your game using good object-oriented coding principles. Make appropriate use of collections like arrays or ArrayLists and loop over them to avoid unnecessary code repetition. If relevant, consider storing data needed by your game in a file so that it can be…arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education