Welcome to AssignmentCache!

Search results for 'cis 515'

Items 21 to 30 of 180 total

per page
Page:
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5

Grid  List 

Set Descending Direction
  1. CIS355A iLab 6 Step 1 index Java Program

    CIS355A iLab 6 Index Index2 and ThreeArrayLists Java Programs

    $15.00

    CIS355A iLab 6 Index Index2 and ThreeArrayLists Java Programs

    In this lab you will create three programs
    Index.java
    Index2.java
    ThreeArrayLists.java

    Program files for each of the following three programs
    Index
    Index2
    ThreeArrayLists

    iLAB STEPS
    STEP 1: Index (10 points)
    Write a Java GUI application called Index.java that inputs several lines of text and a search character and uses String method indexOf to determine the number of occurrences of the character in the text. This program is not case sensitive and both upper and lower case must be counted for.
    Sample Program output: View Output Description

    STEP 2: Index2 (10 points)
    Write a Java GUI application Index2.java based on the program in Step 1 that inputs several lines of text and uses String method indexOf to determine the total number of occurrences of each letter of the alphabet in the text. Uppercase and lowercase letters should be counted together. Store the totals for each letter in an array, and print the values in tabular format after the totals have been determined.
    Sample Program output: View Output Description

    STEP 3: ThreeArrayLists (20 points)
    Write a program called ThreeArrayLists.java that declares three ArrayList objects referenced by the objects named priceList, quantityList, and amountList. Each ArrayList should be declared in main() and should be capable of holding a minimum of 10 double-precision numbers.
    • The numbers that should be stored in priceList are 10.62, 14.89, 13.21, 16.55, 18.62, 9.47, 6.58, 18.32, 12.15, 3.98.
    • The numbers that should be stored in quantityList are 4, 8.5, 6, 7.35, 9, 15.3, 3, 5.4, 2.9 4.8.
    Your program should pass object references to these three ArrayList objects to a method named extend(), which should calculate the elements in the amountList ArrayList as the product of the corresponding elements in the priceList and quantityList ArrayList, for example, amountList.add(priceList.get(i) * quantityList.get(i)).
    After extend() has put values into the amountList ArrayList object, create a method that displays the results of all three lists. Appropriate formatting techniques need to be used to produce a formatted output.
    Tip: It is a good idea to create two arrays of type double to store the values that correspond to the price and the values that correspond to the quantity, for example:
    double[] PRICE_ARRAY = { 10.62, 14.89, 13.21, 16.55, 18.62, 9.47, 6.58, 18.32, 12.15, 3.98 };
    double[] QUANTITY_ARRAY = { 4.0, 8.5, 6.0, 7.35, 9.0, 15.3, 3.0, 5.4, 2.9, 4.8 };
    Sample program output:
    1) 10.62 * 4.0 = 42.48
    2) 14.89 * 8.5 = 126.56
    3) 13.21 * 6.0 = 79.26
    4) 16.55 * 7.35 = 121.64
    5) 18.62 * 9.0 = 167.58
    6) 9.47 * 15.3 = 144.89
    7) 6.58 * 3.0 = 19.74
    8) 18.32 * 5.4 = 98.93
    9) 12.15 * 2.9 = 35.24
    10) 3.98 * 4.8 = 19.1

    Learn More
  2.  MIS562 Week 2 Homework Oracle Queries

    MIS562 Week 2 Homework Oracle Queries Database

    $25.00

    MIS562 Week 2 Homework Oracle Queries

    Create the tables from demo.sql script as follows:
    Download and copy the demo.sql file from the Doc Sharing to the C:\temp directory. At the sql prompt enter the command @V:\temp\demo.sql.  This will create some tables and insert data into them. View the script in notepad to determine the table names that were created. Use the describe command to view the structure of the tables. Please use the instructions in the Submission Requirements to create and submit a document with your solutions. Submissions that do not meet the Requirements will be returned with a grade of zero and will be accepted and graded when corrected and re-submitted. Anyone having difficulties can obtain assistance in the TDAs.


    Write SQL statements to create result tables showing the solutions to the following requests.
    1. (4 pts) List all employee information in department 30.
    2. (4 pts) List employees name, job, and salary that is a manager and has a salary > $1,000
    3. (4 pts) Repeat exercise 2 for any employee that is not a manager or earns a salary > $1,000
    4. (4 pts) Show all employee names and salary that earn between $1,000 and $2,000.  Use the between operator.
    5. (4 pts) Select all employees that are in department 10 and 30. Use the IN operator.
    6. (4 pts) Select all employee names with an “A” in the first position of the employee name.  Use the substring function or a wild card.
    7. (4 pts) Select all employees with an “A” as the second character of their name.  Use a wildcard.
    8. (4 pts) List the employee names in alphabetical sequence.
    9. (4 pts) List the job, salary, and employee name in job order and then salary in descending order.
    10. (4 pts) Show a list of different jobs.  Eliminate repeating values.
    11. (4 pts) Show employee names, salary that has not earned a commission yet.
    12. (4 pts) Show the employee name, salary, commission, and the total of salary and commission. Be sure you evaluate null values correctly.
    13. (4 pts) Write an SQL query that retrieves data from the COURSE table for courses that cost 1195, and whose descriptions do not start with ‘Intro’, sorted by their prerequisites in descending order.
    14. (4 pts) Write an SQL query that retrieves data from the STUDENT table for students whose last names begin with “A” though “T” and who work for ‘Competrol Real Estate’, sorted by the last names.
    15. (4 pts) Determine which student does not have the first letter the last name capitalized.  Show the STUDENT_ID and LAST_NAME columns.
    16. (4 pts) Check if any of the phone numbers in the INSTRUCTOR table have not been entered in the (###)###-#### format.  Show the instructor last name and the phone number that is in the incorrect format.
    17. (4 pts) Write an SQL statement that uses the CAST function that converts a number datatype to a varchar datatype.
    18. (4 pts) Write a SQL statement that converts a date datatype to a char datatype.
    19. (4 pts) Write a SQL statement that convert a number value to a character.

    Before doing problems 20 - 25 Download and Execute the script demoaddrows.sql from the Doc Sharing to add rows into the two tables above. Write SQL statements and produce result tables to solve the following requests.
    20. (2 pts) Show a list of different jobs.  Eliminate repeating values.
    21. (2 pts) How many employees are working at each job in each department and what the sums and averages are for the salary of those employees?
    22. (2 pts) Show the employee name with the maximum salary
    23. (2 pts) Show the average salary for all employees that are not managers.
    24. (2 pts) What is the difference between the highest and lowest salary?
    25. (2 pts) Select employee number, name for all employees with salaries above the average salary. Use a subquery.

    Before doing problems 26 through 31 Create the text Student tables with the createStudent.sql script. The script and instructions are in the schemaset.zip file available in the Doc Sharing. Download and unzip the files from the Doc Sharing to a C: drive directory such as the \temp directory. At the sql prompt enter the command @V:\temp\createStudent.sql. This will create  tables exactely as they are portrayed in the text and insert data into them.
    26. (2 pts) Show the state and the number of zip codes by state. Order the result by number of zip codes in descending sequence. Use the ZIPCODES table.
    27. (2 pts) Which city has the most zip codes assigned to it? Use a TOP-N query.
    28. (2 pts) Show the state and the number of zip codes by state. Order the result by number of zip codes in descending sequence and exclude all states having less than 5 zip codes.
    29. (2 pts) Show the Student_ID, last name, and the number of enrollments for the student. Show only students with more than 2 enrollments. Use an Inline view.
    30. (2 pts) Show the number of students enrolled and zip code for New York and where the city begins with 'W'. Use a Scalar subquery.
    31. (2 pts) Display the course number and description of courses with no enrollment. Also include courses which have no section assigned.

    Learn More
  3. COP3804 Assignment 4 Infix to Postfix

    COP3804 Assignment 4 Infix to Postfix

    $15.00

    COP3804 Assignment 4 Infix to Postfix

    The concept of stack is extremely important in computer science and is used in a wide variety of problems. This assignment requires you to write a program that can be used to evaluate ordinary arithmetic expressions that contains any of the five arithmetic operators (+, -, *, /, %).

    This exercise requires three distinct steps, namely:
    1. Verify that the infix arithmetic expression (the original expression), that may contain regular parentheses, is properly formed as far as parentheses are concerned.
    2. If the parenthesized expression is properly formed, convert the expression from an infix expression to its equivalent postfix expression, called Reverse Polish Notation (RPN) named after the Polish Mathematician J. Lukasiewics.
    3. Evaluate the postfix expression, and print the result.

    Step 1 - Verify that the expression
    Given an arithmetic expression, called an infixed expression, to verify that it is properly formed as far as parentheses are concerned, do the following:
    • Create an empty stack to hold left parenthesis ONLY.
    • Scanned the arithmetic expression from left to right, one character at a time.
    • While there are more characters in the arithmetic expression
    {
    If the character is a left parenthesis ‘(‘, push it on to the stack. However if the character is a right parenthesis, ‘)’, visit the stack and pop the top element from off the stack.
    }
    • If the stack contains any element at the end of reading the arithmetic expression, then the expression was not properly formed.

    Step 2 - Convert infixed expression to postfix
    Given that an arithmetic expression is properly form with respect to parentheses, do the following:
    • Create an empty stack to hold any arithmetic operators and left parenthesis, ONLY.
    • A string to contain the postfix expression – the output from this conversion.
    • Scan the arithmetic expression from left to right.
    • While the are more symbols in the arithmetic expression,
    {
    After a symbol is scanned, there are four (4) basic rules to observed and apply accordingly:
    1. If the symbol is an operand (a number), write it to the output string.
    2. If the symbol is an operator and if the stack is empty, push the symbol on the stack.
    Otherwise, if the symbol is either ‘(‘ or ‘)’, check for the following conditions:
    If the symbol is ‘(‘, push on to the stack,
    Otherwise
    If the symbol is ‘)’
    {
    Pop everything from the operator stack down to the first ‘(‘. Write each item
    popped from the stack to the output string. Do not write the item ‘)’. Discard it.
    }
    3. If the symbol scanned is an arithmetic operator, check for the following and apply accordingly:
    If the operator on the top of the stack has higher or equal precedence, that operator is popped from off the stack, and is written to the to the output string. This process is continues until one of two things happen:
    (a) Either the first ‘(‘ is encountered. When this occurs, the ‘(‘ is removed from the stack and is discarded, and the recently scanned symbol is placed on the stack
    OR
    (b) The operator on the stack has lower precedence than the one just scanned. When this situation arises, the recently scanned symbol is pushed onto the stack.
    }
    4. After the arithmetic expression is exhausted, any operator is remaining on the stack must be popped from off and is written to the output string.

    Step 3 - Evaluate the post fixed expression
    Initialize an empty stack.
    While there are more symbols in the postfix string
    {
    ? If the token is an operand, push it onto the stack.
    ? If the token is an operator
    {
    Pop the two topmost values from the stack, and store them in the order t1, the topmost, and t2 the second value.
    Calculate the partial result in the following order t2 operator t1
    Push the result of this calculation onto the stack.
    NOTE: If the stack does not have two operands, a malformed postfix expression has occurred, and evaluation should be terminated.
    }
    }
    When the end of the input string is encountered, the result of the expression is popped from the stack.
    NOTE: If the stack is empty or if it has more than one operand remaining, the result is unreliable.

    Extend this algorithm to include square brackets and curly braces. For example, expressions of the following kind should be considered
    2 + { 2 * ( 10 – 4 ) / [ { 4 * 2 / ( 3 + 4) } + 2 ] – 9 }
    2 + } 2 * ( 10 – 4 ) / [ { 4 * 2 / ( 3 + 4) } + 2 ] – 9 {

    Implement the above two algorithms for the following binary operators: addition +, subtraction -, multiplication *, division /, and modulus operation %. All operations are integer operations. To keep things simple, place at least one blank space between each token in the input string.

    Use the following code below as your Main Test class:
    class RPN
    {
    public static void main(String[] arg)
    {
    String s[] = {"5 + ) * ( 2",
    " ( { [ } ) ] ",
    " 2 + ] - 3 * 5 [ ",
    "[( 2 + 3 ) * 5] * 8 ",
    "5 * 10 + ( 15 - 20 ) ) - 25",
    "5 * { 10 + ( 15 - 20 ) } - 25",
    " 5 + [ 5 * { 10 + ( 15 - 20 ) } - 25 ] * 9"
    };
    for (int i = 0; i < s.length; i++)
    {

    Arithmetic a = new Arithmetic(s[i]);
    if (a.isBalance())
    {
    System.out.println("Expression " + s[i] + " is balanced\n");
    a.postfixExpression();
    System.out.println("The post fixed expression is " + a.getPostfix());
    a.evaluateRPN();
    System.out.println("The result is : " + a.getResult() + "\n" );
    }
    else
    System.out.println("Expression is not balanced\n");
    }
    }
    }

    Learn More
  4. ITS 320 Program 3 Exercise 5.17 Java

    ITS 320 Assignment 3 Decision Control and Loops with User Interaction

    $15.00

    ITS 320 Assignment 3 Decision Control and Loops with User Interaction

    1) Write a Java application that prompts the user for pairs of inputs of a product number (1-5), and then an integer quantity of units sold (this is two separate prompts for input values). You must use a switch statement and a sentinel – controlled loop (i.e. a loop that stops execution when an out of range value, such as -1, is input). All 15 items below are for a single purchase. There are five sets of inputs as follows:
    Product 1 1 unit (cost is $2.98 per unit)
    Product 2 2 units (cost is $4.50 per unit)
    Product 3 3 units (cost is $9.98 per unit
    Product 4 4 units (cost is $4.49 per unit)
    Product 5 5 units (cost is $6.87 per unit)
    Your application must calculate and display the total retail value of all products sold, after all 5 pairs of inputs are completed. You must also display the total after each new pair of input values is entered. (This program was taken from Exercise 5.17 on page 228 of Deitel & Deitel's "Java How to Program (Sixth Edition)" (2005 by Pearson Publishing Co.))

    2) You may use the Windows Command Prompt command line interface or any Java IDE you choose to compile and execute your program.

    3) You are to submit the following deliverables to the Assignment Dropbox in a single Microsoft Word file:
    A screen snapshot of your Java source code (just the beginning is OK) as it appears in your IDE (e.g. jGRASP, Net Beans, Eclipse, etc.) or editor (e.g. a Windows Command Prompt DOS "more" of the .java file's first screen).
    A listing of your entire Java source code in the same Microsoft Word file as item a), and following item a). You can simply copy and paste the text from your IDE into Word. Be sure to maintain proper code alignment by using Courier font for this item.
    A screen snapshot of your program’s input and output in the same Microsoft Word file, and following item b). You must include screen snapshots of all inputs and all outputs,not just a sample.

    4) Your instructor may compile and run your program to verify that it compiles and executes properly.

    5) You will be evaluated on (in order of importance):
    Inclusion of all deliverables in Step #3.
    Correct execution of your program.
    Adequate commenting of your code.
    Good programming style (as specified in the textbook's examples).
    Neatness in packaging and labeling of your deliverables

    Learn More
  5. ITS 320 Java Program 1 Compiled

    ITS 320 Java Program 1 Verify Java and IDE Setup

    $12.00

    ITS 320 Java Program 1 Verify Java and IDE Setup

    This simple exercise is meant to verify that you’ve properly installed Java SE and an IDE on your computer so that you are ready for the later programming assignments in this class.

    Type in the following program source code from Joyce Farrell’s 4th Edition Java textbook to your IDE. Then modify the comments for your name and the current date, and change the class file name to reflect your first name. Then compile your code.

    /**
    Program #1
    Function: Simple Java application to demonstrate the behavior of
    different data types, arithmetic, concatenation, and
    output of results.
    Programmed By: Reggie Haseltine, instructor (July 18, 2009)
    Code Taken From: "Java Programming (Fourth Edition" by Joyce Farrell,
    Figure 2-26, page 61
    */

    public class P1_Reggie {
    public static void main(String[] args) {
    int oneInt = 315;
    short oneShort = 23;
    long oneLong = 1234567876543L;
    int value1 = 43, value2 = 10, sum, difference, product, quotient, modulus;
    boolean isProgrammingFun = true;
    double doubNum1 = 2.3, doubNum2 = 14.8, doubResult
    char myGrade = 'A', myFriendsGrade = 'C';
    System.out.println("Our grades are " + myGrade + " and "
    + myFriendsGrade);
    doubResult = doubNum1 + doubNum2;
    System.out.println("The sum of the doubles is " + doubResult);
    doubResult = doubNum1 * doubNum2;
    System.out.println("The product of the doubles is " + doubResult);
    System.out.println("The value of isProgrammingFun is "
    + isProgrammingFun);
    System.out.println("The value of isProgrammingHard is "
    + isProgrammingFun);
    System.out.println("The int is " + oneInt);
    System.out.println("The short is " + oneShort);
    System.out.println("The long is " + oneLong);
    sum = value1 + value2;
    difference = value1 - value2;
    product = value1 * value2;
    quotient = value1 / value2;
    modulus = value1 % value2;
    System.out.println("Sum is " + sum);
    System.out.println("Difference is " + difference);
    System.out.println("Product is " + product);
    System.out.println("Quotient is " + quotient);
    System.out.println("Modulus is " + modulus);
    System.out.println("\nThis is on one line\nThis on another");
    System.out.println("This shows\thow\ttabs\twork");
    }
    // end method main
    }

    Then execute the .class file and verify that you get the following output.

    Learn More
  6. MIS562 Week 4 Homework Part 1

    MIS562 Week 4 Homework Oracle Queries Database

    $25.00

    MIS562 Week 4 Homework Oracle Queries Database

    Part 1
    Using the tables created in week 2:
    Question ( 4 pts per question)
    1. Show a list of all employee names and their department names and the employees for each department. Be sure to show all departments whether there is an employee in the department or not. Use an outer join.
    2. Select all employee names and their department names. Be sure to show all employees whether they are assigned to a department or not. Use an outer join.

    Using the student schema:
    Question ( 3 pts per question)
    3. Write a query that that performs an inner join of the grade, student, and grade_type tables using ANSI SQL 99 syntax.
    4. Write a query that that performs an inner join of the grade, student, and grade_type tables using the Oracle inner join convention.
    5. List all the zip codes in the ZIPCODE table that are not used in the STUDENT or INSTRUCTOR tables. Use a set operator.
    6. Write a SQL statement using a set operator to show which students enrolled in a section that are not enrolled in any classes. Exclude students with student id less than 300.

    Part 2
    Question ( 5 pts per question)
    1. Write and execute two INSERT statements to insert rows into the ZIPCODE table for the following two cities of your choice. After your INSERT statements are successful, make the changes permanent.
    2. Create a sequence called STUDENT_ID_NEW that begins with 900 and increments by 1. If the sequence already exists, drop the sequence and recreate it.
    3. Make yourself a student by writing and executing an INSERT statement to insert a row into the STUDENT table with data about you. Use one of the zip codes you inserted in Exercise 1. Only insert values into the columns STUDENT_ID using the sequence you created in step 2, FIRST_NAME, LAST_NAME, ZIP, REGISTRATION_DATE (use a date that is five days after today), CREATED_BY, CREATED_DATE, MODIFIED_BY, and MODIFIED_DATE. Issue a COMMIT command afterwards.
    4. Write an UPDATE statement to update the data about you in the STUDENT table. Update the columns SALUTATION, STREET_ADDRESS, PHONE, and EMPLOYER. Be sure to also update the MODIFIED_DATE column and make the changes permanent
    5. Delete the row in the STUDENT table and the two rows in the ZIPCODE table you created. Be sure to issue a COMMIT command afterwards
    6. Create a table called TEMP_STUDENT with the following columns and constraints: a column STUDID for student ID that is NOT NULL and is the primary key, a column FIRST_NAME for student first name; a column LAST_NAME for student last name, a column ZIP that is a foreign key to the ZIP column in the ZIPCODE table, a column REGISTRATION_DATE that is NOT NULL and has a CHECK constraint to restrict the registration date to dates after January 1st, 2000.
    7. Write an INSERT statement violating at least two of the constraints for the TEMP_STUDENT table you just created.
    8. Write another INSERT statement that succeeds when executed, and commit your work.
    9. Alter the TEMP_STUDENT table to add two more columns called EMPLOYER and EMPLOYER_ZIP. The EMPLOYER_ZIP column should have a foreign key constraint referencing the ZIP column of the ZIPCODE table. Update the EMPLOYER column.
    10. Alter the table once again to make the EMPLOYER column NOT NULL.
    11. Write a statement that drops the EMPLOYER_ZIP column.
    12. Drop the TEMP_STUDENT table once you're done with the exercise.
    13. Create a non unique index called crse_modified_by_i on the MODIFIED_BY column of the course table
    14. Change the registration date of Paula Valentine to today’s date. Create a view called CURRENT_REGS reflecting all students that registered today. (You will need to execute this query in question 6 on the same day you change the date)
    15. Create a view called roster reflecting all students taught by the instructor Marilyn Frantzen. Query the view.
    16. Given the MY_EMPLOYEE view, what information is the user allowed to retrieve? Who can update the SALARY column through the view? Hint: The USER function returns the name of the currently logged in user.
    CREATE OR REPLACE VIEW my_employee AS
    SELECT employee_id, employee_name, salary, manager
    FROM employee
    WHERE manager = USER
    WITH CHECK OPTION CONSTRAINT my_employee_ck_manager

    Learn More
  7. Big Java Chapter 8 Programming Exercise P8.3

    Big Java Chapter 8 Programming Exercise P8.3

    $5.00

    Big Java Chapter 8 Programming Exercise P8.3

    Real cash registers can handle both bills and coins. Design a single class that expresses the commonality of these concepts. Redesign the CashRegister class and provide a method for entering payments that are described by your class. Your primary challenge is to come up with a good name for the class.

    Learn More
  8. Big Java Chapter 8 Programming Exercise P8.4 BankAccount

    Big Java Chapter 8 Programming Exercise P8.4 BankAccount Solution

    $5.00

    Big Java Chapter 8 Programming Exercise P8.4 BankAccount

    Enhance the BankAccount class by adding preconditions for the constructor and the deposit method that require the amount parameter to be at least zero, and a precondition for the withdraw method that requires amount to be a value between 0 and the current balance. Use assertions to test the preconditions.

    Learn More
  9. Big Java Chapter 8 Programming Exercise P8.13 Numeric Solution

    Big Java Chapter 8 Programming Exercise P8.13 Numeric Solution

    $5.00

    Big Java Chapter 8 Programming Exercise P8.13 Numeric Solution

    Consider the following algorithm for computing xn for an integer n. If  n < 0, xn is 1/x–n. If n is positive and even, then xn = (xn/2)2. If n  is positive and odd, then xn = xn–1 ⋅ x. Implement a static method double intPower(double x, int n) that uses this algorithm. Add it to a class called Numeric.

    Learn More
  10. Visual C# 2010 How to Program Deitel Chapter 9 Duplicate Word Removal

    Visual C# 2010 How to Program Deitel Chapter 9 Exercise 9.4 Solution

    $12.00

    Visual C# 2010 How to Program Deitel Chapter 9 Exercise 9.4 Solution

    9.4 (Duplicate Word Removal) Write a console application that inputs a sentence from the user (assume no punctuation), then determines and displays the non-duplicate words in alphabetical order. Treat uppercase and lowercase letters the same. [Hint: You can use string method Split with no arguments, as in sentence.Split(), to break a sentence into an array of strings containing the individual words. By default, Split uses spaces as delimiters. Use string method ToLower in the select and orderby clauses of your LINQ query to obtain the lowercase version of each word.]

    Learn More

Items 21 to 30 of 180 total

per page
Page:
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5

Grid  List 

Set Descending Direction
[profiler]
Memory usage: real: 14680064, emalloc: 14284464
Code ProfilerTimeCntEmallocRealMem