Question
Making Label Value 2 Name lbValue2 = new Label(Value 2: ); // Make Textfield 2 TextField txt2 = new TextField(); txt2.setPrefSize(230, 25); // Making Hbox
Making Label Value 2 Name lbValue2 = new Label("Value 2: "); // Make Textfield 2 TextField txt2 = new TextField(); txt2.setPrefSize(230, 25);
// Making Hbox then, at that point, add mark 2 and textfield 2 HBox hb2 = new HBox(lbValue2, txt2); hb2.setSpacing(10); hb2.setAlignment(Pos.CENTER_RIGHT); hb2.setPadding(new Insets(3));
// Making Buttons Button btn1 = new Button("_Multiply"); btn1.setPrefSize(95, 30); Button btn2 = new Button("_Divide"); btn2.setPrefSize(95, 30); Button btn3 = new Button("_Add"); btn3.setPrefSize(95, 30); Button btn4 = new Button("_Subtract"); btn4.setPrefSize(95, 30);
// Making Hbox then, at that point, add buttons HBox hb3 = new HBox(btn1, btn2, btn3, btn4); hb3.setSpacing(5); hb3.setAlignment(Pos.CENTER); hb3.setPadding(new Insets(3));
// Making Label 3 Mark lb3 = new Label("");
// Making Hbox then, at that point, add mark 3 HBox hb4 = new HBox(lb3); hb4.setSpacing(5); hb4.setAlignment(Pos.CENTER); hb4.setPadding(new Insets(3));
// VBox format then place hboxes Vbox = new VBox(hb1, hb2, hb3, hb4); vbox.setSpacing(5); vbox.setAlignment(Pos.CENTER); vbox.setPadding(new Insets(10));
// Start up Scene and set VBox as root hub Scene = new Scene(vbox, 370, 170); stage.setScene(scene);
// setting the title stage.setTitle("Calculator"); // Set scene to the stage, and call stage's show() strategy to show it. stage.show(); }
// fundamental technique public static void main(String[] args) { // calls send off technique launch(args); }
}
not running When placed this code in EclipseIDE
Compose work considered printArray that will print a variety of any size.
Compose work that acknowledges an int exhibit and the cluster's size as contentions. The capacity ought to make new exhibit that is one component bigger than the contention cluster.
compose work called prime_check(int x) that takes a number as an info then return 1 assuming it is an indivisible number nd returns 0 assuming it is a composite number
Then, at that point, Write program that expeditious the client to enter two numbers:
Compose program to info and print the more prominent of three numbers.
Compose program to information and print whether a number is positive or negative
Give an accuracy confirmation for the calculation. You might utilize the combination lemma without demonstrating it. . If s u ? v is a briefest way from s to v, and sooner or later d[u] = ?(s, u), and eventually after that the edge (u, v) is loose, then, from that point on, d[v] = ?(s, v). Extra clue on documentation: s u = way from s to u comprising of at least 0 edges (0 when s ? u); u ? v = way from u to v comprising of unequivocally one edge; d[u] = weight of the most limited way seen as such a long ways from source s to vertex u; ?(s, v) = weight of briefest existing way from s to v.]
A running interaction settles on a framework decision which can be adjusted quickly by the piece. [2 marks] (iv) A running cycle settles on a framework decision which requires an I/O activity to be started. [2 marks] 4 CST.2012.2.5 4 Operating Systems Consider the accompanying plan for organizing a document from a bunch of plate blocks. A plate block contains 4096 bytes and a square location is 32 pieces. The primary square of the record contains the accompanying data: control data: 1024 bytes direct square pointers: 1024 bytes aberrant square pointer: 4 bytes twofold roundabout square pointer: 4 bytes prompt information: 2040 bytes The information bytes of the document start toward the start of the quick information. After the quick information, the record information is found on the square tended to by the primary direct square pointer and afterward carries on in a style like the construction characterized by a Unix inode. We consider the main byte of the document to be byte 0, then, at that point, byte 1, and so forth (a) For every one of the accompanying depict the moves made to bring the showed byte of a record, and state what number of circle squares might should be perused: (I) byte 70 of the document [1 mark] (ii) byte 220 + 2044 [1 mark] (b) How huge could a record at any point be assuming it is to be ensured that main three plate blocks should be perused to get to some random byte of the record? [4 marks] (c) Information about a record can be put away in an index that references the document or in the control part of the principal square of the document (for example inode in Unix). Which of these is utilized in the Unix record framework to store the accompanying data and why? (I) season of creation [3 marks] (ii) record name [3 marks] (iii) document access freedoms [3 marks] (d) Another method for organizing documents on a plate is to utilize actually touching squares (with coterminous addresses), so that in the event that the primary square of a document is block b, the following square of the record is b + 1. Assume we utilize this technique, hold the control data on the primary square, yet remember the initial 3 KBytes of the document for the main square. Remark on the exhibition of such a framework, thinking about perusing, composing, and making documents. [5 marks] 5 (TURN OVER) CST.2012.2.6 SECTION C 5 Discrete Mathematics II Let A, B, C be sets with relations R ? A B and S ? B C. (a) Give the meaning of the social organization S ? R. [1 mark] (b) The capacities p, q, r are characterized as follows: p : A B C ? A B with the end goal that p(a, b, c) = (a, b) q : A B C ? B C to such an extent that q(a, b, c) = (b, c) r : A B C ? A C to such an extent that r(a, b, c) = (a, c) (I) Describe the opposite pictures p ?1R and q ?1S. [2 marks] (ii) For X ? A B C depict its immediate picture r X under r. [2 marks] (iii) Prove that the social structure S ? R approaches r (p ?1R ? q ?1S) , the immediate picture of the set p ?1R ? q ?1S under r . [5 marks] (c) Suppose the relations R and S are countable. Is the social structure S ?R countable? Legitimize your response. [Note: You might utilize any notable outcomes gave you state them clearly.] [6 marks] (d) Suppose now that A = B = C and that both R and S are all around established relations. Is the social arrangement S ? R all around established?
A PMDC machine is driven by a power electronics drive as shown below. Determine the duty cycle, D, necessary to operate at the below conditions? Source + 911 921 35.X% 44.X% 66.X % 73.X% none of the above Power Electronics B 912 J922 Va PMDC Tmech @m TLoad Vs = 300 [Vdc] R = 1.5[0] La = 2.5[mH] Km = 0.9 [Nm] wm = 100 [rad] Wm TLoad 5.0 [Nm] =
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started