What type of program would have a class named Student with objects called fullTime and partTime?
A. machine language program
B. object-oriented program
C. markup language program
D. procedural language program
Answer:
B. object-oriented program
Explanation:
An object-oriented program or OOP is a type of program that uses the concepts of objects and methods.
Although they are quite broad, they also make use of classes and types.
Java, for instance makes use of OOP as they use classes and objects under those classes and name them anyhow they want.
Therefore, the correct answer is B
Answer:
see explanation
Explanation:
Carlos can make a copy of the old presentation that preserves all the formatting, and replace old content with new information.
Answer:
weights = []
total = 0
max = 0
for i in range(5):
weight = float(input("Enter weight " + str(i+1) + ": "))
weights.append(weight)
total += weights[i]
if weights[i] > max:
max = weights[i]
average = total / 5
print("Your entered: " + str(weights))
print("Total weight: " + str(total))
print("Average weight: " + str(average))
print("Max weight: " + str(max))
Explanation:
Initialize the variables
Create a for loop that iterates 5 times
Get the values from the user
Put them inside the array
Calculate the total by adding each value to the total
Calculate the max value by comparing each value
When the loop is done, find the average - divide the total by 5
Print the results
In programming they know it as a String which is a sequence of characters that are composed of literal constants or some kind of variables. A sting is any finite sequence of characters. every single string has its own lenght and this is one of the most important characteristics of them. Strings are essential to communicate information from the program to the user.