Question

Consider the following variables: a. NumberOfComputersInaClassroom: b. WifiPassword c. ConvertFromKMtoMeters d. CountryName e. SubjectName f. Price...

Consider the following variables:

a. NumberOfComputersInaClassroom:

b. WifiPassword

c. ConvertFromKMtoMeters

d. CountryName

e. SubjectName

f. Price

g. county Tax

for each one of them:

a. Would you define them as a constant or data variable?

b. What data types would you choose for them?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

a. NumberOfComputersInaClassroom:

The above name can be defined as a constant if we have the number in advance otherwise we will define a data variable.

The data type would be an integer because this is a number.

b. WifiPassword

The above name can be defined as a constant if we have the password in advance otherwise we will define a data variable.

The data type would be string because this is an array of characters.

c. ConvertFromKMtoMeters

The above name must define as a data variable because the value is calculated.

The data type would be float or double because the values in meter can be float or double.

d. CountryName

The above name can be defined as a data variable.

The data type would be string because this is an array of characters.

e. SubjectName

The above name can be defined as a data variable.

The data type would be string because this is an array of characters.

f. Price

The above name must define as a data variable.

The data type would be float or double because the price is a decimal value.

g. county Tax

The above name must define as a data variable.

The data type would be float or double or boolean.

If this is only yes or no option then it must be boolean type otherwise it would be float or double type.

Add a comment
Know the answer?
Add Answer to:
Consider the following variables: a. NumberOfComputersInaClassroom: b. WifiPassword c. ConvertFromKMtoMeters d. CountryName e. SubjectName f. Price...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Consider the following page reference string: A C B D B A E F B F...

    Consider the following page reference string: A C B D B A E F B F A G E F A Assuming demand paging with four frames, how many page faults would occur for the following replacement algorithms? Remember that all frames are initially empty, so your first unique pages will cost one fault each. Show all of your works. LRU replacement FIFO replacement Optimal (MIN) replacement

  • Consider the following sequence of page references: A,B,B,C,A,E,D,B,D,E,A,C,E,B,A,C,A,F,D,F and consider that a working set strategy is...

    Consider the following sequence of page references: A,B,B,C,A,E,D,B,D,E,A,C,E,B,A,C,A,F,D,F and consider that a working set strategy is used for page replacement. What will the contents of the working set at each stage be for the following? a. Window Size = 2 b. Window Size = 3 c. Window Size = 4

  • 1. Consider the code sequence: C= A + B D= A-E F= C+ D Assume the...

    1. Consider the code sequence: C= A + B D= A-E F= C+ D Assume the values A, B, C, D, E, and F reside in memory. For each Architecture I. Accumulator Architecture II. Memory- Register Architecture III. Register-Register Architecture write the code assuming the instruction codes (opcode) are 8 bits, memory addresses are 32 bits, and register addresses are 6 bits and CPU has 64 Registers; and create a table which specifies: – The execution sequence – The variables...

  • We have the attributes: {A, B, C, D, E, F, G}. Consider the following functional dependencies...

    We have the attributes: {A, B, C, D, E, F, G}. Consider the following functional dependencies E, F → C E → F B → A, G A, E, F → C, G D → A C, D, F → B, E, G A → B B, E → D, G Mark all functional dependencies that are implied by the dependencies above: a). D,F --> E, F b). D,F --> A,F c) D,F --> A d) D,F -->G e) D,F...

  • File Edit Format View Help Graphs and trees 4. [6 marks] Using the following graph representation (G(V,E,w)): v a,b,c,d,e,f E fa,b), (a,f),fa,d), (b,e), (b,d), (c,f),(c,d),(d,e),d,f)) W(a,b) 4,...

    File Edit Format View Help Graphs and trees 4. [6 marks] Using the following graph representation (G(V,E,w)): v a,b,c,d,e,f E fa,b), (a,f),fa,d), (b,e), (b,d), (c,f),(c,d),(d,e),d,f)) W(a,b) 4,W(a,f) 9,W(a,d) 10 W(b,e) 12,W(b,d) 7,W(c,d) 3 a) Draw the graph including weights. b) Given the following algorithm for Inding a minimum spanning tree for a graph: Given a graph (G(V,E)) create a new graph (F) with nodes (V) and no edges Add all the edges (E) to a set S and order them...

  • We have the attributes: {A, B, C, D, E, F, G}. Consider the following functional dependencies...

    We have the attributes: {A, B, C, D, E, F, G}. Consider the following functional dependencies F → C, D E → B B, D, G → C G → B, D B, G → D, E F → E B, E → A, F F, G → C, D The minimal keys are: {G} Determine whether these functional dependencies are in the following normal form(s): Third Normal form or Boyce Codd normal form

  • Consider the simple graph G, given the following: (assume A=0,B=1, C=2, D=3, E=4, F=5, G=6) A...

    Consider the simple graph G, given the following: (assume A=0,B=1, C=2, D=3, E=4, F=5, G=6) A 3 3 8 B D 5 ho 5 8 E F G 4 3 a) Use the Breadth-First Search algorithm to traverse G and give the traverse sequence, starting from A. Assume you always choose the candidate with the SMALLEST index among the candidates at each step. b) Use the Depth-First Search algorithm to traverse G and give the traverse sequence, starting from A....

  • 1. Consider the sets: A = {a, b, c, d, e, f, h, j}, B =...

    1. Consider the sets: A = {a, b, c, d, e, f, h, j}, B = {a, b, i }, C = {f, h} and U = {a,b,c,d,e,f,g, h,i,j} a. Draw a Venn diagram and place each element in its appropriate region. Insert a photo of your diagram into your HW document. b. Is C a subset of A? Why? C. Is C a subset of B? Why? d. Is A a subset of B? Why? e. Are B and...

  • Let A={a b c d e f} B={a c e g} C = {b d f}...

    Let A={a b c d e f} B={a c e g} C = {b d f} Find each: B = {a, c, e,g} C = {b,d,f} A= {a,b,c,d,e,f} Find: (2 points each) (a) AnB (b) AUB (c) Ang (d) COB (e) CUB (f) (An B)UC (g) An(BUC) (h) Ax B (i) C XB G) AB (k) C ( BA) (1) B2

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT