> Terminal X + workspace $ python3 main.py The new upad has a 12.9 inch display. A max imum 1TB of storage and runs on the latest version of uPadOS 13.5.1. Its biggest compe titor is the Root Pro X which holds a simil ar 13.0 inch display, with a maximum storag e capacity of 512GB and runs Glass 10 Home. workspace $

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter15: Using Javafx And Scene Builder
Section: Chapter Questions
Problem 10PE
icon
Related questions
Question

Suppose you are a backend developer for a tech news platform. You have been asked to design a templating system for their news articles. To do this, you will need to run some proof of concepts.

  1. Define the TabletComputer class in the main.py file so that the code in Snippet 7.19 runs without error:

# Write your TabletComputer class here
 
uPad = TabletComputer(12.9, "1TB", "uPadOS 13.5.1")
rootProX = TabletComputer(13.0, "512GB", "Glass 10 Home")
 
print(f"The new uPad has a {uPad.screen_size}"
    f" inch display. A maximum {uPad.storage} of storage and runs on"
    f" the latest version of {uPad.os}. Its biggest competitor is"
    f" the Root Pro X which holds a similar {rootProX.screen_size}"
    f" inch display, with a maximum storage capacity of {rootProX.storage} and runs {rootProX.os}."
      )

  1. Define the __init__ function within the TabletComputer class with the necessary parameters to set up the member variables.

You will need to set the following member variables:

  • screen_size
  • storage
  • os
  1. After defining the class, running the preceding code should yield the output 
> Terminal
X
+
workspace $ python3 main.py
The new upad has a 12.9 inch display. A max
imum 1TB of storage and runs on the latest
version of uPadOS 13.5.1. Its biggest compe
titor is the Root Pro X which holds a simil
ar 13.0 inch display, with a maximum storag
e capacity of 512GB and runs Glass 10 Home.
workspace $
Transcribed Image Text:> Terminal X + workspace $ python3 main.py The new upad has a 12.9 inch display. A max imum 1TB of storage and runs on the latest version of uPadOS 13.5.1. Its biggest compe titor is the Root Pro X which holds a simil ar 13.0 inch display, with a maximum storag e capacity of 512GB and runs Glass 10 Home. workspace $
AI-Generated Solution
AI-generated content may present inaccurate or offensive content that does not represent bartleby’s views.
steps

Unlock instant AI solutions

Tap the button
to generate a solution

Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT