1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
dangina [55]
2 years ago
6

Assuming that a year has 365 days, write a class named DayOfYear that takes an integer representing a day of the year and transl

ates it to a string consisting of the month followed by day of the month. For example,
Day 2 would be January 2
Day 32 would be February 1
Day 365 would be December 31.



The constructor for the class should take as parameter an integer representing the day of the year, and the class should have a member function print() that prints the day in the month- day format. The class should have an integer member variable to represent the day, and should have static member variables of type string to assist in the translation from the integer format to the month-day format. Test your class by inputting various integers representing days and printing out their representation in the month-day format.

need to figure out how to get my main function to dispaly the day THAT THE USER INPUTS in the correct month-day format.
Computers and Technology
1 answer:
gladu [14]2 years ago
8 0

Answer:

just try your best and take a good guest you dont need to cheat

Explanation:

Quality is not an act, it is a habit. ...

Well done is better than well said. ...

Life is 10% what happens to you and 90% how you react to it. ...

With the new day comes new strength and new thoughts. ...

Knowing is not enough; we must apply. ...

Good, better, best. ...

Optimism is the faith that leads to achievement.

You might be interested in
A fast food chain that wants to inform consumers about its latest dollar menu item will most likely use ___ to do so. ____ may i
Eva8 [605]
The correct answer is 1: B new tech and 2:C we can tell by the way businesses are incorporating things like social media like how Wendys got more popular because of their sassy tweets
3 0
3 years ago
Read 2 more answers
Jennifer has written a short story for children. What should be her last step before she submits the story for publication?
SSSSS [86.1K]

Answer:

What is the choice of being answer c?

6 0
3 years ago
Which behavior could be acceptable at a classical concert as well as at a ball game? standing for an exceptional performance che
Lady_Fox [76]
Standing for an exceptional performance would be normal "acceptable" in both scenarios.
7 0
3 years ago
Read 2 more answers
A new laptop was delivered to your home and left on the porch while you were at work. It is very cold outside, and you don't kno
kifflom [539]

Answer:

Let the computer warm up to room temperature before turning it on.

Explanation:

The laptop has been shipped to the user's home when he were at work and found on the deck. Outside it is really cool and he don't remember how long it has been there. Then, the user open his laptop and want to know whether it is functioning properly. Instead, let the machine warm up while switching it on to room temperature.

When a computer is still in a cold climate, they have to let it heat up to room temperature apx. 6-24 hours before switching it on. Otherwise, its heat the elements generate could cause water moisture within the laptop. That water could then harm elements of the system.

7 0
3 years ago
To reduce the number of used digital outputs of the microcontroller, the display board is connected to the main board through th
Luda [366]

Answer:

The program in Python is as follows:

BCD = ["0001","0010","0011","0100","0101","0110","0111"]

num = input("Decimal: ")

BCDValue = ""

valid = True

for i in range(len(num)):

   if num[i].isdigit():

       if(int(num[i])>= 0 and int(num[i])<8):

           BCDValue += BCD[i]+" "

       else:

           valid = False

           break;

   else:

       valid = False

       break;

if(valid):

   print(BCDValue)

else:

   print("Invalid")

Explanation:

This initializes the BCD corresponding value of the decimal number to a list

BCD = ["0001","0010","0011","0100","0101","0110","0111"]

This gets input for a decimal number

num = input("Decimal: ")

This initializes the required output (i.e. BCD value)  to an empty string

BCDValue = ""

This initializes valid input to True (Boolean)

valid = True

This iterates through the input string

for i in range(len(num)):

This checks if each character of the string is a number

   if num[i].isdigit():

If yes, it checks if the number ranges from 0 to 7 (inclusive)

       if(int(num[i])>= 0 and int(num[i])<8):

If yes, the corresponding BCD value is calculated

           BCDValue += BCD[i]+" "

       else:

If otherwise, then the input string is invalid and the loop is exited

<em>            valid = False</em>

<em>            break;</em>

If otherwise, then the input string is invalid and the loop is exited

<em>    else:</em>

<em>        valid = False</em>

<em>        break;</em>

If valid is True, then the BCD value is printed

<em>if(valid):</em>

<em>    print(BCDValue)</em>

If otherwise, it prints Invalid

<em>else:</em>

<em>    print("Invalid")</em>

7 0
3 years ago
Other questions:
  • An attribute whose value uniquely identifies an object is called a(n) _______.​
    15·1 answer
  • Need help answering this
    7·1 answer
  • What should you do prior to writing your business document?
    11·1 answer
  • What is the use of "Computer" Icon ?
    15·2 answers
  • Which location-sharing service offers items for users as a gaming component and also allows them to collectively link their chec
    9·2 answers
  • Where do you place the logical test argument in an JF function formula?
    5·2 answers
  • Entering the search criteria "B?" would yield which of the following results?
    6·1 answer
  • Users at UC need to be able to quickly create a Resource record from the Project record's Chatter feed How should the App Builde
    10·1 answer
  • Write a program to create a customer bill for a company. The company sells only five products: TV, DVD player, Remote Controller
    12·1 answer
  • (a) List 5 keys we can type with our left hand fingers
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!