Placeholder

CIS355A Final Exam Essay Questions

$19.00

Description

1. (TCOs 1–6) TicketsRUs needs an application to calculate ticket prices. There are three ticket prices:
Orchestra $85 each
Mezzanine $70 each
Balcony $45 each
There is also a 15% discount on matinee performances.
Your application has the GUI shown below.
With the following named components:
[table]
Component, Type, Purpose
txtNum, JTextField, Input for number of tickets
chkMatinee, JCheckBox, Check if matinee performance
radOrchestra, JRadioButton, Check for orchestra tickets
radMezzanine, JRadioButton, Check for mezzanine tickets
radBalcony, JRadioButton, Check for balcony tickets
btnCalc ,JButton, Click to calculate price
txtEach, JTextField, Displays price of each ticket
txtTotal, JTextField ,Displays total price
[/table]
Clicking the CalcPrice button should determine the price per ticket and the total price based on the user’s input and display in txtEach and txtTotal. You should make sure the number of tickets is entered and a ticket type is selected, otherwise give an error message.
The action listener for btnCalc is set up as follows.
btnCalc.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
calcPrice(); //write the code for this method
}
});
Write the calcPrice method that is called by the action listener. This class method has access to all of the GUI components. You DO NOT HAVE TO CODE THE GUI. ONLY write the code for this method which does all the work. The header for the method is:
private void calcPrice() (Points : 20)
2. (TCOs 1–6) Employees at a certain company get a yearly bonus based on years of service. The bonus is a percentage of their annual salary based on the table below.
Years of Service
Bonus Percentage
< 5 3% 5 – 14 7% 15++ 12% Create a class called Employee that can be used for this. It should have attributes of Name; Years; and Salary. Create the following methods. Default constructor to initialize all attributes Get/Set for name, years, salary Get to calculate and return bonus rate Get to calculate and return bonus amount This class will be used with the Bonus Calculator GUI shown below. With the following named components: [table] Component, Type, Purpose txtName, JTextField, Input for name txtYears, JTextField, Input for years txtSalary, JTextField, Input for salary btnCalc, JButton ,Click to calculate bonus txtBonusPercent, JTextField, Displays bonus percentage txtBonusAmount, JTextField, Displays bonus amount [/table] You DO NOT have to code the GUI. The action listener for btnCalc is set up as follows. btnCalc.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { calcBonus(); //write the code for this method } }); (Points : 20) 3. (TCOs 1–6) A trucking company has an application to track data from their trucks regarding miles driven and fuel used each month. This information is stored in a file named “trucks.txt” . This table has the following fields. [table] TruckID, Truck Number (String) Miles , Miles Driven (double) Fuel , Fuel Used (double) [/table] Format of file – note the # delimiter character between fields TruckID#miles#fuel The application has a button that is clicked to read each line of the file and calculates and displays in the console the total miles driven, total fuel used, and average miles per gallon. You DO NOT have to write a separate class to process the data. The output in the console should look like: Total miles driven by all trucks xxx Total gallons of fuel used yyy Average miles per gallon for the fleet zz.zz The class method readFile() is called by the action listener to do the work. Write the code for this method. (Points : 15) 4. (TCOs 1–6) Assume a College database has a table to keep transcript data on students. The transcript table has fields for SSN, TotalPoints, and TotalCredits. You are to design an application that allows a student to input their SSN into a textbox (txtSSN) and press a button (btnCalc). The students GPA is calculated (divide points by credits) and displayed in txtGPA. Describe the process/steps to do this. Write pseudocode/comments or code where you can. You DO NOT have to have complete working code, you need to describe the necessary steps and WHERE things need to be coded. (Points : 15) SCREENSHOTS SOLUTION PAYMENT The solution includes a single word file. Attachments [Move over files to preview content of those files] CIS355A_Final_Exam.zip (8.73 KB) Final Exam.doc Preview Final Exam.doc xx ((!xxxxxxxxxx.xxxxxxxxxx()) && (!xxxxxxxxxxxx.xxxxxxxxxx()) && (!xxxxxxxxxxxx.xxxxxxxxxx())) { xxxxxxxxxxx.xxxxxxxxxxxxxxxxx(xxxx, "xxxxxx xxxx xx xxx xxxxxxxx", "xxxxx", xxxxxxxxxxx.xxxxx_xxxxxxx); xxxxxx; } xxxxxx xxxxxxxxx = 0; if (radBalcony.isSelected()) { priceEach = 40; } else if (radMezzanine.isSelected()) { priceEach = 65; } else if (radOrchestra.isSelected()) { priceEach = 80; } txtEach.setText("$" + priceEach); double total = priceEach * numTickets; if (chkMatinee.isSelected()) { total -= total * 0.1; } xxxxxxxx.xxxxxxx("$" + xxxxx); } xxxxxxxx 2: xxxxxxx xxxx xxxxxxxxx() { xxx xxxx = xxxxxxx.xxxxxxxx(xxxxxxxx.xxxxxxx()); xxxxxx xxxxxxxxxxxxxxx = 0; Price: $19 Buy Now Checkout Added to cart Add to Cart Checkout Added to cart You May Also Like: CIS355A Final Exam Multiple Choice Questions CIS355A Week 1 Lab Developing an OOP Console Application CIS355A Week 2 Lab Developing a GUI Application CIS355A Week 3 Lab BurgersRUs Point of Sale system CIS355A Week 4 Course Project Flooring Application Analysis and Design CIS355A Week 4 Lab Stocks4U Portfolio Management System CIS355A Week 5 Lab File Processing Stocks4U Portfolio Management System CIS355A Week 6 Lab Student Management System CIS355A Week 7 Course Project Flooring Application User Manual and Application Code

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.