Questions
DBMS Create/Insert/Update SQL I need the create, insert, and update SQL statement for this table: Customer...

DBMS Create/Insert/Update SQL

I need the create, insert, and update SQL statement for this table:

Customer
PK Customer ID Text
Phone Number int
name text
address ID int
email text
FK vendor ID int

Vendor is the name of the table the FK comes from.

In: Computer Science

Language Python with functions and one main function Write a program that converts a color image...

Language Python

with functions and one main function

Write a program that converts a color image to grayscale. The user supplies the name of a file containing a GIF or PPM image, and the program loads the image and displays the file. At the click of the mouse, the program converts the image to grayscale. The user is then prompted for a file name to store the grayscale image in.

In: Computer Science

create a document in microsoft word or excel document which has the following: Fictitious names and...

create a document in microsoft word or excel document which has the following:

Fictitious names and addresses of 10 folks including name, address and phone number. Recreate the bike table, which includes bike name, part number and hourly rate

Please limit your submission to no more than 2 pages.

In: Economics

draw vsepr and valence bond picture for C2H2? label the bonds. for each sigma bond name...

draw vsepr and valence bond picture for C2H2? label the bonds. for each sigma bond name the two orbitals that overlap to form it? for each pi bond name the two orbitals that overlap to form it. why are to pi ponds perpindicular to each other. why are quadruple bonds unlikely? Please label thank you.

In: Chemistry

Description In C# Further enhance the registration program for Continental University. Add more attributes about a...

Description

In C#

Further enhance the registration program for Continental University.

  • Add more attributes about a student, including gender, residency (in-state or out-state), and entrance date.
  • Allow the user to repeatedly enter student information until the user wants to quit.
  • When the user enters an invalid value, ask the user to repeatedly enter the value until a valid value has been entered. Gender must be ‘M’ or ‘F’. Residency must be ‘I’ or ‘O’.
  • Display a short summary after each reservation has been entered. Display a title (Mr. or Ms.) depending on the gender. Capitalize the first name and last name.

Existing Code:

class Program {
  static void Main() {
      Student s = new Student();
    Console.WriteLine("Welcome to the Continental University Registration System!");
    Console.WriteLine("Enter data about a student");
    Console.Write("First Name: ");
    string firstName=Console.ReadLine();
    Console.Write("Last Name: ");
    string lastName=Console.ReadLine();
    
    Console.Write("Credits Taking: ");
    int credits=Convert.ToInt32(Console.ReadLine());
    s.firstName=firstName;
    s.lastName=lastName;
    s.credits=credits;
    Console.WriteLine(s);
    
  }
}
class Student  {  
                public string firstName;
                public string lastName;
                public int credits;
                   public override string ToString(){
                       
                    return lastName+", "+firstName+" Credits Taking: "+credits;
                   }
                        
} 

Sample Dialog

Welcome to the Continental University Registration System!

Enter data about a student

First Name: Mary

Last Name: Smith

Gender (M/F): f

Residency (I/O): i

Credits Taking: 18

Entrance Date: 12/13/2018

Mr. Smith, Mary Credits Taking: 18 Entrance: 12/13/2018 In-state

Do you want to quit (Y/N)?: n

Enter data about a student

First Name: LERNIE

Last Name: BLAKE

Gender (M/F): X

Gender (M/F): M

Residency (I/O): X

Residency (I/O): O

Credits Taking: 12

Entrance Date: 10/01/2018

Mr. Blake, Lernie Credits Taking: 12 Entrance: 10/01/2018 Out-state

Do you want to quit (Y/N)?: Y

Thank you for using the Registration System!

In: Computer Science

A college records the module registration information of their students in a database named College.mdb,which contains...

A college records the module registration information of their students in a database named College.mdb,which contains three tables,STUDENT,MODULE andMODULE_REG. A student may enroll in the same module as many times as they like. However, they can only enroll each module at most once in each semester. The design of the three tables are shown below:

Table STUDENT

Field Name

Data Type

Note

SID

Short Text

primary key

FirstName

Short Text

LastName

Short Text

Contact

Short Text

Gender

Short Text

“M” or “F”

Table MODULE_REG

Field Name

Data Type

Note

StudentID

Short Text

ModuleCode

Short Text

Year

Number

Semester

Number

Score

Number

Table MODULE

Field Name

Data Type

Note

ModuleCode

Short Text

primary key

ModuleName

Short Text

Download the database file College.mdbfrom Moodle. Rename it as College_Lxx_syyyyyy.mdb(where Lxxis your class andsyyyyyyis your student number, e.g. College_L01_s170001.mdb/College_L01_s170001.accdb) and complete the following tasks.

(a) Create a primary key of the table MODULE_REG.                                                                (1 mark)

(b)   Establish the relationships between the tables STUDENT,MODULE andMODULE_REG.      (1 mark)

(c)    Create queries to perform the following tasks:

  1. Display the student IDs, studentnames (including both first name and last name), as well as the code and name of modules that each student had enrolled in the secondsemester of 2019. Arrange the records in ascendingorder of the student IDs. Save the query as Q1.
    Note: You mustnotshow the semester and the year in the output.                            

(ii) Display the total number of students in each gender. Save the query as Q2.              

  1. Produce a list of module codes, module names, and the total number of enrollment records of each module. Arrange the records in ascendingorder of the total number of enrollment records of each module. Save the query as Q3.

Produce a list of module codes, module names, student names (including both first name and last name), and student IDs of enrolled students for all modules with module codes beginning with “COM” being registered in the firstsemester of 2019. Arrange the records in ascendingorder of module codes. Save the query as Q4.
Note: You mustnotshow the semester and the year in the output.

In: Computer Science

This is the homework given by the teacher. I don't have more information Complete the below...

This is the homework given by the teacher. I don't have more information

Complete the below code so that your program generates a random walk on the given graph. The length of your walk should also be random.

/******************************************************************/

#include
#include
#include

typedef struct NODE_s *NODE;
typedef struct NODE_s{
   char name;
   NODE link[10];
}NODE_t[1];

#define nodeA 0
#define nodeB 1
#define nodeC 2
#define nodeD 3
#define nodeE 4
#define nodeF 5

int main() {
   srandom(time(NULL));
   //printf("%d\n", random());

   NODE_t node[6];
   node[nodeA]->name = 'A';
   node[nodeB]->name = 'B';
   node[nodeC]->name = 'C';
   node[nodeD]->name = 'D';
   node[nodeE]->name = 'E';
   node[nodeF]->name = 'F';

   int i, j;
   for (i = 0; i < 6; i++) {
       for (j = 0; j < 10; j++) {
           node[i]->link[j] = NULL;
       }
   }

   //a -> c,d,e,f.
   node[nodeA]->link[0] = node[nodeC];
   node[nodeA]->link[1] = node[nodeD];
   node[nodeA]->link[2] = node[nodeE];
   node[nodeA]->link[3] = node[nodeF];

   //b -> c,f.
   node[nodeB]->link[0] = node[nodeC];
   node[nodeB]->link[1] = node[nodeF];

   //c -> a,b,e.
   node[nodeC]->link[0] = node[nodeA];
   node[nodeC]->link[1] = node[nodeB];
   node[nodeC]->link[2] = node[nodeE];

   //d -> a,e,f.
   node[nodeD]->link[0] = node[nodeA];
   node[nodeD]->link[1] = node[nodeE];
   node[nodeD]->link[2] = node[nodeF];

   //e -> a,c,d.
   node[nodeE]->link[0] = node[nodeA];
   node[nodeE]->link[1] = node[nodeC];
   node[nodeE]->link[2] = node[nodeD];

   //f -> a,b,d.
   node[nodeF]->link[0] = node[nodeA];
   node[nodeF]->link[1] = node[nodeB];
   node[nodeF]->link[2] = node[nodeD];

   //Random walk.

   int choice = random() % 6;
   printf("%c\n", node[choice]->name);

   return 0;
}

/******************************************************************/


random walk on a graph . complete the form,then choose the appropriate button at the bottom.   

In: Computer Science

Complete the below code so that your program generates a random walk on the given graph....

Complete the below code so that your program generates a random walk on the given graph. The length of your walk should also be random.

/******************************************************************/

#include <stdio.h>
#include <stdlib.h>
#include <time.h>

typedef struct NODE_s *NODE;
typedef struct NODE_s{
char name;
NODE link[10];
}NODE_t[1];

#define nodeA 0
#define nodeB 1
#define nodeC 2
#define nodeD 3
#define nodeE 4
#define nodeF 5

int main() {
srandom(time(NULL));
//printf("%d\n", random());

NODE_t node[6];
node[nodeA]->name = 'A';
node[nodeB]->name = 'B';
node[nodeC]->name = 'C';
node[nodeD]->name = 'D';
node[nodeE]->name = 'E';
node[nodeF]->name = 'F';

int i, j;
for (i = 0; i < 6; i++) {
for (j = 0; j < 10; j++) {
node[i]->link[j] = NULL;
}
}

//a -> c,d,e,f.
node[nodeA]->link[0] = node[nodeC];
node[nodeA]->link[1] = node[nodeD];
node[nodeA]->link[2] = node[nodeE];
node[nodeA]->link[3] = node[nodeF];

//b -> c,f.
node[nodeB]->link[0] = node[nodeC];
node[nodeB]->link[1] = node[nodeF];

//c -> a,b,e.
node[nodeC]->link[0] = node[nodeA];
node[nodeC]->link[1] = node[nodeB];
node[nodeC]->link[2] = node[nodeE];

//d -> a,e,f.
node[nodeD]->link[0] = node[nodeA];
node[nodeD]->link[1] = node[nodeE];
node[nodeD]->link[2] = node[nodeF];

//e -> a,c,d.
node[nodeE]->link[0] = node[nodeA];
node[nodeE]->link[1] = node[nodeC];
node[nodeE]->link[2] = node[nodeD];

//f -> a,b,d.
node[nodeF]->link[0] = node[nodeA];
node[nodeF]->link[1] = node[nodeB];
node[nodeF]->link[2] = node[nodeD];

//Random walk.

int choice = random() % 6;
printf("%c\n", node[choice]->name);

return 0;
}

In: Computer Science

The power delivered to the wheels of a vehicle (w) as a function of vehicle speed...

The power delivered to the wheels of a vehicle (w) as a function of vehicle speed (V) is given by: w = 0.01417[hp/mph2]V 2 + 0.6300[hp/mph]V - 0.3937[hp] where power is in horsepower and velocity in mph. The amount of heat rejected from the engine block (qb) is approximately equal to the amount of power delivered to the wheel (the rest of the energy from the fuel leaves with the exhaust gas). The heat is removed from the engine by pumping water through the engine block with a mass flow rate of m = 0.80 kg/s. The thermal communication between the engine block and the cooling water is very good, therefore you may assume that the water will exit the engine block at the engine block temperature (Tb). For the purpose of this problem, you may model the water as having constant properties that are consistent with liquid water at 70oC. The heat is rejected from the water to the surrounding air using a radiator, as shown in the figure. When the car is moving, air is forced through the radiator due to the dynamic pressure associated with the relative motion of the car with respect to the air. That is, the air is forced through the radiator by a pressure difference that is equal to ?V 2/2, where ? is the density of air. Assume that the temperature of ambient air is T? = 35oC and model the air in the radiator assuming that it has constant properties consistent with this temperature. The radiator has a plate-fin geometry. There are a series of tubes installed in closely spaced metal plates that serve as fins. The fin pitch is pf = 1.2mm and there are W/pf plates available for heat transfer. The heat transfer core has overall width W = 50 cm, height H = 30 cm (into the page), and length (in the flow direction) of L = 10 cm. For the purpose of modeling the air side of the core, you may assume that the air flow is consistent with an internal flow through rectangular ducts with dimension H x pf. Assume that the fins are 100% efficient and neglect convection from the external surfaces of the tubes as well as the reduction in the area of the plates associated with the presence of the tubes. Using the information above, develop a model that will allow you to predict the engine block temperature as a function of vehicle velocity. Prepare a plot showing Tb vs V . If necessary, produce additional plots to help with your explanation. If the maximum allowable temperature for the engine block is 100oC (in order to prevent vaporization of the water) then what range of vehicle speeds are allowed? You should see both a minimum and a maximum limit.


Show transcribed image text

In: Mechanical Engineering

Ice Cream Program Assignment Write a program that uses a function to ask the user to...

Ice Cream Program Assignment

Write a program that uses a function to ask the user to choose an ice cream flavor from a menu (see output below.) You must validate the users input for the flavor of ice cream accounting for both upper and lower-case letters. You must give them an appropriate error message and allow them to try again.   Once you have a valid flavor, your function will return the flavor back to the main() function.   

Your main() function will then ask for the number of scoops. You must validate this data! Make sure that the user chooses at least 1 scoop but no more than 4. If they try another other, you must give them an error message and allow them to try again.   

Your program will then calculate and display the cost of the ice cream. The cost of ice cream is $ .75 for the cone and $1.25 per scoop.

Your program will continue asking customers for the flavor and number of scoops until they choose ‘Q’ to quit.

The program will then send all of the data to a function to display the total number of cones sold, the total amount collected, and the total scoops of each type of ice cream sold.  

Sample Output:

Please Choose your Favorite Flavor!

        V - Vanilla

        C - Chocolate

        F - Fudge

        Q - Quit

-----> v

How many scoops would you like? 2

Your ice cream cone cost $   3.25 Please Choose your Favorite Flavor!

        V - Vanilla

        C - Chocolate

        F - Fudge

        Q - Quit

-----> c

How many scoops would you like? 5

That is an invalid number of scoops! You may only choose between 1 and 4

Please try again!

How many scoops would you like? 0

That is an invalid number of scoops! You may only choose between 1 and 4

Please try again!

How many scoops would you like? 3

Your ice cream cone cost $   4.50 Please Choose your Favorite Flavor!

        V - Vanilla

        C - Chocolate

        F - Fudge

        Q - Quit

-----> s

How many scoops would you like? 1

Your ice cream cone cost $   2.00 Please Choose your Favorite Flavor!

        V - Vanilla

        C - Chocolate

        F - Fudge

        Q - Quit

-----> q

The total number of cones sold:           3

The total scoops of vanilla sold:         2

The total scoops of chocolate sold:       3

The total scoops of fudge sold:           1

The total amount collected:         $ 9.75

In: Computer Science