-56%

CIS 355A CIS355A CIS/355A ENTIRE COURSE HELP – DEVRY UNIVERSITY

$119.99$275.00

CIS 355A CIS355A CIS/355A ENTIRE COURSE HELP – DEVRY UNIVERSITY

Course Description: Guide Business Systems Programming I

Building on analysis, programming and database skills developed in previous courses, this course introduces students to fundamental principles and concepts of developing programs that support typical business processing activities and needs such as transaction processing and report generation. Students develop business oriented programs that deal with error handling, data validation and le handling. Java is the primary programming language used.

Description

CIS 355A CIS355A CIS/355A ENTIRE COURSE HELP – DEVRY UNIVERSITY

Course Description: Guide Business Systems Programming I

Building on analysis, programming and database skills developed in previous courses, this course introduces students to fundamental principles and concepts of developing programs that support typical business processing activities and needs such as transaction processing and report generation. Students develop business oriented programs that deal with error handling, data validation and le handling. Java is the primary programming language used.

CIS 355A CIS355A CIS/355A ENTIRE COURSE HELP – DEVRY UNIVERSITY

CIS355A Final Exam

Question 1 (4 pts)
(TCOs 1–6) The column names that are displayed in a JTable can be specified by using the _____ method of the DefaultTableModel.
 .formatColumns
 .setColumns
 .setColumnNames
 .setColumnIdentifiers

Question 2 (4 pts)
(TCOs 1–6) What is the output of the code below?

1
2
double num = 56.4321;
System.out.printf("%.2f", 56.4321);

 %.2f
 %.2f56.4321
 56.43
 56.4321

Question 3 (4 pts)
(TCOs 1–6) The signature of a method consists of ___
 method name and parameter list.
 return type
 method name.
 parameter list.

Question 4 (4 pts)
(TCOs 1–6) What is the representation of the third element in an array called?
 a(2)
 a[2]
 a[3]
 a(3)

Question 5 (4 pts)
(TCOs 1, 2, and 6) A key part of enabling the JVM to locate and call method main to begin the app’s execution is the _____ keyword, which indicates that main can be called without first creating an object of the class in which the method is declared.
 class
 private
 static
 public

Question 6 (4 pts)
(TCOs 1–6) Invoking _____ removes all elements in an ArrayList x.
 x.delete()
 x.clear()
 x.empty()
 x.remove()

Question 7 (4 pts)
(TCO 1, 4, and 6) The maximum number of radio buttons that can be selected within a ButtonGroup is
 1
 2
 5
 all

Question 8 (4 pts)
(TCOs 1–6) Which statements are most accurate regarding the following classes?

1
2
3
4
5
6
7
8
class A {
private int i;
protected int j;
}
class B extends A {
private int k;
protected int m;
}

 An object of B contains data fields j, m.
 An object of B contains data fields j, k, m.
 An object of B contains data fields k, m.
 An object of B contains data fields i, j, k, m.

Question 9 (4 pts)
(TCOs 1–6) Suppose ArrayList x contains two strings [Beijing, Singapore]. Which of the following methods will cause the list to become [Beijing, Chicago, Singapore]?
 x.add(“Chicago”)
 x.add(2, “Chicago”)
 x.add(0, “Chicago”)
 x.add(1, “Chicago”)

Question 10 (4 pts)
(TCOs 1, 5, and 6) The StringTokenizer method used to return the next field based on the delimiter character specified is
 nextField.
 nextToken.
 Token.
 Field.

Question 11 (4 pts)
(TCOs 1–6) The title of a JFrame can be set by using which statement in the constructor of your class that extends JFrame?
 super(“Title here”);
 setFrameTitle(“Title here”);
 setTitleFrame(“Title here”);
 JFrame.super(“Title here”);

Question 12 (4 pts)
(TCOs 1, 5, and 6) Which type of exception occurs when creating a FileReader object for a nonexistent file?
 EndOfFile
 FileNotFound
 FileNotFoundException
 FileNotExistException

Question 13 (4 pts)
(TCOs 1–6) What layout manager should you use so that every component occupies the same size in the container?
 any layout
 a FlowLayout
 a BorderLayout
 a GridLayout

Question 14 (4 pts)
(TCOs 1–6) The event handler (e.g., actionPerformed) is a method in
 both source and listener object.
 the EventObject class.
 a listener object.
 a source object.

Question 15 (4 pts)
(TCOs 1–6) The _____ method of JOptionPane is used to retrieve input from a user using a dialog box.
 showInputDialog
 showInput
 getInputDialog
 getInput

Question 16 (4 pts)
(TCOs 1, 4, and 6) A _____ component can contain one or more JMenu components.
 JMenuItem
 JMenuBar
 FileMenu
 BarMenu

Question 17 (4 pts)
(TCOs 1–6) Suppose you wish to provide an accessor method for a double instance variable named percent, what should the signature method be?
 public static void getPercent()
 public double getPercent()
 public int getPercent()
 public void getPercent()

Question 18 (4 pts)
(TCOs 1, 4, and 6) Each tab of a JTabbedPane is assigned an index; the first tab has an index of
 -1.
 0.
 1.
 2.

Question 19 (4 pts)
(TCOs 1–6) Which statement is false?
 You must code a default constructor for every class.
 If a class’s constructors all require arguments and a program attempts to call a no-argument constructor to initialize an object of the class, a compilation error occurs.
 A constructor can be called with no arguments only if the class does not have any constructors or if the class has a public no-argument constructor.
 A constructor cannot have a return type.

Question 20 (4 pts)
(TCOs 1–6) A method that is associated with an individual object is called
 an object method.
 an instance method.
 a class method.
 a static method.

Question 21 (4 pts)
(TCOs 1, 5, and 6) If the database driver is not loaded, invoking what method of the Class class will throw a ClassNotFoundException?
 LoadDriver
 forName
 LoadClass
 forClass

Question 22 (4 pts)
(TCOs 1–6) _____ is invoked to create an object.
 A method with a return type
 A method with the void return type
 A constructor
 The main method

Question 23 (4 pts)
(TCOs 1–6) Which of the following statements is true regarding the following code assuming a proper database connection has been made and the statement object properly created?

1
2
3
ResultSet resultSet = statement.executeQuery("select firstName, lastName from Student");
resultSet.next();
System.out.println(resultSet.getString(1));

 resultSet.getString(1) returns the lastName field in the result set.
 If the SQL SELECT statement returns no result, resultSet is null.
 resultSet.getString(1) returns the firstName field in the result set.
 The program will have a runtime error, because data from resultSet objects must always be retrieved in a loop.

Question 24 (4 pts)
(TCOs 1–6) Suppose that your program accesses a MySQL database. Which of the following statements is false?
 If the database is not available, the program will have a runtime error when attempting to create a connection object.
 If the driver for MySQL database is not in the classpath, the program will have a runtime error, indicating that the driver class cannot be loaded.
 If the driver for MySQL database is not in the classpath, the program will have a syntax error.
 If the database connection cannot be made, a SQLException occurs.

Question 25 (4 pts)
(TCOs 1–6) Suppose a prepared statement is created as follows.

1
2
PreparedStatement ps = conn.prepareStatement
("insert into Student (fName, mi, lName) values (?, ?, ?)");

To assign the value John to the first parameter of this query, use
 ps.setString(1, “John”);.
 ps.set (1, “John”);.
 ps.setString(0, “John”);.
 ps.set (0, “John”);.

Question 26 (4 pts)
(TCOs 1–6) Which of the following statements is used to create an object to write to a file named out.dat?
 BufferedWriter outfile = new BufferedWriter(FileWriter(“out.dat”));
 BufferedWriter outfile = new BufferedWriter (new File(“out.dat”));
 BufferedWriter outfile = new BufferedWriter (new FileWriter(“out.dat”));
 BufferedWriter outfile = new BufferedWriter (“out.dat”);

Question 27 (4 pts)
(TCOs 1–6) Which statement is used to create a file object that will append data to an existing file?

1
BufferedWriter salesdata =

 new BufferedWriter(new FileWriter(“out.dat”, false);.
 new BufferedWriter(new FileWriter(“out.dat”, true);.
 new BufferedWriter(new FileWriter(“out.dat”);.
 new BufferedWriter(new FileWriter(“out.dat”, append);.

Question 28 (4 pts)
(TCOs 1–6) What happens if the file test.dat does not exist when you attempt to compile and run the following code?

1
2
3
4
5
6
7
8
9
10
11
12
import java.io.*;
class Test {
public static void main(String[ ] args) {
try {
BufferedReader infile = new BufferedReader(new FileReader("test.dat"));
String mytext = infile.readLine();
}
catch(IOException ex) {
System.out.println("IO exception");
}
}
}

 The program compiles, but throws IOException because the file test.dat doesn’t exist. The program displays IO exception.
 The program does not compile because infile is not created correctly.
 The program does not compile because readLine() is not implemented in BufferedReader.
 The program compiles and runs fine, but nothing is displayed on the console.

Question 29 (4 pts)
(TCOs 1–6) Result set meta data are retrieved through
 a Statement object.
 a Connection object.
 a ResultSet object.
 a PreparedStatement object.

Question 30 (4 pts)
(TCOs 1–6) Clicking a JCheckBox object generates _____ events.
 ComponentEvent
 ContainerEvent
 ActionEvent
 JCheckBoxEvent

Question 31 (4 pts)
(TCOs 1–6) The method _____ gets the contents of the text field txtName.
 txtName.findString()
 txtName.getText(s)
 txtName.getString()
 txtName.getText()

Question 32 (4 pts)
(TCOs 1–6) The method _____ adds a text area jta to a scrollpane jScrollPane.
 jScrollPane.insert(jta)
 jScrollPane.add(jta)
 jScrollPane.addItem(jta)
 None of them.

Question 33 (4 pts)
(TCOs 1–6) Which of the following statements is false?
 You can create a text field with a specified text.
 You can disable editing on a text field.
 You can specify the number of rows in a text field
 You can specify the number of columns in a text field.

Question 34 (4 pts)
(TCOs 1–6) The item that is clicked in a JList can be retrieved using the _____ method of JList.
 getValue
 getSelectedValue
 getValueSelected
 getData

Question 35 (4 pts)
(TCOs 1–6) The _____ method of a radio button returns true if that button is “on”.
 isSelected()
 getSelected()
 Selected()
 RadioSelected()

Question 36 (20 pts)
(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:

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

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.

1
2
3
4
5
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:

1
private void calcPrice()

Question 37 (20 pts)
(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 ServiceBonus Percentage
< 53%
5 – 147%
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:

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

You DO NOT have to code the GUI.
The action listener for btnCalc is set up as follows.

1
2
3
4
5
btnCalc.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
calcBonus();  //write the code for this method
}
});

Question 38 (15 pts)
(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.

TruckIDTruck Number (String)
MilesMiles Driven (double)
FuelFuel Used (double)

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.

Question 39 (15 pts)
(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.

CIS 355A CIS355A CIS/355A ENTIRE COURSE HELP – DEVRY UNIVERSITY

CIS355A Week 6 Practice

Make an address book application that stores your contacts in a database.
First, set up a database with at least one table for the contacts. The fields should include the contact’s name, phone number, and email address.
Then create a JTabbedPane GUI with two tabs: an Add tab that lets the user enter the information for a contact and add it to the database, and a Display tab that shows all of the contacts in the database.

CIS 355A CIS355A CIS/355A ENTIRE COURSE HELP – DEVRY UNIVERSITY

CIS355A Week 5 Practice

Write a program to display shapes and colors that the user specifies through a GUI. The GUI should contain a JPanel on which the shapes will be drawn. The program should allow the user to select a shape and a color using whatever GUI components you think are appropriate. For
example, in my version, I selected the shape and color from JComboBoxes, and then had a JButton to make the program draw the shape.

CIS 355A CIS355A CIS/355A ENTIRE COURSE HELP – DEVRY UNIVERSITY

CIS355A Week 4 Course Project Student Assignment Grading Analysis and Design

You are a software development in a software development company called “Academic Support Technologies” (AST) and your company is attempting to complete the prototype of a grading application that they purchased from another development firm. However, the original developer did not complete the entire application and just have a working program shell, where not all the operation and graphical user interfaces are complete. In addition, there is no analysis and design information provided—only the program shell.

Your Software Engineering Manager has tasked you to review the program and document the structure of the program by creating the Class/Object diagram of the existing application. Then once you have completed documenting the program structure, you are to complete the missing programming operations and graphical user interfaces.

All the project files and supporting project have been provided.
Description: Student Assignment Grading

The Student Grading application will keep track of one student’s assignment grade information for any number courses, and each course can be anywhere from 1 to 16 weeks long. For each week of the course, the assignments are (1) threaded discussion score, (2) quiz score, (3) lab assignment score, and an exam. Not all the week’s will have each of the assignment score recorded, and the final week of the course will have a final exam score only.

A student will be able to keep assignment scores for any number of courses, and each course will have the school name, the course number, the course title, and how many weeks there are in the course.
For a selected course, the application will allow the user to enter the scores, and once the scores are entered for the week the application will calculate the weekly total and the weekly average, along with the course running total score, running average, and letter grade to date (based on course syllabus grade breakdown).

The database will contain two tables (1) Courses and (2) Assignments, using the following table names and fields

  1. Course
    1. Id
    2. School
    3. Number
    4. Title
  2. Assignments
    1. Id
    2. CourseID
    3. WeekNumber
    4. TDA
    5. Lab
    6. Quiz
    7. Test

The application will display a table that displays the following for each course that is recorded:

  1. Course Number
  2. Course Title
  3. Course Grade

While the application and database will be user name and password protected, it is outside the scope of this project to provide a complete, robust, and secure authentication component. So, for the purposes of this development, you will just store the user name and password comma separated value text file.

Design Requirements
The program design shall adhere to the following design requirements:

  1. The program will be constructed using a 3-tier architecture (1) data, (2) business, and (3) presentation tier and each tier will only implement the operations appropriate for the tier.
  2. The graphical user interface will be constructed using a tab panel interface, with each tab containing only those operations related to the tab heading.
  3. The order of the tabs will be in logical sequence.
  4. The graphical user interface will contain a main menu bar, and there shall be a menu for each tab that mirrors the operations on the tab.
  5. Each menu item will have a logical name and short cut key assigned.
  6. Each “active” control (i.e. radio button, command button…) shall have a tooltip describing the operation the control provides.
  7. There shall be a logical, sequential tab order for the input controls on the form.
  8. All class members, both variables and methods, shall by default be made private.
  9. Access to any class/object data member shall only be done through getters and setters.
  10. Methods shall only be made public if it is necessary for other objects to call the methods.
  11. Private variables shall only be access through getters and setters.
  12. All setters will have validation logic to ensure the private variable is always in a stable state.

FUNCTIONAL REQUIREMENTS
The program operations will adhere to the following requirements:

  1. The maximum points of all the assignments is 1000 points.
  2. Each input score item shall be validated against a lower and upper bound.
  3. The lower and upper bounds of each of the assignments shall be stored in the database or a file.
  4. The user must authenticate into the program when it starts.
  5. The user name and password shall be stored in a file (which simulates an authentication component).
  6. The running total, running average, and current grade shall only include scores that have been recorded.
  7. The threaded discussion score shall be calculated by the user being able to select whether a student attended, or posted a note on a day of the week, for each of the 7 weeks.
  8. If a student attends at least three days, the student will receive full credit for the weekly threaded discussion score.
  9. The automatically assigned threaded discussion score, can be overridden to a lower, or higher score, but within the limits of the minimum and maximum scores.
  10. The weekly total, weekly average, running total, and running average shall be updated any time one of the dependent fields is updated.
  11. Database operations shall be secure and be written to minimize SQL injection or other transport type attacks.

Analysis and Design
In Week 4 you will create an analysis and design document that consists of:

  1. Document the current “as is” structure of the program.
  2. Create a class/Object Diagram (this can be done in any drawing tool, or even hand drawn and take a picture).

Implementation
The final program shall:

  1. Go through the TODO action items in the course shell project starting in the business layer, then go to the data layer, and then the presentation.
  2. If you correctly make all the TODO changes the program will work as expected.
  3. Contain all files, and referenced projects/jar files

CIS 355A CIS355A CIS/355A ENTIRE COURSE HELP – DEVRY UNIVERSITY

CIS355A Final Exam Multiple Choice Questions

Question 1. (TCOs 1–6) The data displayed in a JTable can be provided by a _____ object. (Points : 4)
 TableModel
 GridModel
 DefaultTableModel
 TableGridModel

Question 2. (TCOs 1–6) What is the output of the code below?

1
2
double num = 56.4321;
System.out.printf("%.3f", 56.4321); (Points : 4)

 %.3f
 %.3f56.4321
 56.432
 56.4321

Question 3. (TCOs 1–6) Arguments to methods always appear within (Points : 4)
 brackets.
 parentheses.
 quotation marks.
 curly braces.

Question 4 (TCOs 1–6) What would be the result of attempting to compile and run the following code?

1
2
3
4
5
6
7
8
9
10
11
public class Test {
         public static void main(String[ ] args) {
                  double[ ] x = new double[ ]{1, 2, 3};
                  System.out.println("Value is " + x[1]);
         }
}

(Points : 4)
 The program has a compile error because the syntax new double[ ]{1, 2, 3} is wrong, and it should be replaced by new double[ ]{1.0, 2.0, 3.0};
 The program compiles and runs fine and the output “Value is 2.0” is printed.
 The program has a compile error because the syntax new double[ ]{1, 2, 3} is wrong, and it should be replaced by new double[3]{1, 2, 3};
 The program compiles and runs fine and the output “Value is 1.0” is printed.

Question 5. (TCOs 1, 2, and 6) You must call most methods other than _____ explicitly to tell them to perform their tasks. (Points : 4)
 public methods
 main
 private methods
 static methods

Question 6. (TCOs 1–6) Invoking _____ removes all elements in an ArrayList x. (Points : 4)
 x.delete()
 x.clear()
 x.empty()
 x.remove()

Question 7. (TCO 1, 4, and 6) The maximum number of radio buttons that can be selected within a ButtonGroup is (Points : 4)
 1
 2
 5
 all

Question 8. (TCOs 1–6) Which statements are most accurate regarding the following classes?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
class A {
      private int i;
      protected int j;
}
class B extends A {
      private int k;
      protected int m;
}

(Points : 4)
 An object of B contains data fields j, m.
 An object of B contains data fields j, k, m.
 An object of B contains data fields k, m.
 An object of B contains data fields i, j, k, m.

Question 9. (TCOs 1–6) Suppose ArrayList x contains two strings [Beijing, Singapore]. Which of the following methods will cause the list to become [Beijing, Chicago, Singapore]? (Points : 4)
 x.add(“Chicago”)
 x.add(2, “Chicago”)
 x.add(0, “Chicago”)
 x.add(1, “Chicago”)

Question 10. (TCOs 1, 5, and 6) Which statement sets up a tokens object that will use the % as a field delimiter? (Points : 4)
 tokens = StringTokenizer(inputString, “%”);
 tokens = new StringTokenizer(inputString, “%”);
 tokens = StringTokenizer(“%”, inputString);
 tokens = new StringTokenizer(“%”, inputString);

Question 11. (TCOs 1–6) Which of the following statements causes the program to terminate when closing the frame? (Points : 4)
 frame.setDefaultCloseOperation(null)
 frame.setDefaultCloseOperation(JFrame.STOP_ON_CLOSE)
 frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE)
 frame.setDefaultCloseOperation(JFrame.TERMINATE_ON_CLOSE)

Question 12. (TCOs 1, 5, and 6) Which type of exception occurs if the write method of BufferedWriter cannot write data to the file? (Points : 4)
 WriteException
 IOException
 FileIOException
 FileException

Question 13. (TCOs 1–6) Suppose a JFrame uses the GridLayout(0, 2). If you add six buttons to the frame, how many rows are displayed? (Points : 4)
 2
 3
 1
 4

Question 14. (TCOs 1–6) The interface _____ should be implemented to listen for a button action event. (Points : 4)
 FocusListener
 ContainerListener
 ActionListener
 WindowListener

Question 15. (TCOs 1–6) The datatype returned by the JOptionPane.showInputDialog method is (Points : 4)
 String
 int
 double
 specified by the user in the method call

Question 16. (TCOs 1, 4, and 6) Menus are attached to windows by calling the _____ method. (Points : 4)
 addMenuBar
 setJMenuBar
 setMenu
 addJMenuBar

Question 17. (TCOs 1–6) When implementing a method, use the class’s set and get methods to access the class’s _____ data. (Points : 4)
 public
 private
 protected
 All of them

Question 18. (TCOs 1, 4, and 6) Which component allows users to access a layer of GUI components via a tab? (Points : 4)
 JTabs
 JTabPane
 JTabbedPane
 JTabPanel

Question 19. (TCOs 1–6) A constructor cannot (Points : 4)
 be overloaded.
 initialize variables to their defaults.
 specify return types or return values.
 have the same name as the class.

Question 20. (TCOs 1–6) A method that is associated with an individual object is called (Points : 4)
 an object method.
 an instance method.
 a class method.
 a static method.

Question 1. (TCOs 1, 5, and 6) What must you make available to your application before you can use JDBC to connect to a database? (Points : 4)
 A database driver
 A web server
 A firewall
 An ODBC data source

Question 2. (TCOs 1–6) _____ represents an entity in the real world that can be distinctly identified. (Points : 4)
 A class
 An object
 A data field
 A method

Question 3. (TCOs 1–6) To execute the query “select * from Address” using the Statement object named stmt that has been properly configured with a database connection, use (Points : 4)
 stmt.executeUpdate(“select * from Address”);
 stmt.execute(“select * from Address”);
 stmt.executeQuery(“select * from Address”);
 tmt.query(“select * from Address”);

Question 4. (TCOs 1–6) Suppose that your program accesses a MySQL database. Which of the following statements is false? (Points : 4)
 If the database is not available, the program will have a runtime error when attempting to create a connection object.
 If the driver for MySQL database is not in the classpath, the program will have a runtime error, indicating that the driver class cannot be loaded.
 If the driver for MySQL database is not in the classpath, the program will have a syntax error.
 If the database connection cannot be made, a SQLException occurs.

Question 5. (TCOs 1–6) Invoking Class.forName method when the database driver has not been configured into the project may throw (Points : 4)
 ClassNotFoundException.
 IOException.
 SQLException.
 RuntimeException.

Question 6. (TCOs 1–6) Which of the following statements is used to create an object to write to a file named out.dat? (Points : 4)
 BufferedWriter outfile = new BufferedWriter(FileWriter(“out.dat”));
 BufferedWriter outfile = new BufferedWriter (new File(“out.dat”));
 BufferedWriter outfile = new BufferedWriter (new FileWriter(“out.dat”));
 BufferedWriter outfile = new BufferedWriter (“out.dat”);

Question 7. (TCOs 1–6) Which type of exception occurs when creating a BufferedReader object for a nonexistent file? (Points : 4)
 FileNotExist
 FileNotFound
 FileNotExistException
 FileNotFoundException

Question 8. (TCOs 1–6) Which class can be used to read data into a text file? (Points : 4)
 BufferedReader
 System
 ReadFile
 FileRead

Question 9. (TCOs 1–6) Result set meta data are retrieved through (Points : 4)
 a Statement object.
 a Connection object.
 a ResultSet object.
 a PreparedStatement object.

Question 10. (TCOs 1–6) _____ checks whether the JCheckBox jchk is selected. (Points : 4)
 jchk.isSelected().
 jchk.selected()
 jchk.select()
 jchk.getSelected()

Question 11. (TCOs 1–6) The method _____ gets the contents of the text field txtName. (Points : 4)
 txtName.findString()
 txtName.getText(s)
 txtName.getString()
 txtName.getText()

Question 12. (TCOs 1–6) The method _____ appends a string s into the text area jta. (Points : 4)
 jta.appendText(s)
 jta.append(s)
 jta.setText(s)
 jta.insertText(s)

Question 13. (TCOs 1–6) Which of the following statements is false? (Points : 4)
 You can create a text field with a specified text.
 You can disable editing on a text field.
 You can specify the number of rows in a text field
 You can specify the number of columns in a text field.

Question 14. (TCOs 1–6) A JList object can be populated with data stored in a(n) _____ object. (Points : 4)
 ModelList
 DefaultListModel
 ListArray
 DefaultModelList

Question 15. (TCOs 1–6) The _____ method of a radio button returns true if that button is “on”. (Points : 4)
 isSelected()
 getSelected()
 Selected()
 RadioSelected()

CIS 355A CIS355A CIS/355A ENTIRE COURSE HELP – DEVRY UNIVERSITY

CIS355A Week 6 Lab Database Stocks4U Portfolio Management System

OBJECTIVES

    Add persistent data storage to your Week 5 Lab using the MySQL Database.

PROBLEM: Stocks4U Portfolio Management System
The portfolio management system you developed for Stocks4U needs the ability to save and restore a user’s data from a MySql Database.

FUNCTIONAL REQUIREMENTS

  • The functional requirements of the Stocks4U application have not changed, and the Graphical User Interface has not changed from Week 5.

StockIO class

Modify the StockIO class to read and write the stock information to and from a MySQL database. Called “StocksDB”

This class should have two methods.

  • getData—reads data from file, returns data in array list of stock objects
  • saveData—writes data from an array list to the data base in proper format
  • deleteStock—deletes the identified stock from the database
  • updateStock—updates the identified stock in the database.

The database connection string will be stored as a constant in the StockIO class.

GUI class

Note that you will need to add an ArrayList to your GUI class to manage the data to/from the file. It will act as a parallel array to your DefaultListModel. Any time you add a stock, you must add it in BOTH places. Any time you remove a stock, you must remove it in BOTH places.

File—open should open the database, retrieve the existing records and display the existing records.
File—save should save all records, new and old, back to the database.
File—exit should exit the program.

The total value of the portfolio should be displayed at all times and updated anytime a stock is added or removed.

CODE STYLE REQUIREMENTS

  • Include meaningful comments throughout your code.
  • Use meaningful names for variables.
  • Code must be properly indented.
  • Include a comment header at beginning of each file, example below.

/****************************************************
Program Name: ProgramName.java
Programmer’s Name: Student Name
Program Description: Describe here what this program will do
***********************************************************/

DELIVERABLES
Submit as a SINGLE zip folder

  • all Java files; and
  • the Lab report.

Follow assignment specification regarding class/method names.
Note that your Java file name must match class name (DO NOT rename).

CIS 355A CIS355A CIS/355A ENTIRE COURSE HELP – DEVRY UNIVERSITY

CIS355A Final Exam Essay Questions

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.

1
2
3
4
5
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:

1
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 ServiceBonus Percentage
< 53%
5 – 147%
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.

1
2
3
4
5
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)

CIS 355A CIS355A CIS/355A ENTIRE COURSE HELP – DEVRY UNIVERSITY

CIS355A Entire Course

CIS355A Entire Course tutorial includes:

  • CIS355A Week 1 Health Profile Console Program
  • CIS355A Week 2 Health Profile App
  • CIS355A Week 3 BurgersRUs Point of Sale system
  • CIS355A Week 4 Stocks4U Portfolio Management System
  • CIS355A Week 5 File Processing Stocks4U Portfolio Management System
  • CIS355A Week 6 Lab Student Management System
  • CIS355A Week 4 Course Project Flooring Application Analysis and Design
  • CIS355A Week 7 Course Project Flooring Application User Manual and Application Code

CIS 355A CIS355A CIS/355A ENTIRE COURSE HELP – DEVRY UNIVERSITY

CIS355A Week 6 Lab Student Management System

CIS355A Week 6 Lab Database Stocks4U Portfolio Management System

OBJECTIVES

  • Programmatic access to a MySQL database to add and display records

PROBLEM: Student Management System
A teacher needs the ability to store and retrieve student data. This includes

  • student name;
  • three test scores;
  • average; and
  • letter grade.

FUNCTIONAL REQUIREMENTS
You can code the GUI by hand or use NetBeans GUI builder interface.
Create a GUI which allows for input and display of student data.
It should include buttons to save a record, display all records.

Create a database and table to store student name and three test scores. (Note that average and grade are calculated by app.)

Student class
Create a Student class to manage the student data. It should have private instance variables of

  • student name; and
  • three test scores.

The class must have the following methods.

  • A default and parameterized constructor
  • Sets/gets for all instance variables
  • A get method to calculate and return the average
  • A get method to calculate and return the letter grade
  • toString to display the name of the student

StudentDB class
Create a StudentDB class that is used to create a connection and interface with the database.

This class should have two methods.

  • getAll—reads data from database, returns data in an arraylist of student objects
  • add—writes a record to the database

GUI class

Insert button will take the info from the GUI (student name and three test scores) and insert a record into the table. Input should be cleared from the textboxes.

Display button will read the data from the database and creates a report in Console window, sample format below.

Name,Test1,Test2,Test3,Avg,Grade
Bruce Wayne,90 ,95 ,98 ,94.3 ,A
Clark Kent,65 ,70,90 ,75.0 ,C

CODE STYLE REQUIREMENTS

  • Include meaningful comments throughout your code.
  • Use meaningful names for variables.
  • Code must be properly indented.
  • Include a comment header at beginning of each file, example below.

/****************************************************
Program Name: ProgramName.java
Programmer’s Name: Student Name
Program Description: Describe here what this program will do
***********************************************************/

DELIVERABLES
Submit as a SINGLE zip folder

  • all java files; and
  • the Lab report.

Follow assignment specification regarding class/method names.
Note that your Java file name must match class name (DO NOT rename).

CIS 355A CIS355A CIS/355A ENTIRE COURSE HELP – DEVRY UNIVERSITY

CIS355A Week 5 Lab File Processing Stocks4U Portfolio Management System

OBJECTIVES

    Add persistent data storage to your Week 4 Lab using text file input/output.

PROBLEM: Stocks4U Portfolio Management System
The portfolio management system you developed for Stocks4U needs the ability to save and restore a user’s data from a text file.

FUNCTIONAL REQUIREMENTS
You can code the GUI by hand or use NetBeans GUI Builder Interface.
You will enhance Week 4 GUI to include

  • a File menu with menu items: open, save, exit; and
  • a label to display total portfolio value.

Stock class

  • Modify the toString of Stock class to display as “Company: qty shares” (i.e., “Apple: 10 shares”)

StockIO class
Create a StockIO class that is used to read from and write to a text file using an ArrayList. Make sure to use a delimiter between the fields; it does not have to be the # character.

Example format of the file is:
Apple#100#55.0#80.0
Intel#50#75.0#70.0

This class should have two methods.

  • getData—reads data from file, returns data in array list of stock objects
  • saveData—writes data from an array list to the file in proper format

The file name will be an instance variable that you can set with a parameterized constructor, or with a separate method.

GUI class
Note that you will need to add an ArrayList to your GUI class to manage the data to/from the file. It will act as a parallel array to your DefaultListModel. Anytime you add a stock, you must add it in BOTH places. Anytime you remove a stock, you must remove it in BOTH places.

File—open should prompt for filename using JOptionPane, read the file and populate the JList.
File—save should prompt for filename to save data from JList to.
File—exit should exit the program.

The total value of the portfolio should be displayed at all times and updated anytime a stock is added or removed.

CODE STYLE REQUIREMENTS

  • Include meaningful comments throughout your code.
  • Use meaningful names for variables.
  • Code must be properly indented.
  • Include a comment header at beginning of each file, example below.

/****************************************************
Program Name: ProgramName.java
Programmer’s Name: Student Name
Program Description: Describe here what this program will do
***********************************************************/

DELIVERABLES
Submit as a SINGLE zip folder

  • all Java files; and
  • the Lab report.

Follow assignment specification regarding class/method names.
Note that your Java filename must match class name (DO NOT rename).

CIS 355A CIS355A CIS/355A ENTIRE COURSE HELP – DEVRY UNIVERSITY

CIS355A Week 4 Lab Stocks4U Portfolio Management System

OBJECTIVES

  • Create a GUI that uses JList and JTabbedPanes.
  • Process multiple objects in an ArrayList.
  • Code event handlers for multiple events.

PROBLEM: Stocks4U Portfolio Management System
Stocks4U needs to develop an app for you to manage your stock purchases.You should be able to store a list of stock purchases, view the individual stocks, add and remove stocks.

FUNCTIONAL REQUIREMENTS
You can code the GUI by hand or use NetBeans GUI builder interface.

The GUI should have two tabs usingJTabbedPane.

  • One tab (“Show stocks”) should have
    1. a JList to display all the stock purchases;
    2. a text field or label to display information about a particular stock; and
    3. a JButton to remove a stock.
  • One tab (“Add stock”) should have textboxes, labels, and a button to input a stock.

Create a Stock class to manage the stock activity. It should have private instance variables of

  • company name;
  • number of shares;
  • purchase price; and
  • current price.

Create a default and parameterized constructor.
Create sets/gets for all instance variables.
Create a get method to calculate and return the profit or loss. This would be calculated as

1
Number of shares * (current price – purchase price).

Create toString to display the name of the stock.

As you add stocks, they are displayed in the JList.
If you select an element in the JList, the gain or loss is displayed in the label or text field.
If you select an element in the JList and click Remove, the stock is removed from the list.

CODE STYLE REQUIREMENTS

  • Include meaningful comments throughout your code.
  • Use meaningful names for variables.
  • Code must be properly indented.
  • Include a comment header at beginning of each file, example below.

/****************************************************
Program Name: ProgramName.java
Programmer’s Name: Student Name
Program Description: Describe here what this program will do
***********************************************************/

DELIVERABLES
Submit as a SINGLE zip folder

  • All java files
  • Lab report

Follow assignment specification regarding class/method names.
Note that your java filename must match class name (DO NOT rename).

CIS 355A CIS355A CIS/355A ENTIRE COURSE HELP – DEVRY UNIVERSITY

CIS355A Week 3 Lab BurgersRUs Point of Sale system

OBJECTIVES

  • Create a GUI that uses JCheckBox, JRadioButton, JTextArea, and menus.
  • Process multiple events.

PROBLEM: BurgersRUs Point of Sale system
Burger Barn needs a point of sale application. The products and prices are as follows.
Burgers: single $3.50, double $4.75
Add cheese: + $.50
Add bacon: + $1.25
Make it a meal: + $4.00

FUNCTIONAL REQUIREMENTS
You can code the GUI by hand or use NetBeans GUI builder interface.
The GUI should useJRadioButtonto choose single or double burger.

  • Single burger
  • Double burger

It should use JCheckBox for add ons.

  • Add cheese
  • Add bacon
  • Make it a meal

JTextField for item price, order quantity, order total
JTextArea to display the receipt
Create a menu with the following options.
File Order
Exit Add to Order
Clear for next item
New Order

As the user selects items, the item price should be calculated and updated accordingly.
Note that quantity should default to 1. The user can change if needed.
Once choices are made and quantity is entered, process the order using the menu options.
Order—Add to Order Displays the choice and price in each text area.
Note that multiple items can accumulate in a single order
Updates the order total
Order—Clear for next item Clears the checkboxes. Note that quantity should default to 1
Order—New Order Clears the GUI and totals for a new order
File—Exit Exits the program. Use System.exit(0) commad.

CODE STYLE REQUIREMENTS

  • Include meaningful comments throughout your code.
  • Use meaningful names for variables.
  • Code must be properly indented.
  • Include a comment header at beginning of each file, example below.

/****************************************************
Program Name: ProgramName.java
Programmer’s Name: Student Name
Program Description: Describe here what this program will do
***********************************************************/

DELIVERABLES
Submit as a SINGLE zip folder

  • All java files
  • Lab report

Follow assignment specification regarding class/method names.
Note that your java filename must match class name (DO NOT rename).

CIS 355A CIS355A CIS/355A ENTIRE COURSE HELP – DEVRY UNIVERSITY

CIS355A Week 2 Lab Developing a GUI Application

OBJECTIVES

  • Create a GUI that usesJTextField, JLabel, and JButton.
  • Write event handlers to process user data.

PROBLEM: Health Profile App
GymsRUs would like to replace their console program with an updated app using a graphical user interface. You will use the HealthProfile class that you created in the Week 1 Lab and build a GUI for it.

FUNCTIONAL REQUIREMENTS
Make sure your HealthProfile class from the Week 1 Lab is in a named package, not default (i.e., package lab1).

You must ADD the project that contains the HealthProfile class to this week’s project by
right click project, go to properties; and
click Libraries, Add Project, click OK.

Then you will be able to reference your existing class as
import lab1.HealthProfile.

Your project will have three classes:

  • HealthProfile class from Week 1 Lab
  • HealthProfileGUI class
  • Lab2Main class

Your HealthProfildGUI class should have the following components (see sample GUI below):

  • JTextField objects to enter: name, age, height in feet, height in inches, weight in pounds
  • JButton objects to display results, clear the GUI
  • JTextField objects to display the BMI, category, and max heart rate
  • JLabels to describe all textboxes

You are free to layout and design your GUI as you like as long as it includes these components.

Add default and parameterized constructors to your HealthProfile class. The parameterized constructor should have five arguments: the name, age, weight, height in feet, and height in inches. Note it should convert the height to inches to store in the private instance variable.
Code event handlers for each button:

  • Display: Make sure all user input is present and valid
    Use the HealthProfile class to process the data
    Display the results on the GUI
  • Clear Clear all text boxes on the GUI

Sample GUI


healthprofile
 

CODE STYLE REQUIREMENTS

  • Include meaningful comments throughout your code
  • Use meaningful names for variables
  • Code must be properly indented
  • Include a comment header at beginning of each file, example below

/****************************************************
Program Name: ProgramName.java
Programmer’s Name: Student Name
Program Description: Describe here what this program will do
***********************************************************/

DELIVERABLES
Submit as a SINGLE zip folder

  • All java files
  • Lab report

Follow assignment specification regarding class/method names.
Note that your java filename must match class name (DO NOT rename).

CIS 355A CIS355A CIS/355A ENTIRE COURSE HELP – DEVRY UNIVERSITY

CIS355A Week 1 Lab Developing an OOP Console Application

OBJECTIVES

  • Create a class in java with appropriate methods.
  • Process user input with the class using the scanner for keyboard input and console output.

PROBLEM: Health Profile Console Program
GymsRUs has a need to provide fitness/health information to their clients, including BMI and maximum heart rate. Your task is to write a console program to do this.

Body mass index (BMI) is a measure of body fat based on a person’s height and weight. BMI can be used to indicate if you are overweight, obese, underweight, or normal.The formula to calculate BMI is

The following BMI categories are based on this calculation.
[table]
Category, BMI Range
Underweight, less than 18.5
Normal, between 18.5 and 24.9
Overweight, between 25 and 29.9
Obese, 30 or more
[/table]
Max heart rate is calculated as 200 minus a person’s age.

FUNCTIONAL REQUIREMENTS
Design and code a class called HealthProfile to store information about clients and their fitness data. The attributes (name, age, weight, and height) are private instance variables. The class must include the following methods.

method,description
setName,Receives a value to assign to private instance variable
setAge,Receives a value to assign to private instance variable
setWeight,Receives a value to assign to private instance variable
setHeight,Receives TWO inputs (height in feet\, inches). Converts and stores the total INCHES in private instance variable
getName,Returns private instance variable
getAge,Returns private instance variable
getWeight,Returns private instance variable
getHeight,Returns private instance variable (inches)
getBMI,Calculates and returns BMI
getCategory,Returns category based on BMI
getMaxHR,Calculates and returns maximum heart rate

Create a SEPARATE TEST CLASS, Lab1Main, to prompt for user input and display output using the HealthProfile class. Process multiple inputs using a loop.You can assume all user input is valid.

SAMPLE OUTPUT

Enter name or X to quit: John Smith
Your age: 35
Your weight: 200
Your height – feet: 6
Your height – inches: 0

Health Profile for John Smith
BMI: 27.1
BMI Category: overweight
Max heart rate: 185

Enter name or X to quit: Ann Jones
Your age: 50
Your weight: 120
Your height – feet: 5
Your height – inches: 2

Health Profile for Ann Jones
BMI: 21.9
BMI Category: normal
Max heart rate: 170

Enter name or X to quit: X

CODE STYLE REQUIREMENTS

  • Include meaningful comments throughout your code.
  • Use meaningful names for variables.
  • Code must be properly indented.
  • Include a comment header at beginning of each file, example below.

/****************************************************
Program Name: ProgramName.java
Programmer’s Name: Student Name
Program Description: Describe here what this program will do
***********************************************************/

DELIVERABLES
Submit as a SINGLE zip folder

  • All java files
  • Lab report

Follow assignment specification regarding class/method names.
Note that your java filename must match class name (DO NOT rename).

CIS 355A CIS355A CIS/355A ENTIRE COURSE HELP – DEVRY UNIVERSITY

CIS355A Week 7 Course Project Flooring Application User Manual and Application Code

Your application must include at least three tabs. The user will choose wood flooring or carpet, enter the length and width of the floor, as well as the customer name and address. The application will compute the area of the floor and the cost of the flooring considering that wood floor is $20 per square foot and carpet is $10 per square foot. A summary should be displayed, either in a tab or another window, listing the customer name and address, floor selection, area, and cost. This information should also be stored in the MySQL database table. The program should validate that all information is entered and that the length and width are numeric values. Any numeric or currency values must be formatted appropriately when output. Recommendations for the components used for input are

  • radio buttons—flooring type (wood or carpet).
  • text fields—customer name, customer address, floor length, and floor width
  • buttons—calculate area, calculate cost, submit order, display order summary, display order list.

The MySQL database table is called flooring and has the following description:

FieldType
CustomerNamevarchar(30)
CustomerAddressvarchar(50)
FlooringTypevarchar(10)
FloorAreaDouble
FloorCostDouble

In addition to entering new customer orders, your application should list all customer orders stored in the database. These will be viewed as a list, in a text area, and will not be updated by the user.

User Manual (Due Week 7)
Your actual Course Project and user manual are due at the end of Week 7. However, it is strongly recommended that you start your project in Week 5 to avoid many last minute issues.
In Week 7, you will be required to submit a user manual, as well as your Java code. The user manual can be a simple Word document with screenshots that explains how to run your application. Your mark will depend both on the program quality and the quality of the user manual.
Here are some more detailed guidelines about the user manual.
It does not need to be long, probably not more than 5 pages, including screenshots.
Write at the expected user’s level, not too technical.
Detail all the functionality that the application provides.
For each function, show what is its purpose and sample execution, with a screenshot.

User ManualPointsDescription
Sufficient length to describe the application5Manual contains explanation in detail of all relevant areas of the application
Contains screenshots of the key interface components5Images of each section of the application
Operations are explained5Detailed operation of each section of the application
Written to the user’s level and is not technical5Must not contain code or any other technical items irrelevant to the users
Subtotal20

Application Code (Due Week 7)
The following grading rubric will be used for the code portion of the project.

Flooring ApplicationPointsDescription
Standard header included2Must contain program name student name and description of the program
Program compiles2Program does not have any error
Program executes2Program runs without any error
Includes at least 3 tabs10Three or more tabs are used
Includes components for all required inputs35Components for customer name address floor type length width area and cost with buttons to calculate area calculate cost display order summary and display order list are included
Area calculation4Area is calculated correctly
Cost calculation5Cost is calculated correctly
Included data validation10If no values or non-numeric values are entered. the proper error message should display.
Correct data is stored in the database table10When values are entered the data is stored correctly in the database table.
Customer orders are displayed in a list10All records saved to the database are displayed in a list with appropriate formatting.
Correct output is displayed10When values are entered the order summary is shown with appropriate formatting.
Total100

CIS 355A CIS355A CIS/355A ENTIRE COURSE HELP – DEVRY UNIVERSITY

CIS355A Week 6 Lab Student Management System

CIS355A Week 6 Lab Database Stocks4U Portfolio Management System

OBJECTIVES

  • Programmatic access to a MySQL database to add and display records

PROBLEM: Student Management System
A teacher needs the ability to store and retrieve student data. This includes

  • student name;
  • three test scores;
  • average; and
  • letter grade.

FUNCTIONAL REQUIREMENTS
You can code the GUI by hand or use NetBeans GUI builder interface.
Create a GUI which allows for input and display of student data.
It should include buttons to save a record, display all records.

Create a database and table to store student name and three test scores. (Note that average and grade are calculated by app.)

Student class
Create a Student class to manage the student data. It should have private instance variables of

  • student name; and
  • three test scores.

The class must have the following methods.

  • A default and parameterized constructor
  • Sets/gets for all instance variables
  • A get method to calculate and return the average
  • A get method to calculate and return the letter grade
  • toString to display the name of the student

StudentDB class
Create a StudentDB class that is used to create a connection and interface with the database.

This class should have two methods.

  • getAll—reads data from database, returns data in an arraylist of student objects
  • add—writes a record to the database

GUI class

Insert button will take the info from the GUI (student name and three test scores) and insert a record into the table. Input should be cleared from the textboxes.

Display button will read the data from the database and creates a report in Console window, sample format below.

Name,Test1,Test2,Test3,Avg,Grade
Bruce Wayne,90 ,95 ,98 ,94.3 ,A
Clark Kent,65 ,70,90 ,75.0 ,C

CODE STYLE REQUIREMENTS

  • Include meaningful comments throughout your code.
  • Use meaningful names for variables.
  • Code must be properly indented.
  • Include a comment header at beginning of each file, example below.

/****************************************************
Program Name: ProgramName.java
Programmer’s Name: Student Name
Program Description: Describe here what this program will do
***********************************************************/

DELIVERABLES
Submit as a SINGLE zip folder

  • all java files; and
  • the Lab report.

Follow assignment specification regarding class/method names.
Note that your Java file name must match class name (DO NOT rename).

CIS 355A CIS355A CIS/355A ENTIRE COURSE HELP – DEVRY UNIVERSITY

CIS355A Week 5 Lab File Processing Stocks4U Portfolio Management System

OBJECTIVES

    Add persistent data storage to your Week 4 Lab using text file input/output.

PROBLEM: Stocks4U Portfolio Management System
The portfolio management system you developed for Stocks4U needs the ability to save and restore a user’s data from a text file.

FUNCTIONAL REQUIREMENTS
You can code the GUI by hand or use NetBeans GUI Builder Interface.
You will enhance Week 4 GUI to include

  • a File menu with menu items: open, save, exit; and
  • a label to display total portfolio value.

Stock class

  • Modify the toString of Stock class to display as “Company: qty shares” (i.e., “Apple: 10 shares”)

StockIO class
Create a StockIO class that is used to read from and write to a text file using an ArrayList. Make sure to use a delimiter between the fields; it does not have to be the # character.

Example format of the file is:
Apple#100#55.0#80.0
Intel#50#75.0#70.0

This class should have two methods.

  • getData—reads data from file, returns data in array list of stock objects
  • saveData—writes data from an array list to the file in proper format

The file name will be an instance variable that you can set with a parameterized constructor, or with a separate method.

GUI class
Note that you will need to add an ArrayList to your GUI class to manage the data to/from the file. It will act as a parallel array to your DefaultListModel. Anytime you add a stock, you must add it in BOTH places. Anytime you remove a stock, you must remove it in BOTH places.

File—open should prompt for filename using JOptionPane, read the file and populate the JList.
File—save should prompt for filename to save data from JList to.
File—exit should exit the program.

The total value of the portfolio should be displayed at all times and updated anytime a stock is added or removed.

CODE STYLE REQUIREMENTS

  • Include meaningful comments throughout your code.
  • Use meaningful names for variables.
  • Code must be properly indented.
  • Include a comment header at beginning of each file, example below.

/****************************************************
Program Name: ProgramName.java
Programmer’s Name: Student Name
Program Description: Describe here what this program will do
***********************************************************/

DELIVERABLES
Submit as a SINGLE zip folder

  • all Java files; and
  • the Lab report.

Follow assignment specification regarding class/method names.
Note that your Java filename must match class name (DO NOT rename).

CIS 355A CIS355A CIS/355A ENTIRE COURSE HELP – DEVRY UNIVERSITY

CIS355A Week 4 Course Project Flooring Application Analysis and Design

Developing a graphical user interface in programming is paramount to being successful in the business industry. This project incorporates GUI techniques with other tools that you have learned about in this class.
Here is your assignment: You work for a flooring company. They have asked you to be a part of their team because they need a computer programmer, analyst, and designer to aid them in tracking customer orders. Your skills will be needed in creating a GUI program that calculates the flooring cost and stores the order in the database.
The project has three components: an analysis and design document, the project code, and a user manual. The analysis and design document is due Week 4. The code and user manual are due in Week 7. It is suggested that you begin working on the code in Week 5, which should give you ample time to complete the project. You will find that the lectures and lab assignments will prepare you for the Course Project.

Guidelines
Your application must include at least three tabs. The user will choose wood flooring or carpet, enter the length and width of the floor, as well as the customer name and address. The application will compute the area of the floor and the cost of the flooring considering that wood floor is $20 per square foot and carpet is $10 per square foot. A summary should be displayed, either in a tab or another window, listing the customer name and address, floor selection, area, and cost. This information should also be stored in the MySQL database table. The program should validate that all information is entered and that the length and width are numeric values. Any numeric or currency values must be formatted appropriately when output. Recommendations for the components used for input are

  • radio buttons—flooring type (wood or carpet);
  • text fields—customer name, customer address, floor length, and floor width; and
  • buttons—calculate area, calculate cost, submit order, display order summary, display order list.

The MySQL database table is called flooring and has the following description:
[table]
Field, Type
CustomerName, varchar(30)
CustomerAddress, varchar(50)
FlooringType, varchar(10)
FloorArea, Double
FloorCost, Double
[/table]
In addition to entering new customer orders, your application should list all customer orders stored in the database. These will be viewed as a list, in a text area, and will not be updated by the user.

Analysis and Design (Due Week 4)
In Week 4, you will complete the analysis and design for the project. You will use the guidelines described above and the grading rubric below to complete this document. You will create the following items:

  1. Request for new application
  2. Problem analysis
  3. List and description of the requirements
  4. Interface storyboard or drawing
  5. Design flowchart or pseudocode

The analysis and design document will be a single MS Word document, which contains all descriptions and drawings. See the grading rubric below for the analysis and design document, due in Week 4.
[table]
Item, Points, Description
Request for New Application, 2.5, “A table containing: date of the request, name of the requester (your professor), the purpose of the request, the title of the application (create your own title), and brief description of the algorithms used in the application”
Problem Analysis, 2.5, “Analyze the problem to be solved, and write in a few words what is the problem and what is being proposed to solve the problem”
List and Description of Requirements, 5, “A description of the items that will be implemented in order to construct the proposed solution”
Interface Storyboard or Drawing, 5, “A picture or drawing of what the application will look like; must include the image of each section of the application in detail”
Design Flowchart or Pseudocode, 5, “A sketch of the flow of the application or the pseudocode of the application”
[/table]

CIS 355A CIS355A CIS/355A ENTIRE COURSE HELP – DEVRY UNIVERSITY

CIS355A Week 4 Lab Stocks4U Portfolio Management System

OBJECTIVES

  • Create a GUI that uses JList and JTabbedPanes.
  • Process multiple objects in an ArrayList.
  • Code event handlers for multiple events.

PROBLEM: Stocks4U Portfolio Management System
Stocks4U needs to develop an app for you to manage your stock purchases.You should be able to store a list of stock purchases, view the individual stocks, add and remove stocks.

FUNCTIONAL REQUIREMENTS
You can code the GUI by hand or use NetBeans GUI builder interface.

The GUI should have two tabs usingJTabbedPane.

  • One tab (“Show stocks”) should have
    1. a JList to display all the stock purchases;
    2. a text field or label to display information about a particular stock; and
    3. a JButton to remove a stock.
  • One tab (“Add stock”) should have textboxes, labels, and a button to input a stock.

Create a Stock class to manage the stock activity. It should have private instance variables of

  • company name;
  • number of shares;
  • purchase price; and
  • current price.

Create a default and parameterized constructor.
Create sets/gets for all instance variables.
Create a get method to calculate and return the profit or loss. This would be calculated as

1
Number of shares * (current price – purchase price).

Create toString to display the name of the stock.

As you add stocks, they are displayed in the JList.
If you select an element in the JList, the gain or loss is displayed in the label or text field.
If you select an element in the JList and click Remove, the stock is removed from the list.

CODE STYLE REQUIREMENTS

  • Include meaningful comments throughout your code.
  • Use meaningful names for variables.
  • Code must be properly indented.
  • Include a comment header at beginning of each file, example below.

/****************************************************
Program Name: ProgramName.java
Programmer’s Name: Student Name
Program Description: Describe here what this program will do
***********************************************************/

DELIVERABLES
Submit as a SINGLE zip folder

  • All java files
  • Lab report

Follow assignment specification regarding class/method names.
Note that your java filename must match class name (DO NOT rename).

CIS 355A CIS355A CIS/355A ENTIRE COURSE HELP – DEVRY UNIVERSITY

CIS355A Week 3 Lab BurgersRUs Point of Sale system

OBJECTIVES

  • Create a GUI that uses JCheckBox, JRadioButton, JTextArea, and menus.
  • Process multiple events.

PROBLEM: BurgersRUs Point of Sale system
Burger Barn needs a point of sale application. The products and prices are as follows.
Burgers: single $3.50, double $4.75
Add cheese: + $.50
Add bacon: + $1.25
Make it a meal: + $4.00

FUNCTIONAL REQUIREMENTS
You can code the GUI by hand or use NetBeans GUI builder interface.
The GUI should useJRadioButtonto choose single or double burger.

  • Single burger
  • Double burger

It should use JCheckBox for add ons.

  • Add cheese
  • Add bacon
  • Make it a meal

JTextField for item price, order quantity, order total
JTextArea to display the receipt
Create a menu with the following options.
File Order
Exit Add to Order
Clear for next item
New Order

As the user selects items, the item price should be calculated and updated accordingly.
Note that quantity should default to 1. The user can change if needed.
Once choices are made and quantity is entered, process the order using the menu options.
Order—Add to Order Displays the choice and price in each text area.
Note that multiple items can accumulate in a single order
Updates the order total
Order—Clear for next item Clears the checkboxes. Note that quantity should default to 1
Order—New Order Clears the GUI and totals for a new order
File—Exit Exits the program. Use System.exit(0) commad.

CODE STYLE REQUIREMENTS

  • Include meaningful comments throughout your code.
  • Use meaningful names for variables.
  • Code must be properly indented.
  • Include a comment header at beginning of each file, example below.

/****************************************************
Program Name: ProgramName.java
Programmer’s Name: Student Name
Program Description: Describe here what this program will do
***********************************************************/

DELIVERABLES
Submit as a SINGLE zip folder

  • All java files
  • Lab report

Follow assignment specification regarding class/method names.
Note that your java filename must match class name (DO NOT rename).

CIS 355A CIS355A CIS/355A ENTIRE COURSE HELP – DEVRY UNIVERSITY

CIS355A Week 2 Lab Developing a GUI Application

OBJECTIVES

  • Create a GUI that usesJTextField, JLabel, and JButton.
  • Write event handlers to process user data.

PROBLEM: Health Profile App
GymsRUs would like to replace their console program with an updated app using a graphical user interface. You will use the HealthProfile class that you created in the Week 1 Lab and build a GUI for it.

FUNCTIONAL REQUIREMENTS
Make sure your HealthProfile class from the Week 1 Lab is in a named package, not default (i.e., package lab1).

You must ADD the project that contains the HealthProfile class to this week’s project by
right click project, go to properties; and
click Libraries, Add Project, click OK.

Then you will be able to reference your existing class as
import lab1.HealthProfile.

Your project will have three classes:

  • HealthProfile class from Week 1 Lab
  • HealthProfileGUI class
  • Lab2Main class

Your HealthProfildGUI class should have the following components (see sample GUI below):

  • JTextField objects to enter: name, age, height in feet, height in inches, weight in pounds
  • JButton objects to display results, clear the GUI
  • JTextField objects to display the BMI, category, and max heart rate
  • JLabels to describe all textboxes

You are free to layout and design your GUI as you like as long as it includes these components.

Add default and parameterized constructors to your HealthProfile class. The parameterized constructor should have five arguments: the name, age, weight, height in feet, and height in inches. Note it should convert the height to inches to store in the private instance variable.
Code event handlers for each button:

  • Display: Make sure all user input is present and valid
    Use the HealthProfile class to process the data
    Display the results on the GUI
  • Clear Clear all text boxes on the GUI

Sample GUI


healthprofile
 

CODE STYLE REQUIREMENTS

  • Include meaningful comments throughout your code
  • Use meaningful names for variables
  • Code must be properly indented
  • Include a comment header at beginning of each file, example below

/****************************************************
Program Name: ProgramName.java
Programmer’s Name: Student Name
Program Description: Describe here what this program will do
***********************************************************/

DELIVERABLES
Submit as a SINGLE zip folder

  • All java files
  • Lab report

Follow assignment specification regarding class/method names.
Note that your java filename must match class name (DO NOT rename).

CIS 355A CIS355A CIS/355A ENTIRE COURSE HELP – DEVRY UNIVERSITY

CIS355A Week 1 Lab Developing an OOP Console Application

OBJECTIVES

  • Create a class in java with appropriate methods.
  • Process user input with the class using the scanner for keyboard input and console output.

PROBLEM: Health Profile Console Program
GymsRUs has a need to provide fitness/health information to their clients, including BMI and maximum heart rate. Your task is to write a console program to do this.

Body mass index (BMI) is a measure of body fat based on a person’s height and weight. BMI can be used to indicate if you are overweight, obese, underweight, or normal.The formula to calculate BMI is

The following BMI categories are based on this calculation.
[table]
Category, BMI Range
Underweight, less than 18.5
Normal, between 18.5 and 24.9
Overweight, between 25 and 29.9
Obese, 30 or more
[/table]
Max heart rate is calculated as 200 minus a person’s age.

FUNCTIONAL REQUIREMENTS
Design and code a class called HealthProfile to store information about clients and their fitness data. The attributes (name, age, weight, and height) are private instance variables. The class must include the following methods.

method,description
setName,Receives a value to assign to private instance variable
setAge,Receives a value to assign to private instance variable
setWeight,Receives a value to assign to private instance variable
setHeight,Receives TWO inputs (height in feet\, inches). Converts and stores the total INCHES in private instance variable
getName,Returns private instance variable
getAge,Returns private instance variable
getWeight,Returns private instance variable
getHeight,Returns private instance variable (inches)
getBMI,Calculates and returns BMI
getCategory,Returns category based on BMI
getMaxHR,Calculates and returns maximum heart rate

Create a SEPARATE TEST CLASS, Lab1Main, to prompt for user input and display output using the HealthProfile class. Process multiple inputs using a loop.You can assume all user input is valid.

SAMPLE OUTPUT

Enter name or X to quit: John Smith
Your age: 35
Your weight: 200
Your height – feet: 6
Your height – inches: 0

Health Profile for John Smith
BMI: 27.1
BMI Category: overweight
Max heart rate: 185

Enter name or X to quit: Ann Jones
Your age: 50
Your weight: 120
Your height – feet: 5
Your height – inches: 2

Health Profile for Ann Jones
BMI: 21.9
BMI Category: normal
Max heart rate: 170

Enter name or X to quit: X

CODE STYLE REQUIREMENTS

  • Include meaningful comments throughout your code.
  • Use meaningful names for variables.
  • Code must be properly indented.
  • Include a comment header at beginning of each file, example below.

/****************************************************
Program Name: ProgramName.java
Programmer’s Name: Student Name
Program Description: Describe here what this program will do
***********************************************************/

DELIVERABLES
Submit as a SINGLE zip folder

  • All java files
  • Lab report

Follow assignment specification regarding class/method names.
Note that your java filename must match class name (DO NOT rename).