Expert systems can be built based on rules or cases

1. Expert systems can be built based on
rules or cases. What is the difference between the two?

2. Describe the roles of the domain expert,
the knowledge engineer, and the knowledge user in expert systems.

3. What is informatics? Give a few
examples.

threats to integrity from users and from system components.

Define the integrity property of reliable
communication and list all the possible threats to integrity from users and
from system components. What measures can be taken to ensure the integrity
property in the face of each of these sources of threats.

“JH-Lisp2”

6. The following is a description for “JH-Lisp2”, which is a modified version of the language previously described in homework 3, problem 6: (a) The alphabet of JH-Lisp2 consists of the open ‘[‘ and close ‘]’square brackets, the digits 0-9, the underscore character ‘ _”, and the letters {a,b,d,i,1,m,0,s,u,v} (b) An operator is a substring in JH-Lisp2 containing one of the following strings: {add, sub, mul, div, mod}. (c) A number is a substring in JH-Lisp2 containing one or more of the digits 0-9 (d) An expression is defined as either a number or a list expression (e) A list expression is defined by the following, in order: i. An open bracket: ‘[‘ ii. An operator iii. An underscore:) iv. An expression V. An underscore: ” vi. An expression vii. A close bracket: ‘]’ (f) A string in the JH-Lisp2 language is a single list expression. An example string in this language might be [add_[mod_4_3] _21] Give a context-free grammar for JH-Lisp2.

Use the Android Studio and select your preferred Layout (Linear, Relative, Grid, or Constraint) to design the following Screen.

This assignment consists of two parts: 1. Use the Android Studio and select your preferred Layout (Linear, Relative, Grid, or Constraint) to design the following Screen. Please show me your xml code and a screen shot showing your design. [5 marks] W Галист 150 + o 2. Use the Android Studio to develop a mobile app that consists of three activities as shown below. The first activity has two buttons when being clicked the first on goes to activity 2 and the second one goes to activity 3. The second activity has two buttons when being clicked the first on goes to activity 3 and the second one goes to activity 1. The third activity has two buttons when being clicked the first on goes to activity 2 and the second one goes to activity 1. Show me only your java code. [5 marks] go to activity2 go to activity2 go to activity 1 go to activity 3 go to activity 3 go to metivity 1 activity 3 activity 1 activity 2

Write a program/Matlab to read the number of credits registration per semester for an HCT student and categorize it into minimum credit, standard credit, and maximum cred

Question 7: Write a program/Matlab to read the number of credits registration per semester for an HCT student and categorize it into minimum credit, standard credit, and maximum credit. Insert the coding: Insert the output: Question 8: Write a C program/Matlab that calculate the sum of harmonic series for 1+1/3+1/S+1/7+1/9+………1/n terms. Insert the coding Insert the output: Question 9 Write a C program/Matlab to ask user to input 10 numbers and print out the maximum and minimum numbers from the set Insert the coding Focus

Provide your own implementation (name the new class MyString2) with one data field, array of characters, and the following methods:

The String class is provided in the Java library. Provide your own implementation (name the new class MyString2) with one data field, array of characters, and the following methods: public MyString2(String s); constructor • public String getArray();return the data field as a String. public MyString2 substring(int begin); create a new string starts at begin and return it. public MyString2 toUpperCase(); convert all characters in a string to uppercase and return it. • public static MyString2 valueOf(boolean b); convert b value to string and return it. Do not use any method from String (you can use length), StringBuilder, or StringBuffer .

create a function in MATLAB for approximating a root of a function using the Newton-Raphson method.

Question #2 – 8 Marks For this question your are going to create a function in MATLAB for approximating a root of a function using the Newton-Raphson method. You can use your Bisect.m function M-File for the Bisection Method as a template. You will then use your Newton function to solve an engineering problem from the textbook. (a) (2 points) Write a MATLAB function M-file for Newton’s method corresponding to the following pseudocode: function root = Newton( 20, €, imax ) it1 output heading while i < imax root + 20 – f(20)/f'(:30) output i, root if |1 – Xo/root| < € return end if it i+1 root end while output “failed to converge” Use the following (or similar) MATLAB print statements for output. fprintf ( iteration approximation \n’) fprintf (” %6.0f %18. 8f \n’, i, root ) fprintf ( ‘ failed to converge in %g iterations\n’, imax ) Pass the additional parameters f and fp for f and f’ and use the function handle Qfunctionname to pass the functions. (similar to the way f was a parameter in the bisection function in my code). DELIVERABLES: A copy of your MATLAB M-file as part of your PDF. 3 (b) (2 points) A catenary is the curve formed by a hanging cable. Considering a Cartesian coordinate system in the (2, y)-plane, suppose that the lowest point of a catenary is at the origin (0,0). Then, the formula for the catenary that hangs from the two points (a,b) in the (x, y)-plane is b = ccosh(a/c) – C for some constant c. Determine the value of c for the catenary that passes through the points (15,4). You will need to write MATLAB function M-files with headers something like function y = fQ2b(x) and function y = fpQ2b(x) corresponding to the function f(c) that you are computing a zero of, and its derivative TOP SURG ame” f'(2), which you will need to determine using calculus. DELIVERABLES: Copies of your M-files for the function and its derivative in your PDF. (c) (2 points) Use the MATLAB function M-file Newton, from (a), with 20 = 10, € = 10-8, and imax=20 to solve the problem in Q2(b). Remember, you cannot pass the functions f(x) and f'(2) directly as arguments to the Newton function. You should use function handles. DELIVARABLES: Provide the call you used and the output of the function. (d) (2 points) Use the MATLAB function ezplot to draw a graph of the above catenary on the interval -15, 15). The following MATLAB statement illustrates the syntax of ezplot (this is not the input for your question!): ezplot(‘exp(-x)+cos(pi*x)’, (-1, 5 ] ) This example will cause a graphics window to open and display the graph of the function e-* + cos(Tu) on the interval (-1,5). DELIVERABLES: Your MATLAB input commands and the corresponding plot.

Review each scenario carefully and respond to each question as either (very ethical, ethical, neither ethical nor unethical, unethical, very unethical) and justify your choice.

Review each scenario carefully and respond to each question as either (very ethical, ethical, neither ethical nor unethical, unethical, very unethical) and justify your choice.

  1. A student found a loophole in the university computer’s security system that allowed him access to other students’ records. He told the system administrator about the loophole, but continued to access others’ records until the problem was corrected two weeks later.
  1. The student’s action in searching for the loophole was:
  2. The student’s action in continuing to access others’ records for two weeks was:
  3. The system administrator’s failure to correct the problem sooner was:

Define a function named case_table(a_dict, months_list) which takes a covid19 country-cases dictionary and a list of month names as parameters.

Please write in python and include explanations and screenshots to allow for viewing of correct indentations

Define a function named case_table(a_dict, months_list) which takes a covid19 country-cases dictionary and a list of month names as parameters.
– The function prints the contents of the dictionary in a table format as shown in the example below. The key of each dictionary item is the country name and the value is a list of monthly cases for the country.
– The width of the first column is 15 and the the width of other columns is 10. The content of each column is aligned to the left edge of the column.
– The second row of the table has a horizontal line of ‘-‘ characters. The function should also print the number of total cases at the end of each row.
– Note: the function should print the table in ascending keys order.

TestResult
data = {‘Uruguay’: [2634, 1049, 448], ‘Taiwan’: [120, 41, 26]} months_list = [‘Nov’, ‘Oct’, ‘Sept’] case_table(data, months_list)Name Nov Oct Sept Total ——————————————————- Taiwan 120 41 26 187 Uruguay 2634 1049 448 4131
data = {‘NewZealand’: [99, 121, 93, 177, 32], ‘Singapore’: [210, 261, 971, 4962, 8148], ‘Thailand’: [197, 216, 152, 102, 139]} months_list = [‘Nov’, ‘Oct’, ‘Sept’, ‘Aug’, ‘Jul’] case_table(data, months_list)Name Nov Oct Sept Aug Jul Total ————————————————————————— NewZealand 99 121 93 177 32 522 Singapore 210 261 971 4962 8148 14552 Thailand 197 216 152 102 139 806
data = {‘Thailand’: [197, 216, 152, 102, 139]} months_list = [‘Nov’, ‘Oct’, ‘Sept’, ‘Aug’, ‘Jul’] case_table(data, months_list)Name Nov Oct Sept Aug Jul Total ————————————————————————— Thailand 197 216 152 102 139 806
data = {‘Uruguay’: [2634, 1049, 448], ‘Taiwan’: [120, 41, 26]} months_list = [‘Nov’, ‘Oct’, ‘Sept’]

Create a record (not an object) to represent the following: One elk, representing the following properties or characteristics: (1) gender (M’ or ‘F) (2) weight (in pounds, to the nearest tenth of a pound).

(5) The Animal Planet Channel wants to study the genetics of elk. (a) Create a record (not an object) to represent the following: One elk, representing the following properties or characteristics: (1) gender (M’ or ‘F) (2) weight (in pounds, to the nearest tenth of a pound). (3) age (rounded down to the nearest year) (b) Inside the class with the main program (called TestElk), (6.1) Write a subprogram that generates a new elk given its gender and its two parents. Use the parameter list for the input (the two parent elk and the gender of the child). Use the return statement for the result (the baby elk). Use the following rules to define the remaining properties of the baby elk: (1) the age is always zero. (11) The weight of the child is … c=w.m where c=child’s weight w = weight of the father m=multiplier, as follows mother’s age multiplier 0.11 5 Sage < 12 0.08 12 Sage 0.06 (6.2) Write a main program that considers a herd of elk. age <5, (1) Declare two variables to represent the breeders of a small herd (one male and one female). (2) Assign the properties of the male: Age: 4 Weight: 220 (3) Assign the properties of one female. Ask the user to enter the age and weight. (Check the age for errors. Repeat the question until the user enters a positive number less than 20. To save time, do NOT check the weight for errors.) (4) Compute the total weight of all the newborn babies over the next 10 years. Each year there is one male child of the two breeders. Each year the age of the parents increases by one. (5) Display the total weight of all the newborns (at birth). (The total weight is the sum of the 10 weights.) (6) Repeat steps 3 through 5 until the user chooses to quit. WARNING: Write the subprogram according to its specifications. Do not simplify it for this particular main program. Write a subprogram that will work with other applications as well. (12) A Torple is a single-celled organism that produces its own offspring. (Each has only one parent.) (a) Create a record to represent the following An individual Torple has the following properties or characteristics: (1) mode (‘A’ or ‘B’) (2) number of borts (a particle that cannot exist in fractional portions) (3) weight (in grams, to the nearest milligram; could be as large as one million) (4) efficiency (as little as 0.01, but could be up to, but not including, 10) (b) Write a subprogram that generates a new Torple given its parent. Use the following rules to define the properties of the new Torple. (1) The mode is always opposite: an ‘A’ parent generates a ‘B’ child and ‘B’ generates ‘A’. (ii) The number of borts stays the same if the parent is an ‘A’, otherwise it increases by one. (iii) The weight of the child is the weight of the parent times the efficiency of the parent. (iv) The efficiency of the child is dependent on the parent’s number of borts, as follows: increase borts <4, 0.05 4 <borts<9 0.20 9<borts 0.80 The efficiency of the new Torple is the efficiency of the parent plus the increase. If the new efficiency is greater than or equal to 10, reset it to 0.5 Use the parameter list for the input, and the return statement for the result. Create and return a new instance of Torple. (c) Write a main program that displays a table of Torple weights over 10 generations. (1) Start with a Torple with the following characteristics: mode ‘A’, 3 borts, and an efficiency of 0.10. (ii) Ask the user to enter the initial weight. Repeat the question until the user enters a positive number. (iii) Produce a table of the weights over the next 10 generations. – For each generation, display the generation (1,2,3,…) starting with the first torple and the weight of that generation. – Display column headings above the table. Gen Weight (g) – Use the subprogram in part (b) to compute each new generation of Torple. (Do not copy this code, or repeat the calculations.) (iv) Repeat steps (ii) and (iii) until the user chooses to stop. import java.util.Scanner; // continued on next page… class Torple { public char mode; public int borts; public double weight; public float efficiency, } public class Exami { public static Torple maketorple ( Torple parent ) float increase; Torple child = new Torple(); ‘B’ if ( parent.mode — ‘A’) child.mode else child.mode – ‘A’; child. borts – parent.borts; if ( parent.mode — ‘B’ ) ++child.borts; child.weight = parent.weight * parent.efficiency; if ( parent, borts <4) increase -0.05; else if ( parent.borts < 9) increase – 0.20; else increase – 0.8; child.efficiency – parent.efficiency + increase; if (child.efficiency >= 10 ) child.efficiency – 0.5; return child; } public static void main(String[] args) { Scanner keyboard = new Scanner(System.in); char another; Torple entity = new Torple(); do ! entity.mode – ‘A’, entity.borts – 3; entity.efficiency = 0.10; do { System.out.println(“\nEnter initial weight (grams): “); entity.weight = keyboard.next Double(); if ( entity.weight <= 0 ) System.out.println(“\nEnter a positive number\n”); } while ( entity.weight <=0); System.out.println(“\tGen\tWeight (g)” ); System.out.println(“\t 1\t” + entity.weight ); for (int i = 0; i < 10; ++i) { entity = ma ke Torple( entity ); System.out.println(“\t ” +(1+2) + “\t” + entity.weight ); } System.out.println(“\nAnother table (y/n)? ” ); another – keyboard.next().charAt(0); } while ( another — ‘y’ ); System.out.println(“\nHave a nice day \n” ); }

Open chat