Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Homework 2: Storing Primitive Data CS 1323/4 Spring 2021 Name: Student ID (usually 112-XXX-XXXX or 113-XXX-XXXX): 1. (14 points) Declare a variable of the best

image text in transcribed
image text in transcribed
Homework 2: Storing Primitive Data CS 1323/4 Spring 2021 Name: Student ID (usually 112-XXX-XXXX or 113-XXX-XXXX): 1. (14 points) Declare a variable of the best type (int, double char, String, boolean) to store each of the following items. A variable declaration uses a type followed by an identifier, as shown below. int lAmAnidentifier; a. The number of masks left in a bag of masks. b. The height of a mask in inches, including partial inches. c. The height of a mask in millimeters. There are about 25 millimeters in an inch. Do not include partial millimeters, because they are too small to measure. d. The type of a mask (i.e. cloth, surgical, N95, KN95). e A single letter code that tells you the type of mask (e.g A - cloth, B = surgical, etc.) f. The name of the country where a mask was produced & Whether or not a mask has a metal stay at the nose bridge. 2. (6 points) What will each of the variables below contain after the statements are executed? double first 4,5) double second 7.3: double third - 5.2: second third: third first; first = second; Fill in the table below to show what value each variable contains. Include both the starting value (in the top line) and the ending value in the bottom line), even if they are the same. first second third Variable Starting value Ending value

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning Microsoft SQL Server 2012 Programming

Authors: Paul Atkinson, Robert Vieira

1st Edition

1118102282, 9781118102282

More Books

Students also viewed these Databases questions

Question

What are the Five Phases of SDLC? Explain each briefly.

Answered: 1 week ago

Question

How can Change Control Procedures manage Project Creep?

Answered: 1 week ago