COMPLETE QUESTION
Which of the following is false?
a. A subclass is often larger than its super class.
b. A super class is object is a subclass object.
c. The class following the extends keyword in a class declaration is that direct super class of the class being declared.
d. Java uses interfaces to provide the benefits of multiple inheritance
Answer:
B) A super class is object is a subclass object.
Explanation:
In object oriented programming, the concept of inheritance is greatly utilized, this refers to deriving a class from another class. The derived class is the sub-class and it is derived from its super class, as a matter of fact in Java programming language, all classes are derived from some other class. Objects are made from classes with their state (fields) and behavior (methods) since objects are made from classes, the objects of the super class will not be the same as that of the subclass.
Answer:
Explanation:
To develop the model for Creating the supertype/subtype relationship three diffrent types of notation is given bellow accrdig to the diagram attached.
1.Traditional EER (Enhance Entity-Relational) notation
2.Microsoft Visio notation
3.Subtypes Inside supertype note
<em><u>Traditional EER(Enhance Entity-Relational)notation for the international school of technology diagram is attached bellow</u></em>
The diagram consist of the following entity
Room Supertype
Media Entity Type
COURSE entity type
Section weak entity type
Schedule associatiative entity type
<u><em>Microsoft Visio Notation for the international school of technology is ashown in the diagram bellow.</em></u>
The diagram consist of the following entity
Room Supertype
Media Entity Type
Computer entity type
Instructor entity type
Time slot entity type
<u><em>Subtype Inside Supertype note Notation for the international school of technology is shown in the diagram bellow.</em></u>
The diagram consist of the following entity
Room Supertype
Media Entity Type
Computer entity type
Instructor entity type
Time slot entity type
Answer:
The solution code is written in Python 3 as below:
- outfile = open("greeting.txt", "w")
- outfile.write("Hello World")
- outfile.close()
Explanation:
To create a simple text file in Python, we can use Python built-in function, <em>open()</em>. There are two parameters needed for the open() function,
- the file name and
- a single keyword "w". "w" denote "write". This keyword will tell our program to create a file if the file doesn't exist.
The statement <em>open("greeting.txt", "w")</em> will create a text file named "<em>greeting.txt</em>" (Line 1)
To fill up the content in the greeting.txt, we use <em>write()</em> method. Just include the content string as the argument of the <em>write()</em> method. (Line 2)
At last, we use <em>close() </em>method to close the opened file,<em> outfile</em>. This will release the system resource from the<em> outfile.</em>
Answer:
Here is the Python program:
d = {5:3, 4:1, 12:2}
val_of_max = d[max(d.keys())]
print(val_of_max)
Explanation:
The program works as follows:
So we have a dictionary named d which is not empty and has the following key-value pairs:
5:3
4:1
12:2
where 5 , 4 and 12 are the keys and 3, 1 and 2 are the values
As we can see that the largest key is 12. So in order to find the largest key we use max() method which returns the largest key in the dictionary and we also use keys() which returns a view object i.e. the key of dictionary. So
max(d.keys()) as a whole gives 12
Next d[max(d.keys())] returns the corresponding value of this largest key. The corresponding value is 2 so this entire statement gives 2.
val_of_max = d[max(d.keys())] Thus this complete statement gives 2 and assigns to the val_of_max variable.
Next print(val_of_max) displays 2 on the output screen.
The screenshot of program along with its output is attached.
Answer:
ipods, windows 10,intengrated circut
Explanation: