Welcome to AssignmentCache!

Search results for 'university database cis'

Items 1 to 10 of 383 total

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

Grid  List 

Set Ascending Direction
  1. DAT380 Week 5 LAB 5.7 - Implement supertype and subtype entities (Sakila)

    DAT/380 Week 5 LAB 5.7 - Implement supertype and subtype entities (Sakila)

    Regular Price: $5.00

    Special Price $3.00

    DAT/380 Week 5 LAB 5.7 - Implement supertype and subtype entities (Sakila)

    Refer to the customer and staff tables of the Sakila database. These tables have many columns in common and represent similar entities. Convert the customer and staff entities into subtypes of a new supertype person:

    In the center is the person entity, with primary key person_id and additional attributes first_name, last_name, email, active, and last_update. The person entity contains subtype entities staff and customer. The staff entity has primary key person_id and additional attributes picture, username, and password. The customer entity has primary key person_id and additional attribute create_date. Cardinality does not appear after the primary keys and attributes. On the left is the address entity, connected to the person entity by the belongs_to relationship. Belongs_to has cardinality 1(1) on the address side and M(0) on the person side. On the right is the store entity, connected to the person entity by the works_at relationship. Works_at has cardinality 1(1) on the store side and M(0) on the person side.

    The diagram uses Sakila naming conventions. Follow the Sakila conventions for your table and column names:
    All lower case
    Underscore separator between root and suffix
    Foreign keys have the same name as referenced primary key

    Implement supertype and subtype entities as person, customer, and staff tables with primary key person_id.

    Implement attributes as columns:
    All columns are NOT NULL.
    The person_id columns have data type SMALLINT UNSIGNED.
    The last_update and create_date columns have data type TIMESTAMP.
    The picture column has data type BLOB.
    All other columns have data type VARCHAR(20).

    Implement the dependency relationships between subtype and supertype entities as foreign keys:
    The person_id columns of customer and staff become foreign keys referring to person.
    Specify CASCADE actions for both relationships.

    Implement the belongs_to and works_at relationships as foreign keys:
    belongs_to becomes an address_id foreign key in person referring to address.
    works_at becomes a store_id foreign key in staff referring to store.
    Specify RESTRICT actions for both relationships.

    The address and store tables, with primary keys address_id and store_id, are pre-defined in the zyLab environment. Foreign keys must have the same data types as the referenced primary keys:
    address_id has data type SMALLINT UNSIGNED.
    store_id has data type TINYINT UNSIGNED.

    If you execute your solution with the Sakila database, you must first drop customer, staff, and all constraints that refer to these tables. Use the following statements with Sakila only, not in the zyLab environment:
    DROP TABLE customer, staff;
    ALTER TABLE payment
    DROP CONSTRAINT fk_payment_customer,
    DROP CONSTRAINT fk_payment_staff;
    ALTER TABLE rental
    DROP CONSTRAINT fk_rental_customer,
    DROP CONSTRAINT fk_rental_staff;
    ALTER TABLE store
    DROP CONSTRAINT fk_store_staff;

    Learn More
  2. DAT380 Week 5 LAB 5.6 - Implement independent entity (Sakila)

    DAT/380 Week 5 LAB 5.6 - Implement independent entity (Sakila)

    Regular Price: $5.00

    Special Price $3.00

    DAT/380 Week 5 LAB 5.6 - Implement independent entity (Sakila)

    Implement a new independent entity phone in the Sakila database. Attributes and relationships are shown in the following diagram:

    The phone entity appears on the right. The phone entity contains four attributes, each followed by cardinality information: phone_id 1-1(1), country_code M-1(1), phone_numer M-1(1), and phone_type M-1(0). Three entities appear on the left: store, staff, and customer, connected to the phone entity by three identical relationships. The three relationships are named 'has' and have cardinality 1(0) on both sides.

    The diagram uses Sakila naming conventions. Follow the Sakila conventions for your table and column names:
    All lower case
    Underscore separator between root and suffix
    Foreign keys have the same name as referenced primary key

    Write CREATE TABLE and ALTER TABLE statements that:
    1. Implement the entity as a new phone table.
    2. Implement the has relationships as foreign keys in the Sakila customer, staff, and store tables.
    3. Remove the existing phone column from the Sakila address table.

    Step 2 requires adding a foreign key constraint to an existing table. Ex:
    ALTER TABLE customer
    ADD FOREIGN KEY (phone_id) REFERENCES phone(phone_id)
    ON DELETE SET NULL
    ON UPDATE CASCADE;

    Specify data types as follows:
    phone_id, phone_number, and country_code have data type INT.
    phone_type has date type VARCHAR(12) and contains strings like 'Home', 'Mobile', and 'Other'.

    Apply these constraints:
    NOT NULL constraints correspond to cardinalities on the diagram above.
    Foreign key actions are SET NULL for delete rules and CASCADE for update rules.
    Specify a suitable column as the phone table primary key.

    Learn More
  3. DAT380 Week 4 LAB 4.6 - Select lesson schedule with inner join

    DAT/380 Week 4 LAB 4.6 - Select lesson schedule with inner join

    Regular Price: $5.00

    Special Price $3.00

    DAT/380 Week 4 LAB 4.6 - Select lesson schedule with inner join

    The database has three tables for tracking horse-riding lessons:
    Horse with columns:
    ID - primary key
    RegisteredName
    Breed
    Height
    BirthDate

    Student with columns:
    ID - primary key
    FirstName
    LastName
    Street
    City
    State
    Zip
    Phone
    EmailAddress

    LessonSchedule with columns:
    HorseID - partial primary key, foreign key references Horse(ID)
    StudentID - foreign key references Student(ID)
    LessonDateTime - partial primary key

    Write a SELECT statement to create a lesson schedule with the lesson date/time, horse ID, and the student's first and last names. Order the results in ascending order by lesson date/time, then by horse ID. Unassigned lesson times (student ID is NULL) should not appear in the schedule.

    Hint: Perform a join on the Student and LessonSchedule tables, matching the student IDs.

    Learn More
  4. PRG 211 Week 1 Lab 3.8 Using math functions Program

    PRG 211 Week 1 Labs

    Regular Price: $15.00

    Special Price $12.00

    Lab 3.1 Formatted Output Hello World!

    Write a program the outputs 'Hello World!'


    Lab 3.2 Formatted output: No parking sign.

    Write a program that prints a formatted "No parking" sign. Note the first line has two leading spaces.
    NO PARKING
    1:00 - 5:00 a.m.


    Lab 3.3 House real estate summary

    Sites like Zillow get input about house prices from a database and provide nice summaries for readers. Write a program with two inputs, current price and last month's price (both integers). Then, output a summary listing the price, the change since last month, and the estimated monthly mortgage computed as (currentPrice * 0.045) / 12.

    Ex: If the input is 200000 210000, the output is:

    This house is $200000. The change is $-10000 since last month.
    The estimated monthly mortgage is $750.0.
    Note: Getting the precise spacing, punctuation, and newlines exactly right is a key point of this assignment. Such precision is an important part of programming.


    Lab 3.4 Caffeine levels

    A half-life is the amount of time it takes for a substance or entity to fall to half its original value. Caffeine has a half-life of about 6 hours in humans. Given caffeine amount (in mg) as input, output the caffeine level after 6, 12, and 18 hours.

    Ex: If the input is 100, the output is:

    After 6 hours: 50.0 mg
    After 12 hours: 25.0 mg
    After 18 hours: 12.5 mg
    Note: A cup of coffee has about 100 mg. A soda has about 40 mg. An "energy" drink (a misnomer) has between 100 mg and 200 mg.


    Lab 3.5 Divide by x.

    Write a program using integers userNum and x as input, and output userNum divided by x four times.

    Ex: If the input is 2000 2, the output is:

    1000 500 250 125
    Note: In Coral, integer division discards fractions. Ex: 6 / 4 is 1 (the 0.5 is discarded).


    Lab 3.6 Driving costs.

    Driving is expensive. Write a program with a car's miles/gallon and gas dollars/gallon (both floats) as input, and output the gas cost for 10 miles, 50 miles, and 400 miles.

    Ex: If the input is 20.0 3.1599, the output is:

    1.57995 7.89975 63.198
    Note: Small expression differences can yield small floating-point output differences due to computer rounding. Ex: (a + b)/3.0 is the same as a/3.0 + b/3.0 but output may differ slightly. Because our system tests programs by comparing output, please obey the following when writing your expression for this problem. First use the dollars/gallon and miles/gallon values to calculate the dollars/mile. Then use the dollars/mile value to determine the cost per 10, 50, and 400 miles.

    Note: Real per-mile cost would also include maintenance and depreciation.


    Lab 3.7 Simple statistics.

    Part 1
    Given 3 integers, output their average and their product, using integer arithmetic.

    Ex: If the input is 10 20 5, the output is:

    11 1000
    Note: Integer division discards the fraction. Hence the average of 10 20 5 is output as 11, not 11.666666666666666.

    Submit the above for grading. Your program will fail the test cases (which is expected), until you complete part 2 below but check that you are getting the correct average and product using integer division.

    Part 2
    Also output the average and product, using floating-point arithmetic.

    Ex: If the input is 10 20 5, the output is:

    11 1000
    11.666666666666666 1000.0


    Lab 3.8 Using math functions

    Given three floating-point numbers x, y, and z, output x to the power of y, x to the power of (y to the power of z), the absolute value of x, and the square root of (xy to the power of z).

    Ex: If the input is 5.0 6.5 3.2, the output is:

    34938.56214843421 1.2995143401732918e+279 5.0 262.42993783925596
    Hint: Coral has built-in math functions (discussed elsewhere) that may be used.


    Function Behavior Example
    SquareRoot(x) Square root of x SquareRoot(9.0) evaluates to 3.0.
    RaiseToPower(x, y) Raise x to power y: RaiseToPower(6.0, 2.0) evaluates to 36.0.
    AbsoluteValue(x) Absolute value of x AbsoluteValue(-99.5) evaluates to 99.5.

    Learn More
  5. Programming with Microsoft VB 2017 Diane Zak Chapter 11 Utilities Solution

    Programming with Microsoft VB 2017 Diane Zak Chapter 11 Utilities Solution

    Regular Price: $7.00

    Special Price $5.00

    Programming with Microsoft VB 2017 Diane Zak Chapter 11 Utilities Solution

    Open the Utilities Solution.sln file contained in the VB2017\Chap11\Utilities Solution-DataGrid folder.
    a. Create a SQL Server database named Utilities.mdf.
    b. Add the Bills table definition shown in Figure 11-64 to the database. The Month field's (Is Identity), Identity Increment, and Identity Seed properties are set to True, 1, and 1, respectively. (Recall that you need to expand the Identity Specification property to access these properties.)
    c. After defining the table, click the Update button and then click the Update Database button.
    d. Open the Data Sources window and start the Data Source Configuration Wizard. Connect the Utilities.mdf file to the application. Include the entire Bills table in the dataset.
    e. Set the Utilities.mdf file's Copy to Output Directory property to "Copy if newer".
    f. Drag the Bills table to the form. Set the DataGridView control's AutoSizeColumnsMode property to Fill.
    g. Open the DataGridView control's task list and click Dock in Parent Container. Click Edit Columns. Change the Month column's AutoSizeMode property to ColumnHeader.
    h. Click Electricity in the Edit Columns dialog box, click DefaultCellStyle, click the ... (ellipsis) button, click Format, click the ... (ellipsis) button, click Numeric, and then click the OK button. The Format box now shows N2. Change the Alignment property to MiddleRight and then click the OK button to close the CellStyle Builder dialog box.
    i. Now, format the Water and Gas columns using the Numeric setting with two decimal places. Also, align the values in both columns using the MiddleRight setting. When you are finished setting the properties, close the Edit Columns dialog box.
    j. Change the form's Size property to 330, 200.
    k. Open the Code Editor window and enter an appropriate Try...Catch statement.
    l. Save the solution and then start the application. Enter the three records shown in Figure 11-64. (Recall that the Month field is an auto-numbered field. The numbers 1, 2, and 3 will appear when you click the Save Data button.)
    m. Stop the application and then start it again to verify that the three records were saved.

    Learn More
  6. Programming with Microsoft VB 2017 Diane Zak Chapter 11 Total Cookie Sales Solution

    Programming with Microsoft VB 2017 Diane Zak Chapter 11 Total Cookie Sales Solution

    Regular Price: $7.00

    Special Price $5.00

    Programming with Microsoft VB 2017 Diane Zak Chapter 11 Total Cookie Sales Solution

    Open the Total Cookie Sales Solution.sln file contained in the VB2017\Chap11\Total Cookie Sales Solution folder
    a. Figure 11-63 shows the Sales table contained in the CookieSales.mdf file. The table contains the numbers of boxes of cookies sold in each of six weeks. The database is already connected to the application and the CookieSalesDataSet has already been created.

    b. Open the Data Sources window and then drag the Sales table to the DataGridView control. Change the control's AutoSizeColumnsMode to Fill. Use the control's task list to disable adding, editing, and deleting records. Also, right-align the numbers in the cookie sales columns.

    c. Lock the controls on the form. Start the application to verify that the six records appear in the DataGridView control. Stop the application.

    d. The Calculate button should display the total sales for each cookie type. Code the btnCalc_Click procedure. (The database does not allow NULLs in any of the fields, so you do not need to check if a field contains the NULL value.)

    e. Save the solution and then start and test the application.

    Learn More
  7. Programming with Microsoft VB 2017 Diane Zak Chapter 10 Fence Solution

    Programming with Microsoft VB 2017 Diane Zak Chapter 10 Fence Solution

    Regular Price: $7.00

    Special Price $5.00

    Programming with Microsoft VB 2017 Diane Zak Chapter 10 Fence Solution

    In this exercise, you create an application that can be used to calculate the cost of installing a fence around a rectangular area. Create a Windows Forms application. Use the following names for the project and solution, respectively: Fence Project and Fence Solution. Save the application in the VB2017\Chap10 folder:

    a. Use Windows to copy the Rectangular.vb file from the VB2017\Chap10 folder to the Fence Project folder. Then, use the Project menu to add the file to the project.

    b. Modify the Rectangular class to use the Double (rather than Integer) variables.

    c. Add a method named GetPerimeter to the Rectangle class. The method should calculate and return the perimeter of a rectangle. To calculate the perimeter, the method will need to add together the length and width measurements and then multiply the sum by 2.

    d. Create the interface shown in Figure 10-41 and then code the application. Save the solution and then start and test the application.

    Learn More
  8. IT 140 HigherLower Game Pseudocode Project One

    IT 140 Higher/Lower Game Pseudocode Project One

    Regular Price: $8.00

    Special Price $5.00

    IT 140 Higher/Lower Game Pseudocode Project One

    Higher/Lower Game Description
    Your friend Maria has come to you and said that she has been playing the higher/lower game with her three-year-old daughter Bella. Maria tells Bella that she is thinking of a number between 1 and 10, and then Bella tries to guess the number. When Bella guesses a number, Maria tells her whether the number she is thinking of is higher or lower or if Bella guessed it. The game continues until Bella guesses the right number. As much as Maria likes playing the game with Bella, Bella is very excited to play the game all the time. Maria thought it would be great if you could create a program that allows Bella to play the game as much as she wants.

    For this assignment, you will be designing pseudocode for a higher/lower game program. The higher/lower game program uses similar constructs to the game you will design and develop in Projects one and Two.

    1) Review the Higher/Lower Game Sample Output for more detailed examples of this game. As you read, consider the following questions:
    What are the different steps needed in this program? How can you break them down in a way that a computer can understand?
    What information would you need from the user at each point (inputs)? What information would you output to the user at each point?
    When might it be a good idea to use "IF" and "IF ELSE" statements?
    When might it be a good idea to use loops?

    2) Create a pseudocode that logically outlines each step of the game program so that it meets the following functionality:
    Prompts the user to input the lower bound and upper bound. Include input validation to ensure that the lower bound is less than the upper bound.
    Generates a random number between the lower and upper bounds
    Prompts the user to input a guess between the lower and upper bounds. Include input validation to ensure that the user only enters values between the lower and upper bound.
    Prints an output statement based on the guessed number. Be sure to account for each of the following situations through the use of decision branching:
    What should the computer output if the user guesses a number that is too low?
    What should the computer output if the user guesses a number that is too high?
    What should the computer output if the user guesses the right number?
    Loops so that the game continues prompting the user for a new number until the user guesses the correct number.

    OPTIONAL: If you would like to practice turning your designs into code, check out the optional 9.1 LAB: Higher/Lower Game in zyBooks. This step is optional but will give you additional practice turning designs into code, which will support your work in moving from Project One to Project Two.

    Learn More
  9. CIS355A Week 6 Lab - Database Connectivity Student Management System Add student

    CIS355A Week 6 Lab - Database Connectivity Student Management System

    Regular Price: $10.00

    Special Price $8.00

    CIS355A Week 6 Lab - Database Connectivity Student 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

    RUBRIC
    Student class
    • Has all required functionality 10
    GUI class
    • Student record can be saved
    • All student data can be displayed 15
    StudentDB class
    • add method inserts a record into db.
    • get method reads all records and returns in arraylist. 15
    Code style 5
    Lab Report 10
    TOTAL 55

    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).

    Learn More
  10. CIS355A Week 5 Lab - File Processing Stocks4U FileReader

    CIS355A Week 5 Lab - File Processing Stocks4U

    Regular Price: $10.00

    Special Price $8.00

    CIS355A Week 5 Lab - File Processing Stocks4U

    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. 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 prompt for file name using JOptionPane, read the file and populate the JList.
    File - save should prompt for file name 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.

    RUBRIC
    Stock class toString modified 5
    GUI class
    • Menu is added.
    • Label is added for total portfolio value.
    • Open menu item reads data from a file and displays in list box.
    • Save menu item writes data to a text file in proper format.
    • Total value is updated whenever any changes are made to stocks (add, remove, open a new file). 15
    StockIO class
    • getData method reads from file to array list
    • saveData method writes from array list to file 20
    Code style 5
    Lab Report 10
    TOTAL 55

    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).

    Learn More

Items 1 to 10 of 383 total

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

Grid  List 

Set Ascending Direction
[profiler]
Memory usage: real: 14942208, emalloc: 14374896
Code ProfilerTimeCntEmallocRealMem