日历程序。帮助步骤 [英] Calendar program. Help with steps

查看:63
本文介绍了日历程序。帮助步骤的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我应该是makig一个日历程序,最终将允许用户插入一个数字,日期将根据该数字出现。但在我们这样做之前,我需要某人的帮助才能给我一些小步骤,直到我们让它正常工作。

这个日历程序应该有一些 if then statements 。这是我迄今为止的日程安排。现在我的日历有一个构造函数,用于标识月,日和年。我需要帮助下一个方法( ToString)。我希望这个方法有类似的东西,如果calendarMonth = 1则等于1月,或者如果calendarMonth = 2那么它是2月,依此类推。。我还想要它说如果它不等于数字1-12那么它应该在字符串中打印出无效数字


I am supposed to be makig a calendar program that will eventually allows the user to insert a number and the date will come up according to that number. But before we do that I need help from someone to give me small steps until we get it working correctly.
This calendar program is supposed to have a number of if then statements. Here is my calendar program so far. Right now my calendar has a constructor identifying a month, day, and year. I need help with the next method(ToString). I want this method to have something like if calendarMonth =1 then it equals January, or if calendarMonth = 2 then it is Febuary and so on.. I also want it to say if it doesn''t equal a number 1-12 then it should print out invalid number in a string.


展开 | 选择 | Wrap | 行号

推荐答案

1。)
1.)
展开 | 选择 | Wrap | 行号


好的非常感谢第一种方法,我会在有机会时尝试一下。至于导入日历类,我认为即使我正在制作自己的日历程序,我也应该输入。我会阅读说首先阅读此内容的主题。我很抱歉
Ok thanks alot for the first method, I will try it out when I get the chance. As for the import calendar class, I thought I was supposed to type that in even though I am making my own calendar program. And I willd read the thread that states "Read this First". I am sorry for that


这是布尔表达式的全部内容 :如果条件X为真你想做某事; X你不想做其他的事情:

This is what boolean expressions are all about: if a condition X is true you want to do something; it X is not true you want to do something else:

展开 | 选择 | Wrap | 行号


这篇关于日历程序。帮助步骤的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆