Open Access and create a new database named – Get Instant Answers

EMAIL US at to get answers of any of these questions Or Click on the bottom right CHAT Button to get it Instantly


Open Access and create a new database named “5-5 Applicants.”
Create a table named “Applicants” with the following fields: Date, Position, First Name, Last Name, and Phone. Select “Date” as the field type for the Date field. Select “Text” or “Short Text” as the field type for the other fields. Select the Phone field as the primary key.
Enter the following information into the table. Enter the current year in the dates (instead of 20–).
Date Position First Name Last Name Phone
Modify your Assignment 8 program so that a function, printLine, is used to print each line in the
triangle. This function should accept a single parameter, the line number of the line to be printed.
Your main() program should contain only (and exactly) the following:
int i;
Note: within the function printLine do not use “i” as the parameter name for the line number.
2010 Express Microsoft Visual
Write a C++ program to implement the concept of class inheritance using different types of bank accounts as a model. In this lab, you will create a base class, called CBankAccount, and two additional classes (each derived from CBankAccount), called CSavingsAccount and CCheckingAccount. CSCE 3110 –In this programming assignment, you will (1) write a complete C++ program to implement multiplication operations as directed and (2) perform an analysis with respect to the theoretical and experimental running time complexity.
The following C++ code for the multiply function computes the product of two operands using only addition:
int multiply(int operand1, int operand2)……..
You will prompt for and read in two operands as positive integers (i.e., > 0). Since
we are using bit shifting, you will limit the resulting product to the maximum
positive value supported by integers, enters an integer, though
possibly out of range, for this assignment.
Perform several runs of your program, ranging from product calculations using small integers to product calculations using large integers (but not overflowing the integer data structure). If your bitMultiply program was done correctly, you should see a significant improvement in the amount of time needed to perform the calculations, but did it improve by the expected amount? • Your code should be well documented in terms of comments. For example, good comments in general consist of a header (with your name, course section, date
Question 8 part (c)
Layer1, that is, physical layer and layer 2, that is, data link layer are common to USB2 and USB 3.
Layer 1 is the Physical Layer. This Layer includes Fiber, Twisted Pair (copper), Serial, USB, coaxial and others. In other words, interface connections and cabling. Some of those physical connections will be defined by the color of the cable: for fiber, Single Mode cable will be typically yellow and Multi Mode cable typically Orange. The fiber transceivers themselves are available in different kinds of connectors: SC, ST, LC.

Layer 2 is the Data Link Layer. The Data Link Layer covers how the data is transmitted over the Physical Layer 1. It packages raw bits from the physical layer into frames (logical, structured packets for data). It is protocol layer responsible for transferring frames from one node to another in a LAN or between network nodes in a WAN. Simply put, Layer 2 provides data transfer across the physical link.
Compute the running time T(N) for the following codes for any n > 0: Show all (a) int sum(int n) { int sum=0: for (int i = n: i < 0: i++) { for(int j = 0: j < n: j++) { sum=sum + 1: } } return sum: } (b) int sum (int n) { int sum = 0: for (int i = 0: i < n: i++) { for(int j = i: j < n: j++) { sum=sum + 1: } } return sum: }
CS701 Module2 Assignment
Write the following programs in this folder. Scenario: You decided to release the dove residing in your birdcage. But, you are keen in tracking the flight of the bird. So, you tied a sensor tag to the poor bird and decided to write a HTML5 application to monitor its path. Since you neither have the bird nor the sensor, you decided to simulate the path. Part 1 – Geolocation (30 Points) Using the HTML5 Geolocation API, write the LocationTracker.html and the associated Javascript file LocationTracker.js. You are free to use the html5.css from the samples. The initial rendering of the HTML page is shown below with placeholders for the location details and the Google map. When the Start button is clicked, get the current position using the Geolocaiton API and display the initial location in the map as shown below. After the initial location is displayed, use the setInterval method to invoke your method updateMyLocation every 5 seconds. The Start button is disabled from now on.
Part2 – HTML5 Drag and Drop and Local Storage (40 points) Democrat and Republican senators voting by their party lines through Drag and Drop. The application presents a list of senators and two areas representing Democrats and Republicans. The senators are dragged and dropped into their respective areas. The initial list is loaded through AJAX from the partyList.xml file (provided in the samples). Each senator is converted to a JSON object keeping track of the properties name, party, and voted (true or false). The list of senators is then stored in local storage.
Part 3 – Web Workers and Local Storage (30 Points) Your web application starts 5 web workers (computeWorker.js) and sends the messages to them to compute the sum of all the integers from the specified start value to the specified end value. The two values are send as a JSON object having start and end properties. The web worker computes the sum of all the integers from the specified start value to the specified end value and sends back the result. The result is sent as a JSON object having start, end, and result properties.

convert any of your earlier vb mail order programs that use message boxes for error message to use an error provider component
Exercise 1:
Create a function that accepts a single array as an argument. Given an array of integers, x, sort x and split the integers into three smaller arrays of equal length. If the length of x is not evenly divisible by three, increase the size of the smaller arrays by one starting from the first array. The function should return an array of arrays. Exercise 2:
Write a function that find the frequency occurrence of a letter in a sentence. The function should return an integer. (Do not use the str.count() default python function) Examples: find_frequency(“t”, “this is a test”) → 3 find_frequency(“y”, “this is a test”) → 0Exercise 3:
Write a function that identifies if an integer is a power of 2. The function should return a boolean. Explain why your function will work for any integer inputs that it receives.
1 Association rule mining
In this notebook, you’ll implement the basic pairwise association rule mining algorithm.
To keep the implementation simple, you will apply your implementation to a simplified dataset, namely, letters (“items”) in words (“receipts” or “baskets”). Having finished that code, you will then apply that code to some grocery store market basket data. If you write the code well, it will not be difficult to reuse building blocks from the letter case in the basket data case.
Let’s say you have a fragment of text in some language. You wish to know whether there are association rules among the letters that appear in a word.
b, where a and b are letters. You will write code to do that by calculating for each rule its confidence, conf(a =
You want to know whether there are association rules of the form, a =
“Confidence” will be another name for an estimate of the conditional probability of b given a, or
1.2 Sample text input
Let’s carry out this analysis on a “dummy” text fragment, which graphic designers refer to as the
Exercise 1 (normalize_string_test: 2 points). Complete the following function,
normalize_string(s). The input s is a string (str object). The function should return a new
string with (a) all characters converted to lowercase and (b) all non-alphabetic, non-whitespace
characters removed.
Clarification. Scanning the sample text, latin_text, you may see things that look like
special cases. For instance, inci[di]dunt and [do]. For these, simply remove the non-alphabetic characters and only separate the words if there is explicit whitespace.
For instance, inci[di]dunt would become incididunt (as a single word) and [do] would become do as a standalone word because the original string has whitespace on either side. A period or comma without whitespace would, similarly, just be treated as a non-alphabetic character inside a word unless there is explicit whitespace. So e pluribus.unum basium would become e pluribusunum basium even though your common-sense understanding might separate pluribus and unum.

There is a better way to specify the size of the array that we want the program to create and fill with random numbers, so we don’t have to change the code every time we want to test a different array size.
Do you know what it is?
Prepare to discuss this question in class (nothing to turn in).

(6 points) Complete the linear search method from today’s lecture. Create a class containing this method (as a static member) and a main method that, when run, creates and initializes an array with 100 random numbers and calls your search method for at least 5 values, three which are in the array and two which are not.
use System.out.printf to report the results of each search. Test your program and print out the class.
Note: the size of the array (100) should be defined using a constant field of the class.
(4 points) Modify the program to create an array large enough to hold 10,000 random numbers. Otherwise it should work as before. If you wrote the first version of the program well, you shouldn’t have to change much at all. Test as before, and print out your modified class.
There is a better way to specify the size of the array that we want the program to create and fill with random numbers, so we don’t have to change the code every time we want to test a different array size.
Do you know what it is?
Prepare to discuss this question in class (nothing to turn in).

For this interactive assignment, you will continue to utilize loops and functions and write a Python program that asks the user for an integer (number) greater than 1. Once the user enters an integer, it should then allow the user to choose between the following two options:
Once you have completed the program, take a screen shot of the completed functionality (including the input and the output) and save it in a Word document, along with the script.



Specific project checklist and grading rubric – Get Instant Answers

Checklist (grading sheet): Specific project checklist and grading rubric worksheet should be completed with your name in the highlighted cell and your initials in the checkboxes.
Project Description

The Department plans to purchase a humanoid robot. The Chairman would like you to write a program to show a greeting script the robot can use later.Your first task is to use the following script to prototype the robot for presentation:

The program should declare and initialize (i.e. create and assign values for) variables/constants to hold (at least) the following data:
Robot Name. This variable will hold the Robot Name. Initialize the variable with “Nao” or a name of your choice…
use the above variables when creating the output of the program, for example:

use the following for the computations in the program :

use the above variables when creating the output of the program, for example:

use the following for the computations in the program :

1 month = 30 days

Introduction to Ruby
You are given a sample memo that contains several e-mail addresses. You are to create a Ruby program that reads the memo in and outputs an accurate count of domain names found in the memo. A sample print-out should look something like the following:
Domain Results 3 time(s) 7 time(s) 1 time(s)
Below are the more detailed requirements:
as your Ruby file.
You will probably need to do some sort of iterating through the words in the memo (see a class Assume that the memo is located in assignment_two_text.txt file located in the same directory
slide example for finding word frequency). DO NOT USE a Ruby for in or loop construct. This will automatically bring your assignment grade down by a full grade (A => B and so on).
Each result row should print a distinct (non-repeated) domain name and the number of times it was counted.

Right-justify each result row (You will need to dig around the String API to see how to right-justify).

4.Each domain should include the top-level domain name (i.e.
5.Sort domain names alphabetically when outputting the results.
Submission Guidelines
directory as your assignmetn2.rb.
Commit both files to your local repo and then push your repo out to your private team repo on Call your Ruby file assignment2.rb. Download assignment_two_text.txt and store it in the same
github creating a remote branch called assignment2.
You can do one of the following to accomplish #2 above:
Create a local branch called assignment2 ($git checkout -b assignment2) and then push it out by doing $git push remote_alias assignment2
Work on a master branch in your repo and then do $git push remote_alias
Feel free to include a README with any comments.

You are a GIS intern in a land holdings company. The property owned by the company has been surveyed and the data is housed in text files on the company server. Impress your superiors by writing a Python script that creates polygons from these files.
This is the python_file sample that contains script and comments that provide background and examples
In this module we will cover reading from and writing to external, non-geospatial ### files such as text files or spreadsheets.

Practice Programming Challenge #1
A prime number is a whole number greater than 1 whose only factors are 1 and itself. A factor is a whole number that can be evenly divided into another number. The first few prime numbers are 2, 3, 5, 7, 11, 13, 17, 19, 23, and 29. The number 1 is not prime.
Create a java application that allows the user to repeatedly enter a number to find out it is a prime number.
The program should:
Prompt the user for a number greater than 1
Print out if the number is a prime number or not
Then ask the user if they would like to enter another number or quit
See sample below:

In addition, your program should also contain and demonstrate a method isPrime. This method should:
Take in one int as an argument
Return a boolean – true if the argument is prime, false if argument int is not prime
The main method of the program should call the isPrime method to determine if the number entered by the user is prime.

In this lab we will be combining our efforts in top-down programming, where we deliberately organize and structure our code with main functions and sub functions, but will also add in our skills in Graphic User Interface (GUI). We continue to build abstraction – where a few small, simple and concrete tasks are packaged together to perform a more general task. The top-down approach helps us organize our code like an outline organizes our writing. Again, we start with an algorithm (chart), then translate it into pseudocode of comments and function name definitions.

In the last lab you created code to play Rock-Paper-Scissors. You will be working with the same code (modify to resolve comments from your last lab), but rather than using input() you will now collect input using the GUI. Be creative about displaying messages to the player.

Submittal to
Because plagiarism in coding is dishonest, unethical, and is against the Miramonte Honesty Policy, you are required to submit your code to Make a Google Doc with your final code for Rock-Paper-Scissors and Word Jumble, and submit it to, Lab #8.

Problem #1 – Rock-Paper-Scissors Reprise (with GUI)
Game Requirements
Display messages on the canvas that explain to the user how to choose Rock, Scissors, or Paper. They may not input their choice with any text input box.
Once the player makes their selection, have the computer make a selection. Display both the player’s and computer’s selection on the Canvas (it is good programming practice to also display on the console to help you debug).
Keep your words to 5 and 6 letters each. This is like the Jumble in the newspaper and online games and will make the GUI display easier and more aesthetically pleasing.Overview
You need to create a program that allows a user to guess a word that has been jumbled together. This project focuses on Strings and String manipulation, as well as presenting output with the GUI.
Part 2: Frontend Development
Once you have a working game using the input() and console, you will now modify it to include GUI.

You will create a GUI (similar to the one below). You should be able to use the majority of your code from part 1 for the underlying logic, however you may need some new variables and a draw handler to make the GUI display correctly. Remember all your print statements must be turned into variables that can be displayed on the canvas.

Coding Assignment # 5 – Recipe Hunter
You are tasked with creating a Rails app that will display a recipe index based on a keyword entered.
1. Create a rails app called recipe_hunter
2. Generate RecipesController (recipes_controller.rb) that will have an index action
3. The above-mentioned controller should check if a request parameter keyword was passed in.
4. If it was – it should use it, and if not – it should use a default value of “chocolate” instead.
5. Create a model, Recipe (recipe.rb) that will contain a for class method that will take a keyword to query and query the Recipe Puppy API. (You should already have the Recipe class from the previous assignment. Remember, that unlike the previous assignment – you will not need to require ‘httparty’ gem in your code, since loading HTTParty gem should be the Bundler’s job.)

1. Commit all the files to your local repo and push your repo out to your private team repo on github creating a remote branch called assignment5.
2. For this assignment, it might make the most sense to work on a master branch of a newly created repo and then do $git push remote_alias_github

1. The file contains several different sorting methods that operate on integer arrays. We want to make these algorithms generic, like we did with the Search methods, so that they will work on any object type. To do this, convert the static methods to generic methods using the same steps as in Homework 5. Be careful to consider which method parameters (and possibly, local variables) must also be converted to use the type parameter.
2. Add a method isSorted to this class. This method is for determining if an array is sorted or not, and should also be a generic method.
3. As with the methods in, if I give you an array of objects to sort that don’t implement Comparable, the sorting method will fail (hopefully at the compile stage!).
To ensure that the type parameter used by our generic methods “screens out” object types that aren’t searchable or sortable, replace the simple type parameter in the method header
4. Test that arrays of type String work with your methods by writing a test program in a separate class to test your changes to the Sorts class. This program will perform the following operations:
5. Download and use these test files: american-words.35, american-words.80, dictionary.txt, and large file of unsorted strings (the first three files are already sorted).
6. Write a real simple program to test that an array of some non-comparable type does NOT work. Use your Polynomial class for this test.

Part 1: Questions
1. (2 points) When deriving a new class from an existing class using inheritance, which instance variables are accessible to the derived class? Write down the best answer:
2. (2 points) Show a simple example of how an alias is created in Java. For this example, you might use String objects.
3. (4 points) Read the code below and determine what is output when it runs. Write out your answer and show the contents of the array tee. Assume uninitialized array slots contain

4. (4 points) Give the order of growth estimate of the following functions using Big-O notation:
Part 2: Stack Questions 1. (9 points) Practice your understanding of stacks by drawing the abstact diagram of a stack and its contests after each stack operation. If there is no change to the stack’s state after an operation, just say “No Change.” Be sure to label the top of stack:
2. (9 points) Assume we’re using a LinkedStack to implement the stack from the previous problem. Show the state of the stack after each instruction executed in the above problem. Be sure to label the top of stack properly.
3. (4+4 points) Using the code for class LinkedStack in your text, show how to add methods equals and toString, for a stack. Just write these out here, don’t print out the whole class.
Two stacks are equal if they have the same size, and contain the exact same items in the same order.
The string representation toString should return of a stack is just the
word Top: followed by each element separated by a space. Note this does break the stack discipline (that you can only see the first item in the stack) but is useful for debugging applications that use the stack.Coding Assignment # 4
1. The (unnamed) customer loved the API you produced in Assignment# 3, but he/she would like to be able to extend it to work for pretty much any operation on the student record in the “YAML‐base”. So, he/she keeps on asking you for more silly features every time. Can you provide a query for student’s state? How about the age? How about the less than weight? You quickly get tired of the “Can you please just add one more feature?” game and think of a scheme that will “wow” the customer and make your API forward‐compatible with the future attributes of the student record (as well as future silly customer requests). Your DbApi class (db_api.rb) will only have ONE method, which will
a. Load the students into a class variable the first time around
Parse out the last part of the “ghost” method being called and assume it to be an attribute of the student class c. Use the 2 arguments passed into the “ghost” method to perform the appropriate query
d. The new db_client2.rb is provided as part of the homework (free of charge).

(Hint: You are basically combining “ghost” method technique with Dynamic Dispatch technique
– both covered in the lecture.)

2. Implement a restful API client for similar to the one we presented in class. It should have a class method for, which will take a keyword to search for and use a request parameter (q) to send the request up to the API. Also, specify a default parameter of onlyImages equal to 1 in order to only return results that contain associated thumbnails. (A sample is shown below.)

Submission Guidelines
1. Commit all the files to your local repo and push your repo out to your private team repo on github creating a remote branch called assignment4.
2. You can do one of the following to accomplish the above
a. Create a local branch called assignment4 ($git checkout –b assignment4) and then push it out by doing $git push remote_alias assignment4
b. Work on a master branch in your repo and then do $git push remote_alias master:assignment4
3. Feel free to include a README.txt with any comments…


Strategy hints – Get Instant Answers

EMAIL US at to get answers of any of these questions Or Click on the bottom right CHAT Button to get it Instantly


Strategy hints:
● If you can’t figure out the x-axis loop you may also do it with a single print
Submit this to Kodethon as
Part 3 (30%) Normalizing
Get the file totalsByYear.csv and place it in the same directory you are running your script.
Read in the file to get the total number of people in the database for each year. Note that the number increases over time, and our plots will be more accurate representation of the name’s popularity if we plot the percentage over time. For each year, compute the percentage (count / total for that year) * 100, before plotting it with plainchart. Also change the y=axis to show the maximum popularity as a percentage.

Strategy hints:
● The popularity is a percentage formatted to four decimal places. You will
need to multiply the years frequency (counts/total counts) by 100 to get a
percentage. You will need to use the format method to format the floating
point value for printing.
Submit this to Kodethon as

Caped Crusaders Inc.

The Super Heroes of the comic world have united in an organization to save the world from villains (some who also possess super powers). You are charged with keeping track of things in this comic world. Your database will contain the information presented below.

Table: tblSuperheroes Table: tblArrests Table: tblVillains
Super Hero ID (autonumber) Arrest ID (autonumber) Villain ID (autonumber)
Super Hero, Secret Identity (text) Super Hero ID (foreign key) Villain, Secret Identity Last Name Villain ID number (foreign key) Villain, home planet
First Name Date of Crime (Date/Time with input mask) Primary Characteristic (what is their special power?)
Super Hero, Home Planet Arrest Date (Date/Time with input mask) Strength Rating  Primary characteristic, other than flying. (What is the character’s special power?) Fine Charged (Should be more than largest Hero’s charge; currency)
Indicator if the Hero can fly (Yes/No) Indicator if fine was paid. (Yes/No)
Strength Rating. (1-10 with 10 being the strongest)
Fee Hero Charges to make arrests (currency)

Step by Step Description:
Use all naming conventions discussed in this course.
Set the database to compact on close.
Create three tables as per specifications below.
Set table relationships and referential integrity (including cascade update and cascade delete if applicable)
Enter data into the tables
Create a minimum of eight super heroes in your database
Create at least ten villains
You may use existing characters from comic books or invent your own. Some villains should have a record indicating multiple arrests and some of the super heroes should have more than one arrest to their credit. At least one super hero should have NO arrests. Some of the fines will and others will not be paid.
Create a minimum of 15 arrests. Most super heroes should have arrests but at least one super hero should not have an arrest.
Create Queries
A query that computes the strength quotient for each arrest. Name this query: qryQuotient.
The strength quotient = hero’s strength rating divided by the villain’s strength rating.
A query that lists the sum of all of the fines collected, grouped by each superhero. Name this query: qryHeroFines
Create the following forms:
One that allows you to enter a new hero. Name this form: frmNewHero
One to enter a new villain. Name this form: frmNewVillain
One to enter a new arrest record. This last form assumes that the superhero and villain are already listed in the database. Name this form: frmNewArrest
Create a form that lists the superhero and identity that is sorted by the hero’s last name. This form should contain a subform that lists all of the arrests made by that hero with the name(s) of the villain, date(s) of arrest and fine(s). Any hero that has no arrests should not appear in this form. Name this form: frmFinesFromHero. Name the subform: fsubArrests.
Create the following Reports:
One that lists all of the arrests and the fines that have been levied. Make sure to include the hero and villain names Name this report: rptArrests
One that lists the heroes who can fly. Name this report: rptFly
One that shows the total amount (one number) fined for all arrests. Name this report: rptTotalFines
One that gives the total outstanding amount (not paid by the villains) by each villian. Name this report: rptOutstanding
One that lists all of the arrests with the villains that involved a strength quotient that was less than one. Name this report: rptStrength

Include at least one graphic in your database on one or more of your forms.

Server programs are rarely implemented as non-threaded applications, even though that is how you implemented your previous server application. Servers would not be able to provide the necessary throughput unless they used threading to allow for I/O to occur concurrently with servicing client requests. For this Assignment, you will modify your finger server program from Week 6 to use threads.
Modify your finger server program to use threads. The server should activate a new thread to process each incoming client request, thus allowing client requests to be processed concurrently.
public class FingerServer {
public static void main(String[] args) throws IOException {
ServerSocket serverSocket = new ServerSocket(79);
System.out.println(“The Finger Server is now ready!”);
while (true) { Socket socket = serverSocket.accept();
System.out.println(“Accepted an echo request”);
System.out.println(“… local socket address ” + socket.getLocalSocketAddress());
System.out.println(“… remote socket address ” + socket.getRemoteSocketAddress());
BufferedReader input = new BufferedReader(new InputStreamReader(socket.getInputStream()));
PrintWriter output = new PrintWriter(socket.getOutputStream());
String line; while (true) { line = input.readLine(); if (line == null) break;
System.out.println(“Client said: ” + line);
output.write(“Message from server: ” + line);
output.flush(); }

Write a program for the Bookstore. The main application will declare a table to hold the names of the items ordered as well as the prices.
Create a class named Menu that will display the following:WELCOME TO ***** FROM THE FOLLOWING:
ENTER 3 TO ORDER LOGO CLOTHINGReturn the selected value back to the main program and, depending on the value, you will call one of three subroutines:Supplies – Sample menu – DO NOT DISPLAY THE PRICES IN THE MENU!:
ENTER 4 FOR 6 PK SCANTRON $2Textbook – Sample menu:
ENTER 4 FOR JAVASCRIPT $120Clothing – Sample menu:
ENTER 4 FOR WINDBREAKER $41Each subroutine will move the item name and price into the table (Hint: Table must be sent to the subroutine) After allowing the user to order 3 items (Hint: Perform Varying), then display from main the items as well as a grand total for their order. (Sales Tax not included).
Programming Homework 9

Important: Your programs will be graded by an auto-grader (a program that we’ve written to grade your programs). What that means for you is that your output must exactly match the output we are expecting in order to receive credit.

Also, coding style will be included as a portion of your grade. Code readability is very important in programming. Some coding style guidelines have been posted to Canvas here:

Put a comment at the top of your file that includes your name and UTEID. If you want to include additional things in the header comments, like “Assignment 8”, a date, CS 303E, etc, that is fine.
Save your file as where you replace “uteid” with your UTEID. For example, mine would be

Turn in one program file that does all of the following things:

use recursion to reverse a string. Your function must be named reverse_string, it should take in 1 string as an argument, and it should return the reversed string. Your solution MUST use recursion, or you will not receive any credit for this part.

use recursion to draw the “H-Tree” fractal.
The H-Tree fractal is defined as follows:
Begin with the letter H. The Three lines of the H are all of the same length, as shown in the first image. This is an H-Tree of order 0.
The letter H has four endpoints. Draw an H centered at each of the four endpoints, as shown in the second image. These H’s are half the size of the previous H. This is an

H-Tree of order 1.
Repeat step 2 to create an H-Tree fractal of higher orders, as shown in images 3 and 4.
Your function definition MUST have this format:
def h_tree(order, center, size):
order is is the order of the fractal, as described above
center is the center point of the H-Tree, in the format [x, y]
size is the length of each of the lines in the H
Make a star spin. Write a function called animate that draws a star (you can draw any type of star you want: 5-pointed, 6-pointed, 10-pointed, etc, any size, any color, etc.) and then spin the star in an infinite animation loop. The star does not necessarily need to rotate around its center – any pivot point is fine. You may create additional functions to help you with this task (maybe a draw_star() function?), but your solution to this problem must be displayed by calling animate().

PROG12974 Assignment 4 – Get Instant Answers

EMAIL US at to get answers of any of these questions Or Click on the bottom right CHAT Button to get it Instantly


PROG12974 Assignment 4
Sheridan Institute of Technology & Advanced Learning
Faculty of Applied Science and Technology
School of Applied Computing
PROG 12974 – Introduction to Programming (C)
Assignment 4 – Book Manager
In this assignment, you will write a simple Book Manager using C structures and C file processing. The program can do the followings:
1. Read carefully code examples in Chapter 11, especially those for random-access file processing (11.10, 11.11, 11.14, and in particular 11.15). Make sure you fully understand all the examples
before starting.
2. Define 6 functions for the 6 requirements REQ#1 to REQ#6.
3. Your program should be able to test if there is already an existing file containing some book
information. If there is, use it but do not overwrite it; otherwise, create a new file.

4. Consider using the test data file “assignment4_test_data.txt” to test your program. In Windows you can use the following command lines.
D:\PROG12974\Assignment>assignment4_sun < assignment4_test_data.txt
D:\PROG12974\Assignment>assignment4_sun < assignment4_test_data.txt > output.txt
From a Linux terminal you can do it like this:
username$> cat assignment4_test_data.txt | ./assignment4.out > output.txt
5. Do NOT use goto statement or recursive functions. Global arrays and structure definition are acceptable.
Your submission will be evaluated based on the following criteria:
Submission 1 Submission is in correct format (see instructions below).
Compilation 1 Program compiles without errors (warnings are acceptable).
Documentation 2 Code is well-commented and clearly explained.
Readability 2 Code is clean, well-organized, and easy to follow.
Efficiency 4 Code uses the best approach and is efficient.
Specifications 30 Program works correctly and meets the requirements.
REQ-0 2
REQ-1 2
REQ-2 4
REQ-3 6
REQ-4 6
REQ-5 6
REQ-6 4
Total Marks 40
*. Penalties may apply to cases when code doesn’t compile, wrong submission or naming, program crashes while being tested, late submission, submission instructions not followed, use of goto, etc.
Submit your source code as “assignment4_lastname.c” to the SLATE Assignment 4 submission folder.
If you have your own header file (the .h file), remember to submit the header file as well.
Important Notes
• This is an individual work and is subject to the school Policy on Academic Honesty. The policy is available at:
• Submission implies permission of the Faculty to check the submission electronically for plagiarism using software similarity detecting systems.
• All assignments are subject to a late penalty of 10% per day (including weekends).
• Late assignments will only be accepted up to 3 days after the due date (including weekends).
Write an assembly program that will read in a person’s name and then print it in lastname, firstname [middle name] order. The notation [middle name] means zero or more middle names. For example, using an input of: John James Smith.
You will print Smith, John James You will need to write a procedure that will read in characters until the enter key is pressed. Store the characters in an array of characters defined in your data segment. As you read the characters you will need to count the number of characters entered by the user, this may also be stored in a data segment variable. The maximum length of a name will be 80 characters.You will then need to start at the right end of the name and search backwards for a blank. At this point you can now print out the last name a comma and go back to the beginning of the array and print the rest of the name.Make sure to properly test your program before submitting it. You should test single names such as Rihanna, no name (hit enter key immediately), names with no middle name, and also multiple middle names.

Please name your file “Firstname Lastname Homework 09.pdf” (see below for more details).
IMPORTANT: Remember that I encourage you to work in groups, but each student must submit his/her own homework. Every student’s homework assignment should look significantly different from all other students (i.e., each student’s work should be a representation of their own work).
Solve the following problems in Matlab. Please use the Snipping Tool (Start menu → Snipping Tool) to document your input/output in Matlab. Paste the snips into a Microsoft Word (.doc or .docx) file or a Google doc but your final product must be a .pdf file! MS Word and Google Docs can both produce .pdf files (Google this if you don’t know how!). Fully show all input and output in Matlab, sufficient to explain/show how you arrive at an answer for each problem. You may also wish to add text commentary in your file.
The file upload for this assignment must be a .pdf file (no other file extensions will be accepted – this is to preserve the formatting of figures and code).
1. The wind chill factor (Twc, °C) is given as a function of ambient temperature (Ta, °C) and wind speed (V, km/h):
Twc = 13.12 + 0.62157. – 11.3770.16 + 0.39657,70.16
Create an m-file called windchill that can be run and a table of wind chill factors will be displayed. You should use ambient temperatures between 0°C and 40°C in increments of 10°C and velocities from 0
km/h to 40 km/h in increments of 5 km/h in your table.
This is what you are trying to create:
2. We have a vertical tank that has a hemispherical bottom, hemispherical top, and cylindrical middle section (see diagram on the next page).
a. Create a user-defined function in Matlab called “tank(R,H,d)” that will calculate the volume in the tank as a function of the tank radius (R), tank height (H), and depth of fluid in the tank (d). The piecewise functions that follow will allow one to calculate the volume as a function of d.
b. In Matlab, make a single plot of volume (V) as a function of depth (d) ranging from 0 to H for one  scenario of your choosing (e.g., R = 1 and H = 3). The plot must be color-coded based on the piecewise function: the first part (d <R) must be blue, the middle part (R <dsH – R) must be red, and the top part (H – Rad<H) must be green. Make sure the line width is 2- you can use ‘LineWidth,2 as optional arguments at the end of your plot command.

3. A pint glass has the following dimensions (see below). Use Matlab (document each step of your work!) to determine the difference in depth between when the glass contains 16 oz. and when the glass contains 12 oz. This is a somewhat open-ended, “real world” engineering problem that will require you to think outside the box, perform unit conversions, and use solving functions.
= 5.5″
HINT #1: The volume of a container like this can be thought of as a smaller cone subtracted from a larger cone. If you don’t know the volume of a cone, Google it!

HINT #2: I would recommend coming up with a function of volume in terms of depth:
Homework #9
Page 3
V = f(h)
then you can set that function equal to 12 oz. [f(h) = 12 oz.), redefine a new function, g(h), that is formed by subtracting 12 oz. from both sides [9(h) = f(h) – 12), then use a solving function to find the zero of g(h), which is the depth at which the volume is 12 oz. Do something similar for 16 oz., then compare the two depths. Easy, peasy!
HINT #3: Your function above will most likely involve trigonometry (similar triangles)!
HINT #4: I guess I’ll give you some hints on the trigonometry part:
HTh This is the pint glass portion
H +a
Some equations we can set up, using similar triangles:
A) a Hua
=?b a= H(rb/rt) 1-rb/rt
B) = 1
+b = “hta) TE
h+a Hua
Hta a and b are just intermediates and should not appear in your final volume equation. On Canvas I have a file called “pintglasssymbolics.m” and you can download and complete it to find a final volume equation in terms of h, H, Tt, and th, and you can use the resulting expression in your calculations above.
It is important to document your process/solution with text, explaining the steps and showing the code for how you determine your final answer (difference in depths for 12
OZ. Vs. 16 oz. of fluid in the glass).

Objectives: Perform form validation
Manipulate form fields
Requirements: Download orderform.html for this lesson.
Add a link to the jQuery library and the external JavaScript file to the html page.
Put the cursor in the username field
Add validation to the form fields whenever the user moves off the form field as follows:
Name – required – non-blank
Email – required, valid email address (use regex)
Address & City, Shipping Address & city – required – non-blank
Zip code, Shipping zip code – required, numeric, 5 characters
If an error is found, display an appropriate error message in the associated span error tag beside the field.
If no error is found, set the text of the error field to nothing (to remove any previously displayed error messages).
When the user changes the Copy address checkbox:
If the checkbox is checked, copy the billing address, city and zip to the corresponding shipping fields
Add an entry to the state dropdown list as selected with the state from the billing state dropdown list.
When the user moves off of a quantity control (class =”qty”):
Initialize an ordertotal to 0
For each quantity:
get the quantity value entered. If it is not numeric, change it to 0
get id to use to identify the associated price and total
get the price text by using the id “price” + the index value
multiply price times quantity to get a total
Put the total in the table cell with id “total”+index
Add the total to the ordertotal
Place the order total in the subtotal cell.
If ship state is “TX”, calculate tax of .08 times the total and put in the tax cell. Use 0 for all other states.
Add tax to ordertotal.
Calculate shipping based on the shipping state and place it in the shipping cell.:
“TX”: $5.00
“CA” & “NY”: $20
all others: $10
Add shipping to the ordertotal
Display the ordertotal in the Grand Total cell.
When the form is submitted, revalidate all the fields. If the data is not valid, cancel submission of the form.
In this assignment, you will be modifying the ‘mfs’ (minix file system).
I-‐nodes in the Minix file system contain 3 times – time of file content modification, time of last access, and time that the i-‐node information has been last changed. There is no file creation time stored in the i-‐node. Modify Minix to change the meaning of the ‘last change in i-‐node information’ time to ‘file creation time’. In places in Minix where only the ‘last change in i-‐node information’ changes, make that change reflected in the file modification time. Verify your changes by creating a file, noting the creation time, then modifying the file contents and/or the i-‐node information and checking these various times, assuring that the file creation time does not change (the ‘ls’ command has the options necessary to check each of these times).
Using egrep (or grep), find the answers to the following. All questions refer to the science.txt file (posted on SLATE):

In how many lines does the word ‘science’ appear in the file?
In how many lines doesthe word’Science’ appear in the file?
In how many lines does the word ‘science or ‘Science appear in the file?
How many lines contain at exactly three vowels? ‘aeiou’ in sequence?
In how many lines does the string ‘at’ appear in the file?
How many lines contain a wordthat begins with ‘at’?
How many lines contain a word that ends with ‘at’?
In how many lines does the string ‘cat’ appear in the file?
In how many lines does the word ‘cat’ appear in the file?
In how many lines does a year appear in the file? Example 1960, 2001 etc.
How many lines end with a ‘.’ period?

use jQuery to create a tabbed web page, dialog boxes, accordion panels and tooltips.Description:For this lab, you will be modifying 2 product display pages to use jQuery UI widgets.First you will modify the mums page from lab 9 to include tooltips to display the titles for the images in the gallery section as well as a zone map when the user hovers over the Zone text on the page. Then you will divide the page into 3 panels to displayed in an accordion format where the user can open and close the individual panels by clicking on the associated title.Second, you will modify the roses.html page (attached with images to this lab), to include 2 dialog boxes: 1 to display when the page loads and another when the user clicks on the Zone span tag on the page. Then you will organize the page into 3 tabbed panels which will display one at a time. The user can select the panel to be displayed by clicking on the associated tab.Requirements:Download the jQuery ui files using a theme of your choice and add to mums.html and roses.html.
use the mums.html folder from lab 9 to add tooltips and accordion panels.
Add titles to each of the images in the gallery section of the page.
Add the tooltips function to any element on the page with a tooltip
Add a custom class and change the styling as you see fit.
Add a span tag around the word Zone in the Plant Details table. Give it an id and a title.
Add the tooltips method to the Zone id tag, but add a link to the hardiness.jpg image as the content for the tooltip. (image is included in the download files for this assignment.
Modify the div tag that is just above the h2 element for Plant Overview to include an id
Apply the accordion method to the id.
Add 2 customizations of your choice (css or options)
For the roses.html file attached to this assignment, add dialog boxes and tabs
Call the dialog method for the #sale div at the bottom of the page to display the dialog when the page loads
Call the dialog method for the #zone div at the bottom of the page but prevent it from displaying when the page first loads
Add a click event to the #zonePopup span tag (Zone in the Plant Details panel) to open the #zone dialog.
Add the tabs method to the #tabs div that includes the ul for the tabs.
Add 2 customizations of your choice (css or options)
Add links between the 2 pages.

Please read the discussion article entitled “Connecting the Dots to Gain Competitive Advantage: Articulating a Technology Ecosystem Advantage to Your Board” and then compose a short response. Address the following two points in your post.

Briefly summarize the main ideas of the publication in 4-6 sentences.
The authors encourage the development and use of a Strategic Technology Map approach. What are the key advantages of this method? What are any disadvantages? Lastly, what recommendations would you provide to potential improve this process?

In addition to your post, please read your peer’s threads and make at least ONE substantial comment on their discussion post (2-4 sentences).
Please read the discussion article entitled “What CIOs Need to Know and Do to Exploit Cloud Computing” and then compose a short response. Address the following two points in your post.

Briefly summarize the main ideas of the publication in 4-6 sentences.
The publication lists five key Recommendations its first and second pages. Based on your reading, which of these recommendations is the most critical to an organizations effective exploitation of cloud computing? Why?
In addition to your post, please read your peer’s threads and make at least ONE substantial comment on their discussion post (2-4 sentences).
The authors encourage the development and use of a Strategic Technology Map approach. What are the key advantages of this method? What are any disadvantages? Lastly, what recommendations would you provide to potential improve this process?
Please read the discussion article entitled “Connecting the Dots to Gain Competitive Advantage: Articulating a Technology Ecosystem Advantage to Your Board” and then compose a short response.
Please read the discussion article entitled “What CIOs Need to Know and Do to Exploit Cloud Computing” and then compose a short response. Address the following two points in your post.

Briefly summarize the main ideas of the publication in 4-6 sentences.
The publication lists five key Recommendations its first and second pages. Based on your reading, which of these recommendations is the most critical to an organizations effective exploitation of cloud computing? Why?
You work as the night manager for a local grocery store chain. One of your duties includes to go to several store locations at closing time to collect cash and checks on hand at the end of the day. After collecting, you must record how much money (specifically bill denominations) was collected from each store and then calculate the grand total. You currently are counting by hand, using a simple calculator and recording this in a notebook. After being in this SDEV120 course, you know that you can create a program to help you with this nightly task. You know that if this is successful, you can promote this to the other managers as well as other local stores that have chains, so you want to create proper documentation.
Question 1 .Write python code that accepts a string, input from the user.
The string will be a series of numbers separated by commas (e.g. “24,6,14,66,2”). The numbers will all be integers. Convert the string into a list of numbers (e.g. [24,6,14,66,2]). Print the list.Print each number in the list, followed by the sum of all of the numbers in the list, in the following format: “The sum of 24 + 6 + 14 + 66 + 2 equals 112″.Attach your answer in a python file called

Question 2 .Write the function weather_report() that accepts a temperature in degrees celsius and prints out the temperature in farenheit, along with a phrase.If the temperature in celsius is less than 0 degrees, print ” That’s freezing!”. If the temperature is over 35 celsius print “It’s gonna be hot!”.If the temp is exactly 25 celsius print “Perfect!”. For any other temperature print “Jeans and a shirt will be fine.”. For example, weather_report(25) will print: “77F, Perfect!” Call the function 6 times, with the following values:weather_report(-5)

3.Write python code that takes the list of numbers created in question one, and removes any numbers that begin with a 3 from the list.Do not create a new list, you must remove the elements from the existing list.Note there will be no 3+ digit numbers (all numbers are between 0 and 99).For example, the list [1,3,5,7,23,33,9] would become [1,5,7,23,9].

4.Write python code that accepts a string, input from the user. The string will be several sentences long, and could contain punctuation including quotation marks, commas, periods or hypthens. There will be no contractions (so no “I’m”, “it’s” etc ).For example:” Once upon a midnight dreary, while I pondered, weak and weary, Over many a quaint and curious volume of forgotten lore— While I nodded, nearly napping, suddenly there came a tapping, As of some one gently rapping, rapping at my chamber door.” This would be a single string entered by the user (they would hit return only at the end of the whole quote).Convert the single string into a list of strings. Each string in the list will be equal to one word in the sentence. Punctuation should not be preserved, and all the words should be stored in lowercase. A word is defined as a series of one or more characters (a-z or A-Z) separated by spaces or punctuation. In the example above the list would contain [‘once’ ‘upon’ ‘a’ ‘midnight’ ‘dreary ‘while’ etc]Print the list of strings so that each string in the list is printed on a new line. At the end of the list print the total number of strings in the list.

5.Make a Class called Customer. The class will have the attributes first_name, last_name, date_of_birth, and phone_number. Make a method called describe_customer() that prints a summary of the customer information. Make another method called greet_customer() that prints out a welcome greeting (“Hello, <first_name>”)Create several instances of the class representing different customers, and call both methods for each customer.

6 .Write python code that will print out 3 “X” shapes, next to each other horizontally. The Xs will be built of asterix symbols (the character above the number 8 on the keyboard).The width of the X will be input from the user, and must be a value between 5 and 11. It will also be an odd number (you do not need to control for bad user input).The height of the X shape will be the same as the width, so if the user enters 9, the output will look like this:

Note there is one space between each shape.

Determining the Square Root of a Number Via Recursion For this programming project you will develop an recursive function to find the square root of a number. The function should the number for which we are determining the square root and any other arguments you deem necessary. The recursion should terminate when the calculated square root produces a squared value within 0.001 of the value we are finding the square root of.
The following is required:
1. The user should be prompted to input a positive number.
2. The program should check to determine whether the user entered a valid number, i.e. -4.0 doesn’t work.
3. The program should call a function called: recursive sqrt(argument, argument, ….) .
4. The recursive square root function should continue to call itself until the value calculated for the square root when squared is within 0.001 of the value for which we are calculating the square root.
5. Your calculated value of the square root should be printed to the screen.

The attached file (attendance.txt) is a list of email addresses you collected for a conference your company hosted. Create a program that will parse each email address by its name and company. (Note: email parser object is attached). The company should be sorted in the first column and the person’s name associated with the company should be sorted in the second column; separated with tab character. (first sort is by company; secondary sort is by firstname.lastname). Sample output is listed below:

Create a histogram on the number of attendees per company for the conference. (can be in same program as #1)

Check if bill.gates attended the conference.Output that Bill Gates attended conference. (can be in same program as #1)

Create an output text file for the output above so that it can be imported in Excel for further analysis. One method of code to write text to an output file: (can be in same program as #1)

String text = “my text\r\n”;
BufferedWriter output = null;
try {
File file = new File(“example.txt”);
output = new BufferedWriter(new FileWriter(file));
} catch ( IOException e ) {
} finally {
if ( output != null ) {
output.close(); // need to close file to write to a file

Assignment #4:
Write a program(main() method) that reads an arbitrary number of integers that are in the range of 0 to 50 inclusive and counts how many occurrences of each are entered. After all inputs have been processed, print only the values that have an occurrence of greater than zero. Also, print the number of occurrences next to the value. [use arrays and indexing ]


Write a program (main() method) that reads, from the terminal (screen), sequence of names and postal (ZIP) codes for individuals. Store the data in an object designed to store a first name (String), last name (String), and postal code (int). Assume each line of input will contain two strings followed by an integer value, each separated by a tab character. Users will type “quit” when they have completed input entry. Print the output of the input values by the user to the screen.
[use ArrayList to store object]
create an object that will store the first name (String), last name (String), postal code (int)
use ArrayList to store object]

C:\Enter Input {first_name<tab>last_name<tab>zip_code}:
Bill Smith 10002
Enter Input {first_name<tab>last_name<tab>zip_code}:
Jane Dome 11354
Enter Input {first_name<tab>last_name<tab>zip_code}:

Revise #2 problem to read a list of inputs from a file. The input file will contain two strings followed by an integer.

Input file:
Bill Smith 10002
Jill Ryan 11120
Robert Johnson 11122

Given a dictionary d and a key k and value v, if you have v and you want to find k? It’s a reverse look up.This week, we wrote a function reverse_lookupdef reverse_lookup(d, v):for k in d:
if d[k] == v:
return k
raise ValueError(‘value does not appear in the dictionary’)
Modify reverse_lookup and implement a function better_reverse_lookup so that it builds and returns a list of all keys that map to v, or an empty list if there are none.
>>> h = histogram(‘apple’)
>>> #histogram is a function that creates a dictionary mapping of letter and count of how many times it appearances in a string.
>>> #for example, histogram(‘apple’) returns a dictionary of {‘a’:1, ‘e’:1, ‘p’:2, ‘l’:1}. You don’t need to implement the histogram function.
>>> lst = better_reverse_lookup(h, 1) # will return all letters that mapped to count 1 in the dictionary
>>> lst
[‘a’, ‘l’, ‘e’]
>>> lst = better_reverse_lookup(h, 3)
>>> lst
Hint: List method append adds a new element to the end of a list:
>>> t = [‘a’, ‘b’, ‘c’]
>>> t.append(‘d’)
>>> t
[‘a’, ‘b’, ‘c’, ‘d’]
In the first part, you will complete a partially-implemented web crawler program. In the second, you will use Java classes from the package java.util.concurrent to divide the workload among multiple threads of control.